• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Double Page break

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic