We help IT Professionals succeed at work.

page-break/form-feed possible?

jhurst asked
Medium Priority
Last Modified: 2013-12-25
I will upgrade the number of points for this question if I get a YES, but am not inclined to offer a lot of points for a simple 'no'.

Is there any way that I can insert a 'form-feed' or 'page eject' into a page so that when I print it I can control where the page breaks happen.

I need something that will work with the Browsers that are out now, not something that relies on a future mark-up language feature.
Watch Question

Unfortunatly, the only way to do this is with <br> tag after <br> tag until you get to the next page(i.e. teh equivalent of pressing enter untill you get to the bottom of the page).

it's not very clean, but it works.



This is not really a solution since we can not use the <BR>s since the number required would be different depending on how the driver happens to allocate space.  I am therefore going to leave it open for a little longer.

I do appreciate the reply however and would like to give you the points.  I will in a few days if nothing else comes.

Thanks, I appreciate the points even though it didn't solve your problem.

I will keep thinking about a solution, though a doubt there is one.  looks like this is one for netscape naviagtor V5.1

Why don't you just create different HTML pages.  Each being the only text/images that will be printed on that page. It's a little  cumbersome but....

Or allow users to down load MS WORD, Wordperfect,... docs for a variety of platforms.  Then they can print them out.

Or create .PDF files with Adobe Pagemaker.


unfortunately this does not work.  The problem is that the <BR> does a blank line as you say however, the number of lines that are allowed on a page varies from printer driver to printer driver.

With normal software we restrinct the number of lines on a page to 60 and do a dorm-feed knowing that this will work on the 60, 63 and 66 line per page printers this will not work here!

Thanks for the try, but sorry!

PS: I hate having to use the 'reject' key here.  Thaks but not quite would be much better.
Okay there is no way to include a page break and as I think we have all established the only way is to try and force a page break.  One method would be to find out how many pixels make up your 60 lines and then have an image (1 pixel x pixels in 60 lines) running down the side of the page.  Set up in a table like this:-

      <TD><IMG SRC="image.gif" WIDTH=1 HEIGHT=600></TD>
      <TD>The contents of your page 1</TD>

      <TD><IMG SRC="image.gif" WIDTH=1 HEIGHT=600></TD>
      <TD>The contents of your page 2</TD>

Your page should now print with breaks where the image ends and the new one starts.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


why does the image help?  Does the image not get broken by a page  when the page is printed?

Trevor has a good idea.

Actually, you won't see the image if you make it the same color as your background.  Make sure you sent borders to 0 and cell padding to 0 in your tables.

That way no one will know the page is actually a table.


OK.  I agree, I can make the image impossible to see, probably I would make it transparent.  Howevere, I still come back to my other comment:  'why does the image help me?'

The image helps because the browser by default will print images whole on a page.  If it cannot fit the image on a page it will print it on the next.  So providing you make your image the right height your pages will break at the right point.


if you look at http://realestate.org/test/testbar.htm you will find an example of what you suggested.  When I print this document it does as you suggest the two page print.  You will note however that the gif image is divided over the pages.  To make it easier to see I have made the image a little wider that you suggest and left it black.  Am I doing something wrong, or does your method not work?
okay jhurst,

I was wrong, but I was sure I had done it before, but hey must be wrong.

Please reject this answer and open it up for someone else.

My appologies for the error.

Just a thought, had you ruled out a .pdf file (Adobe Acrobat) this would give you perfectly formatted pages with standard word processor page breaks, or how about a word doc.

I had the same question as the original author.  Since the question was asked in 1997, probably browser changes were made.  Who knows.  But, an adequate answer for me, a way to force an html page to form-feed at a specific place is...

Using StyleSheet, it's easy to force a page break when printing a page.

     <tr><td>Page 1</td></tr>

   <table style="page-break-before: always">
     <tr><td>Page 2</td></tr>
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.