page-break/form-feed possible?

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.
LVL 8
jhurstAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

theTerabyteCommented:
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.

HOPE THIS HELPS!  Terabyte
0
jhurstAuthor Commented:
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.

0
theTerabyteCommented:
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
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

s2man11Commented:
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.
0
jhurstAuthor Commented:
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.
0
Trevor013097Commented:
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:-

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

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

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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jhurstAuthor Commented:
why does the image help?  Does the image not get broken by a page  when the page is printed?

0
s2man11Commented:
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.
0
jhurstAuthor Commented:
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?'

0
Trevor013097Commented:
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.


0
jhurstAuthor Commented:
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?
0
Trevor013097Commented:
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.


0
LarryAndroCommented:
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.

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

   <table style="page-break-before: always">
     <tr><td>Page 2</td></tr>
   </table>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.