Link to home
Start Free TrialLog in
Avatar of ajraven
ajraven

asked on

Printing to a label printer from a web-based Java application

We have a Java-based web application, using Apache Tomcat as the server.  We want to be able to print to label printers using various sizes of label stock (significantly smaller than legal, letter, etc.).  

Additionally, because this is a label and not a whole document, we want the browser to ignore its header and footer settings.

Has anyone accomplished this, or heard of anyone who has?

When we print to our sample printer (a Brother P-touch QL500), one of two things happens:
If in Portrait mode, get one label with the browser's defined header and footer.
If in Landscape mode, get enough labels to make an 8.5" wide piece of paper (Page 1 of 27 and so on...)

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of boonleng
boonleng
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ljo8877
ljo8877

The information you want to change are browser settings. These cannot be controlled throught the web page. You'll find the settings for margins, headers and footers under file-page setup. In IE you'll also find a list of paper types and sizes there including "user defined," but I'm not sure how you define the size.
I should mention there are two different types of headers: those create with <h1> thourgh <h6> and those added by the browser adding url, date, etc to the page. The later type are controlled by the user through Page Setup. The former would be controlled through a style sheet as Boonleng suggests.