Absolutely positioned elements print weirdly
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: passiday, Unassigned)
References
Details
Attachments
(1 file)
173.33 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
I am developing an html-based report generator that uses JavaScript to build a hmtl document that is inserted in a hidden iframe and then this iframe is printed to pdf file.
OS: Ubuntu 20.04 LTS
Firefox: 82.0.2 (64-bit)
Please see the attached html page, try to print it to pdf file.
Actual results:
Attached screenshots of three cases how the printing goes wrong.
Case 1:
In the page 2 of printed pdf, the css top property for absolutely positioned objects is completely ignored.
Case 2:
Then I tried to add a "position: relative" wrapper div, to see if anything changes. In this case, the absolutely positioned child divs appeared in print somewhat correctly, however, there's an unexplained gap between the top of the page and "top:0mm" div.
Case 3: To check what's up with that gap, I added "border: 1px solid black" to the wrapperDiv style. That causes the absolutely positioned child divs to jump in place in the Firefox, however in print the child divs have collapsed.
Expected results:
The elements in the printed version are correctly positioned.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Thanks for reporting this bug. This looks similar to bug 546559.
Description
•