[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

Asp.net webpage printing

Hi,

I have a webpage that is set on Javascript to window.print which is fine once I but a Receipt printer.

but what I need to know is 2 things
1) How can I set up a template width so that it only prints certain width - either set as HTML or CSS
2) What must i call to cut the receipt

Any help is much appreciated

Thanks
R8VI
0
R8VI
Asked:
R8VI
  • 3
  • 2
1 Solution
 
COBOLdinosaurCommented:
You just set up separate styles for the print with an @media rule see: http://www.w3schools.com/css/css_mediatypes.asp  for the syntax and options.

Cd&
0
 
R8VIAuthor Commented:
Hi COBOLdinosaur
thanks for this so that may answer point 1 but what about point 2 sorry
0
 
COBOLdinosaurCommented:
I don't understand what you are asking in point 2.  I assumed it had something to do with the styling of the receipt which would be covered by specifying the media type.

Cd&
0
 
R8VIAuthor Commented:
Hi,

No like the printers will need to be told when to cut because not always will it be a set style

I want to implement on a receipt printer
0
 
COBOLdinosaurCommented:
Well if the receipt printer has to receive a code to tell it when to cut, then you will probably need some kind of ActiveX embedded in the page to send the code.  However most browsers (other than IE) do not support ActiveX and even Microsoft is now discouraging the use because of the security risks.

Browsers are not designed to control external devices, so you might want to contact the printer manufacturer to see if they have software that allows you to do what you want to do.

Cd&
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now