Firefox won't print entire web page
Sometime recently (as of 11/3/19) Firefox ceased to reliably print entire web pages. Instead it prints the first, last, and sometimes one middle page. The print preview function suffers the same error. Since the problem shows up in print preview I don't believe that it is related to the configuration of a specific printer. It doesn't seem to be a coding error in the web page as other browsers like IE, Chrome, and Opera render the page accurately. Because I don't print pages often, I can't tell with what version the problem showed up.
Chosen solution
Hi James, as more and more web pages adopt modern layout styles, Firefox's print engine has not been keeping up. There is work in progress on that, but it's slow because there are so many other priorities.
The example you described sounds like situation where Firefox is treating a large block of content as unbreakable. It moves that block to a new page, but anything that doesn't fit on the page just runs off the bottom. The if there is more content after that, it goes onto the next page. Frustrating.
I created an extension to work around this by overriding the style rules that Firefox won't break into separate pages. This sometimes creates additional complications, but you still might find it useful from time to time:
https://addons.mozilla.org/firefox/addon/printable-the-print-doctor/
As an example of a page with this problem for testing:
https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/saveAsPDF
You'll see that using the Allow Page Breaks button makes the full text visible in print preview, but also the sidebar. If you hover the sidebar and use the "tweak panel" to hide it, then there is less waste in the printout. Sorry I can't figure out how to do that automatically.
Read this answer in context 👍 1All Replies (7)
I don't have an orange "Firefox" button anywhere; certainly not in the upper right corner of my screen. Please don't take umbrage but I've been programming since 1959. This issue may be unique to me because of some unseen configuration on my systems, but it is real.
Seçilmiş Həll
Hi James, as more and more web pages adopt modern layout styles, Firefox's print engine has not been keeping up. There is work in progress on that, but it's slow because there are so many other priorities.
The example you described sounds like situation where Firefox is treating a large block of content as unbreakable. It moves that block to a new page, but anything that doesn't fit on the page just runs off the bottom. The if there is more content after that, it goes onto the next page. Frustrating.
I created an extension to work around this by overriding the style rules that Firefox won't break into separate pages. This sometimes creates additional complications, but you still might find it useful from time to time:
https://addons.mozilla.org/firefox/addon/printable-the-print-doctor/
As an example of a page with this problem for testing:
https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/saveAsPDF
You'll see that using the Allow Page Breaks button makes the full text visible in print preview, but also the sidebar. If you hover the sidebar and use the "tweak panel" to hide it, then there is less waste in the printout. Sorry I can't figure out how to do that automatically.
Thanks for your help. Yours is the first description I've read that fits the data I've seen. Your add-in works as described and will keep me from having to revert to another browser.
I've been having issues like this for some time now. I get pages cut off without continuing, just as described here. I also often get printed pages where blocks of text are placed over top of each other, and the resulting page is unreadable. This is particularly irritating when printing invoices from the web. I've had this problem through several updates, on more than one PC. I've also already tried the printing problems troubleshooting steps. I know this is a Firefox related issue, because when I switch to another browser, it prints just fine. I'd prefer not to have to switch browsers just to print. Issues like this force me to keep other browsers around, that I'd rather delete from my machines.
Hi czibbell74, there are bugs on file in the bug tracking system for many print problems, but you could share some URLs for problem pages to see whether there is something new going on there -- not including invoices, of course.
For now, you'll need to use workarounds as discussed earlier in this thread.
Note: for PDFs, you'll often have better luck printing from Adobe Acrobat/Reader than from Firefox.
This answer is for the developers:
Problem with web pages is that Firefox has very outdated print engine. It doesn't properly position elements with `position: absolute` positioning and with most other display properties other than `display: block`.
My solution for web page was to replace all wrappers with absolute positioning to `position: static`, which is default setting, and to replace flex with block.
Of course, CSS styles for print must be redone in accordance with this, in order to avoid overlapping elements and other weirdness that may result from these changes.
For other solutions, check out this link: https://stackoverflow.com/questions/4609007/firefox-printing-only-1st-page/
Modified
Hi jscher2000,
Can you provide the bug related to this issue so that I can submit the problematic test link.