Closed Bug 1201473 Opened 9 years ago Closed 4 years ago

Incomplete printing of html pages. Content gets lost

Categories

(Core :: Printing: Output, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: thegizmo, Unassigned)

References

Details

Attachments

(7 files)

Hello I do have a problem while printing HTML pages using firefox. Content that is contained within the HTML is not printed, instead the whole page is missing.

This error occurs if a certain element reaches the bottom of the page, so that a pagebreak occurs. The content that should follow is lost within the printing.

I attached two images. One to show how the printed page should look like, and one to illustrate how it actually is printed (which is wrong). Furthermore I attached a zip file containing the html file and the needed images and css files.

I was able to create a temporary fix for the bug, by modifying the used css. I reduced at least one css file (docsurf.css) to the absolute mimimal setup which recreates the bug. So it seems that changing the rule which adds a margin to the body to:

@media screen {
 body {
 margin: 1em; } }

fixes the bug in the given case.

It might be possible that the behaviour I descriped is intended by firefox. If so it is no bug, but could you give an explaination why that is so?

To reproduce the bug I adjusted the top and bottom margins within the page setup, so that the div with the content "Procedure" (see images attached) is at the bottom of the printed pages.

I checked the known bugs for duplicates so I hope it is new bug. Sorry if I am wrong.
Hopefully I attached all information you need, if not feel free to ask me for more facts. This is my first bug support so sorry for any mistakes I made.

Environment used: Firefox version 26 as well as 33 and 40.0.3.

To reproduce:

1) Open node.htm
2) Look at the print preview, and adjust the top and bottom margins so that the subheading "Procedure" is at the bottom of a printed page

ERROR case: See picture (content under "Procedure" is lost)
EXPECTED behaviour: See picture (content is printed correctly)


Feel free to contact me if I can help

Thanks and regards
Severity: critical → normal
Component: General → Printing: Output
Product: Firefox → Core
Attached file node.htm.pdf (deleted) β€”
WFM with ff40 on win 7.

Could you test with a fresh profile (without modifying anything)
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(thegizmo)
Attached file sample not working.pdf (deleted) β€”
Attached image page setup.PNG (deleted) β€”
Hi tried using a new profile as you suggested. But the result stays the same, attached it as pdf. Have you adjusted the page margins (to locate the "Procedure" at the bottom) as I explained above?
Just noticed the following: In the sample that was provided by Loic, section 4 "Close Out" is missing. So for me it seems as if the bug is reproducible. But as I am the one who reported it, it is not my task to decide this matter.
Flags: needinfo?(thegizmo)
Indeed, some parts are missing, so it's reproducible.
Mh ok that is somehow good to hear. So what is next? I would set the status to confirmed, but it seems as if I'm not allowed to do so. Can I still do something useful to help?
We need a reduced testcase to know where is exactly the issue (like which CSS property implies this bug).
I've reduced the sample as much as it was possible for me now. Attached a new version, just 2 (small) css files remain, all js scripts removed. Maybe someone has an idea :) Further reduction of css properties might be possible but I've no more time atm.

I have posted a small snippet of css in the bug report (body/margin) which might be of interest.

Feel free to contact me if I can be of further help, I'll respond asap.
Hi, 
i took a bit of time to reduce the sample a bit further. Error is still reproduable, but now by removing any of the remaining 12 css properties it disappears. 
In my humbly opinion the error is linked to whitespace on the bottom of the page, which causes the printing-malfunction. But maybe this is quite obvious.
I ran out of _real_ ideas and solutions maybe someone has any idea now.

This bug is more than 4 years old, and so far it's not solved.

I have to print a lot of pages from a lot of different websites, and I'm obliged to use Chrome because Firefox has this problem with most of the pages :(

I mean, just try to print any Reddit page... you will get only manage to print a bit of the top of the page, and nothing else will get printed. Try to print the following:
https://www.reddit.com/r/photoshopbattles/comments/dkp0ye/psbattle_samurai_darth_vader/

What do you need me to do for you to change the STATUS of this bug to CONFIRMED?
Do you need more information? More examples? More tests?

Thanks.

I think this bug has been fixed. At least, I'm not able to reproduce locally.

Here's a screenshot of me trying to reproduce this in Print Preview, using the "minimized" testcase (the previous attachment). As instructed in comment 0, I set a somewhat large printed page-margin so that the word "Procedure" would fall at the bottom of the page.

In the original attachment zip, there's a screenshot incorrect printing.png which shows that we jumped straight from "3. Procedure" to "4. Close out", without showing any of the text inside the procedure section. However, I'm unable to trigger that behavior. See attached screenshot, where we've got all of the content that's supposed to follow "Procedure" (we don't jump straight to the Close Out section).

I tried using the testcase from the original attachment here, too (which has a bit more content/styling), and I was similarly unable to reproduce with that testcase.

So, let's close this as WORKSFORME. Please reopen if anyone can still reproduce, though.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME

By the way, I'm testing with latest Nightly, 77.0a1 (2020-05-01) (64-bit) on Ubuntu Linux 20.04

(In reply to filipemaia from comment #12)

I mean, just try to print any Reddit page... you will get only manage to print a bit of the top of the page, and nothing else will get printed. Try to print the following:
https://www.reddit.com/r/photoshopbattles/comments/dkp0ye/psbattle_samurai_darth_vader/

This is almost certainly unrelated to the testcases that the original reporter posted here. In that reddit page, I can reproduce the issue, and I believe it's because of the display:flex wrappers around much of the multi-page content there. So, print issues on reddit are likely bug 939897.

What do you need me to do for you to change the STATUS of this bug to CONFIRMED?
Do you need more information? More examples? More tests?

Theoretically, if you can still reproduce issues like what the original reporter described, using the testcases from the original reporter (or variants of them), and together we can figure out how to make that happen reliably, then it could make sense to reopen this and mark it as "confirmed" and investigate further.

But at this point I suspect this particular bug has become fixed, though other print bugs (e.g. bug 939897) obviously remain open for the time being.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: