Click to See Complete Forum and Search --> : Forcing Page Breaks


meetn2veg
02-10-2003, 07:36 AM
Hi one and all.

Here goes.... The JS bit to open the client's Print dialog box is so easy it hurts! However, do any of you excessively knowledgeable people out there know how to force a page break? ie: perl script spits out one HTML page with (in my case) 4 different areas - or "reports" - on it. Client then selects OK to print, and, lo and behold, 4 pages come out of the printer.

I'm goiing to get bad karma for this one I know, but my head hurts so much... (and my stomach - 3 days gastroenteritis isn't funny!)

Many thanks in advance...

R.

pyro
02-10-2003, 07:42 AM
With CSS, you can specify page breaks with these properties

page-break-before: always;
page-break-after: always;

So, you'd probably want to add it to a div where you want it to break, something like this. <div style="page-break-after: always;"></div>

Nicodemas
02-10-2003, 12:27 PM
good luck with your gastro... something... itis. Don't die or anything. :)

chestertb
08-31-2006, 05:48 PM
Ok... I know this is a VERY OLD post, but for those newbies here, finding a post like this is what happens when you use "Search" instead of just jumping in and asking questions.

Pyro. Thanks your answer three years ago just saved me hours of work. I owe you one.

emoritz
08-31-2006, 09:01 PM
props to that. too many people ask the same questions over and over again without doing any research.