Mortgage - Servidores virtuales - Problem Mortgage - Mortgage - GIS Mapping

PDA

View Full Version : Javascript window.print() problem


matojo2006
Oct 24th 2007, 12:19 pm
I am using the javascript window.print() to print some reports from a small windows utility program. This program generates an HTML file and then calls window.print() to print the report.

We are printing using a dotmatrix printer and it uses a paper roll. There is no fixed paper size in this case. Is there a way I can adjust the paper size depending on the length of the content?

Currently, what is happening is, no matter whether the content is 1 line or 30 lines, the printer always ejects A4 size (or whatever is pre configured). How can I dynamically adjust the paper size settings through the program, before calling window.print()?

This is a machine dedicated for this purpose and it is acceptible to alter IE settings through the program.

Thanks.

Mike H.
Oct 24th 2007, 12:44 pm
Try posting this question in the CSS forum. You can use CSS to limit/set the content of what will be printed, and you can also set page breaks.