R – Is it possible to make an element that fills out the remaining space at the end of a web page when you print it

printing-web-page

I have a web page containing a form that currently print comfortably in two pages. The second page has almost half a page of white space that I would like to be able to fill with a text box. Is this possible at all?

Best Answer

In short: no. For you, the web page prints out in two physical pages. For someone that has the font size cranked way up, it could be 3 pages. Or maybe they're printing on A4 instead of letter (or vice versa). Or maybe they're on Linux, OS X, or Windows 2k and have different fonts loaded than you do. Are all those stupid headers/footers turned on or off? What's the default margin size? Throw in browser differences and you really have no chance of getting a consistent printing experience.

The only thing CSS offers that is related to printing is page breaks, but even there, you can't prevent page breaks, only insert them before or after a particular element.

Related Topic