Tip

Force a Page Break on a Domino Web Page

You Can View User Feedback To This Tip

I had a need to force a page break after a certain section of a page generated by Domino. I created a style sheet and used the ID attribute in conjunction with the P tag to force the page break. Domino places a <p> at the beginning of the body tag. So you can't force the page break using only the <p> tag. So by using the ID attribute it only breaks the paragraph where I tell it to! This works with straight html as well.

Thanks to Matthew Sheranko from the lnotes-l list for the basic idea. More information can be found at: http://www.htmlhelp.com/reference/css/style-html.html

Code: Place the following code in the "HTML Head" section of your domino form:
   <STYLE>
       #pbb4 { page-break-before: always }
   </STYLE>

And place a <P ID=pbb4> where-ever you need the forced page break on your generated form.

Here's an example in straight html:
<HTML>
   <HEAD><TITLE>Dynamic Styles: Page Breaking</TITLE>
   <STYLE>
       #pbk1 { page-break-before: always }
   </STYLE>
   </HEAD>
   <BODY>
       <p >
       1st page content
       </p>
       <p >
       more 1st page content
       </p>
       <p id=pbk1>
       2nd Page content
       </p>
   </BODY>
   </HTML>

USER FEEDBACK TO THIS TIP

  • This works for IE but doesn't function at all in Netscape. —Barry Parish


This was first published in January 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.