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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Breaks for Printing 2

Status
Not open for further replies.

NFI

Programmer
Jun 7, 2000
278
GB
What-ho,

is there such a concept in HTML documents whereby I might insert some sort of Page Break marker periodically throughout a document so that, when that document is printed (from the browser, MSIE or Navigator), that printer knows where to start printing on a new page?

Many thanks for any help,

Paul
 
try this:

p {page-break-after:always}

that will work in IE, put it in a style definition and now all your p tags will have a page break after them jared@aauser.com
 
Thanks very much indeed - that works great :)

I modified the idea slightly, though, so that I can still use <p> tags without forcing a page break:

<html>
<style type=&quot;text/css&quot;>
<!--
p.PageBreak {page-break-after:always}
-->
</style>
<body>
<h1> Page 1</h1>
<p class=PageBreak>
<h1> Page 2</h1>


thanks again,

Paul
 
Jared or Paul,
I have an app that (on screen) has several tables one after another. The FAA requires that each new table begins a new page. Fair enough. I wrote the following to handle it:
Code:
<TABLE STYLE=&quot;page-break-after: always;&quot;>
Well, this works great for EVERYBODY except for one guy in Kansas. Now, barring the possibility that it's Kansas' fault :) I can't come up with a reason for this oddity. We're using the same OS, browser, and printer.

What's the deal? Kevin
slanek@ssd.fsi.com
 
User error:

The guy from Kansas is probably doing something wrong :eek:)

jared@aauser.com
 
Ok, now I'm laughing!!!

You know, he probably is. There is a screen where the user chooses the print option (continuous or page break after each table) He's probably screwing that up somehow, although he insists he's chosing the right option.

BTW, am I imagining things or did they change the name of this forum? Kevin
slanek@ssd.fsi.com
 
NFI,

I've used your solution for line breaks above and I can tell it works because I can see the <p class=PageBreak> where its supposed to be. The problem is it doesn't break when printing. I'm on the latest version of IE and have Win2000 for OS, so don't think its a css problem!!

HELP!!!

Thanks,
Rexolio
 
What-ho,

Perhaps there's something funky about the way your printer's set up? You say you can see the <p class=pagebreak> where you want the page breaks to be - this is a tag that you put in yourself, so that in itself doesn't mean this concept is working on your page.

I don't want to come from the patronising &quot;are you sure you've turned it on&quot; school of help, but have you placed all the relevant style information on your page somewhere? In my reply at the top of this thread somewhere, I've written out the <style...> tags and their contents - check your page against that again and see if the two marry up.

Other than that, perhaps this is some sort of pernicious CSS problem - not sure what to do about that, sorry :(

Good luck all the same,

Paul
 
alright guys this is all great but what can i do to page break in NS4.x??

ive been banging my head against this one for a while and have tried all manner of workarounds (even table layouts - urgghh - i'd hoped to be rid of those!!) and none of them work?

anyone got any smart ideas? or is it jsut another case of tough tits for ns4 users - they should all upgrade anyway and we wouldnt have the problem!!

any thoughts on this much appreciated

rob
 
Have you tried embedding a page-break character in the page? Old DOS trick: hold down Alt key and press 012 on the numeric keypad. That trick may not work in all editors, but should in notepad and some others. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
NFI,

I have the entire code just as you entered: <style>...</style> within the header tags...I have the pagebreak code right as well. my computer still doesn't print the page breaks! :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top