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.
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.