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

Print Preview

Status
Not open for further replies.

ShawnDT

Technical User
May 1, 2006
67
0
0
US
Good Morning,

Does anyone here no how to prevent pages from being cut-off with a print preview page? I have created a intergrated web interface with SQL. When my clients prints it will cut part of the word in have as it prints the next page. Is there code, which will tell the page to break and print or something? Thanks
 
Since you mentioned it's a web interface, there is a CSS option to make a page break
Code:
<style type="text/css"> 
	H1{ page-break-after: always; }
	body { margin: 0px 0px 0px 0px;}
</style>

Then down in the body where you need to break
Code:
...code...
...code...
<H1>&nbsp;</H1>
...code - Next page
...code...
 
I guess I did not explain issue well. This print preview page that I have created, changes depending on the database records. The print preview page could be 8 pages it could only be one page. This depends on the plan that the person selected. Is their a way to say at the end of document. If there are lines go to next page to start print or something?
 
If you know that each record takes x amount of space(1 line) then you can do a counter as you loop through. Once it hits 40 records or whatever number response.write it in. I had to do this in the past to make a project work correctly. If each record could be 1-5 lines long or something like that then this wouldn't work very well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top