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

Page Break

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
MX
Hi
How do you do a page break on a page in html?
Thanks
Happy Holidays
 
Use a break tag: <br>

Hope This Helps!

Ecobb

&quot;Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.&quot; - Homer Simpson
 
If you mean when the page is printed - you would use the pageBreakAfter, or pageBreakBefore CSS attributes.

So if you have a Paragraph that you want to always start on a new page you would do
Code:
<P style=&quot;pageBreakBefore: always;&quot;>This will print on the top of a page.</P>
Or use the pageBreakAfter when you want something to always be the last thing on a page.

The four recognized values are: always, auto, left, right (the default behavior is auto).

Good luck,

Einstein47
(&quot;Tribulations are God's megaphone to awaken a deaf world.&quot; - C.S. Lewis)
 
That works only for browsers which supports the feature. And one more thing, default headers and footers (in the browser Page Setup) gets in the way. I personally prefer creating PDF verion of the pages on-the-fly. This approach works exactly the way I want pages to print. How did I do it? I used a PDF software to work with ASP.
 
Well, in that case download yourself a copy of PHP and get it running on your server. It's free AND it has PDF capabilities built in!

Strictly from a HTML standpoint, you'll find it very difficult to get page breaks to work across all browsers. medic is right. If you really want to get it right, you'll need to use a different technology like PDF.

-Ron

We all play from the same deck of cards, it's how we play the hand we are dealt which makes us who we are. -Me
 
medic,

I am having trouble getting my page breaks to work. Can you tell me what I need to do to generate PDFs on the fly?

I already have Adobe Acrobat and a server running IIS with ASP.
 
lovejaeeun, [love2]

There are two PDF generator I currently know...Active PDF and PDF Creator Pilot. I had chosen the PDF Creator Pilot (for use in ASP) because it is easier to use (at least for the way I want my PDF created). These softwares are not free, but you can download their demo versions to see which can work best for your style of web application.

Their links:

HTH

Medic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top