Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page-breaks not working

Status
Not open for further replies.

aharrisreid

Programmer
Nov 17, 2000
312
GB

I have a web page displaying the contents of a text file containing page-break characters (ASCII value 12). When I send the page to a printer (via Ctrl-p), the page is printed continuously, and the breaks are ignored. Is there any way (perhaps replacing the page-break characters with HTML tags or special characters) that I can print the page with the page-breaks retained?

Any help would be appreciated.

Alan
 
Hi aharrisreid,

You can do this with CSS2 but it doesn't work for Netscape (might for version 7).
page-break-after:always
or page-break-before:always

Remove pagebreaks: page-break-after:auto or page-break-before:auto

Eg:
<STYLE>
H1 {page-break-before:always}
</STYLE></HEAD><BODY>
<H1>The heading</H1>

H1 is used as an example - can use any tag. Hope that helps.
 
Jillc,

>>You can do this with CSS2 but it doesn't work for Netscape (might for version 7).
page-break-after:always
or page-break-before:always<<

That does the trick, many thanks.

Alan
 
I tested Netscape 7.01 with the page-break-after command and it worked fine on my test page. Unfortunately when I tried it where I needed it (inside a datagrid template) it wouldn't work. Funny, you would think printing each item of a datagrid on a separate page would be a priority place for this command to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top