Link to home
Start Free TrialLog in
Avatar of aguisa
aguisaFlag for Costa Rica

asked on

How to programmatically set (Page Setup on Internet Explorer & Mozilla)

I have a software that performs tasks like ENVOICES, PAYABLES, RECEIVABLES, etc. The thing is that the envoices have a format for POS systems. With my EPSON TM-U220 set as default, it shows the content of the envoice, but when I print it, the margins don't fit on the width of the paper (40 columnas)

The thing is that if I manually set the margins (Left=0 / right= 0) it then prints fine. If I for example needed to print a report, I would have to set another page setup in order for the report to fit the page.

What I want to avoid is to manually having to set PAGE, and be able to either print a report or an envoice without having to worry about these things. It would be helpful if I could SET a PAGE format for a URL individually. The thing is that I don't know if this can be achieved with any browser.
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Hi aquisa,

There are two ways to approach this problem.

You can try to set a print-only stylesheet and define margins and container widths there.  Some trial and error will be needed to produce the correct effect.  The other method would be to generate the invoices, etc. as PDF directly on the server and set the margins and paper size in the PDF generation script.  That would only have to be done correctly one time and then the system would generate what you need, display it in the browser and you can dump it to the printer from there.
Avatar of aguisa

ASKER

Lets say I go for the CSS approach. Is there any example that you might bring in order to produce this effect?
How big is 40 columns in another measurement?
Avatar of aguisa

ASKER

What I need to achieve is the printer to print in FontA11, which is embedded in the printer, and has a fixed width. The printer is an EPSON TM-U220, those which are used in Points of Sales.

thanks for your interest
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America 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 aguisa

ASKER

It looks pretty easy and seems to be functional. I will give it a try and let you know. Thanks.
Avatar of aguisa

ASKER

it sure worked fine. Thanks a lot