in reply to Smart printing

All documents are and should be in HTML format.
As far as CSS is concerned, i use CSS and it did not know that we can do this with it. I guess i think my problem needed some more intelligence in the program to do this.

Replies are listed 'Best First'.
Re: Re: Smart printing
by hossman (Prior) on Mar 19, 2002 at 22:30 UTC
    "more intelligence in the program" is exactly what you don't need.

    The problem you are dealing with relates to the printing of HTML pages, generated by a perl script, using Mozilla/IE. The first thing you should do when trying to address any complex problem, is to split it into the smallest possible "sub problems" such that the action of splitting the problem up doesn't change the nature of the problem.

    In your case, the first thing you should ask your self is: "Does the fact that my pages are generated with perl affect the problem?" -- I think you'll find that the answer is no. Mozilla/IE don't care where your HTML page comes from, they'll print it the same if it's served by a CGI, or if it's a file on your HardDrive. So take perl out of the equation: generate a copy of your page that you save to disk, and then tweak it untill you can get Mozilla/IE to print it hte way you want -- IGNORING PERL -- the perl doesn't matter, only the HTML. Once you have the file printing properly, then put the orriginal problem back together: update your perl to generate a page just like the flat html file you have.

      By more intelligence in the program" i ment that we can use perl to:
      » Use line counting when populating the tables, and force extra blank characters at the bottom of the pages.
      » Create a button on the web page for generating a printable version of the page which would create each report on its own page.
      or something along those lines...

      By the way i am fully aware that the browser does not care what kind of language i use to bring that data up......

Re: Re: Smart printing
by HamNRye (Monk) on Mar 20, 2002 at 18:20 UTC

    This HTML works for me.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> <style> div.body { page-break-after : always; } </style> </head> <body> <div class=body> Body 1 13:5 3-20-2002 >> P:\20020320\R2003A010.JPG exists, skipping... 13:5 3-20-2002 >> P:\20020320\R2003A017.JPG exists, skipping... 13:5 3-20-2002 >> P:\20020320\R2003A018.JPG exists, skipping... 13:5 3-20-2002 >> P:\20020320\R2003A019.JPG exists, skipping... </div> <div class=body> Body 2 13:5 3-20-2002 >> P:\20020320\R2003C008.JPG exists, skipping... 13:5 3-20-2002 >> P:\20020320\R2003D001.JPG exists, skipping... </div> </body> </html>

    In Opera, IE, and Mozilla, this displayed as one big page and prints as two separate pages.

    Ta-Da!

    ~Hammy
    nothing4sale.org

      In case you missed it, i'll say it again.
      I have to use Netscape for this.