I have a web application that generates a long report and I need to print it. If I just print the page it will break at the end of the physical page. How can I calculate where to make a break in the web page so that the page breaks line up with the physical pages when they print?
We have a system which prints out invoices for selected orders which places a
<br style="page-break-before:always;">
between each invoice. This means each invoice goes on a new page.
It's also good practice to use a print stylesheet
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
which can hide/display relevant areas of the page. No point printing out leftnav links etc when someone wants the actual page contents.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With