Javascript window.print() problem

Discussion in 'JavaScript' started by matojo2006, Oct 24, 2007.

  1. #1
    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.
     
    matojo2006, Oct 24, 2007 IP
  2. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    Mike H., Oct 24, 2007 IP