Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Double Page break

 
Kin Ng
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using this tag for generating page breaks for printing..
<!-html text -->
<br style="page-break-after:always;"></br>
<!-html text -->
most of the time it works fine...
However...something goes wrong when the text before
the break actually filled out one full page.
It causes the break to appear as the first tag in the second page,
and it generated a page break at the beginning of the page.
Thus, I'm now having an extra blank sheet in between.
page 1. some text
page 2. blank
page 3. some text

Is there anyway that i can specify the page break so that it
only generates a page break when it's not at the beginning of page??

Thanks for your help guys.....

pn
[ October 04, 2005: Message edited by: Bear Bibeault ]
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to look into page-break-before instead of page-break-after and/or auto instead of always. If you can't get it to work with some combination of those attributes, I'd say it's most likely a problem with the browser. You could also try this for your break:

 
Kin Ng
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.

auto didn't give me any page break at all.

and "page-break-after:always;page-break-before:avoid"

produce the same result. i.e. a blank page

=(
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only other thing I can think of is to maybe add display:inline or line-height:1px or other attributes to make the break take up less space on its own. Good luck...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic