Jump to content

print HTML : Page 3 of 10


Guest Teza

Recommended Posts

:) While printing a HTML, generated by PHP, (the logical structure is identified but its size is variable) it is compulsory to precise directly in the document body, the number of each printed page and the total amount of pages. i.e : Page 3 of 10. Script language PHP or JavaScript. Mozilla or Firefox as browser.Thanks for your help.
Link to comment
Share on other sites

When generating the html with php is there a way to count the lines as they are being printed? If so you can do a print preview in your browser and see how many lines fit on a page and adjust your php to insert a CSS page break at the correct position and place the Page 3 of 10 just before the page break.This can be tricky and due some options the browser gives the user it is not 100% fool-proof.

Link to comment
Share on other sites

Yeah, I've used that type of thing before. It works fairly well. The most important thing is to get the page to be a static width, so I wrapped everything in a table with a set width. That way it will be predictable on most people's setups.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...