Solved

page-break/form-feed possible?

Posted on 1997-08-30
13
183 Views
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.
0
Comment
Question by:jhurst
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 2

Expert Comment

by:theTerabyte
ID: 1854871
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
 
LVL 8

Author Comment

by:jhurst
ID: 1854872
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
 
LVL 2

Expert Comment

by:theTerabyte
ID: 1854873
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
 

Expert Comment

by:s2man11
ID: 1854874
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
 
LVL 8

Author Comment

by:jhurst
ID: 1854875
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
 
LVL 5

Accepted Solution

by:
Trevor013097 earned 50 total points
ID: 1854876
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Author Comment

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

0
 

Expert Comment

by:s2man11
ID: 1854878
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
 
LVL 8

Author Comment

by:jhurst
ID: 1854879
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1854880
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
 
LVL 8

Author Comment

by:jhurst
ID: 1854881
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1854882
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
 
LVL 1

Expert Comment

by:LarryAndro
ID: 20111472
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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now