I have some code that generates bills for multiple customers on one web page. I use the div element style="page-break-after:always" so the user can print every customers bill at once, and the bills for unique customers will all be printed on a separate sheet of paper. My issue is that I want the bills to be a little more readable on the users screen by putting some space between one bill and the next bill, but I don’t want to print a bunch of white space. How can I introduce some extra space between the bills that the printer will ignore?
I have some code that generates bills for multiple customers on one web page.
Share
You can implement a special style sheet only for the printer and have that style ignore certain elements. Something like this would work:
Then within your print.css file you can have all of your original CSS and define something like this:
Within your HTML file, all the elements you want hidden just add the
printhideclass to them. Eg.