Print adds many blank pages, cannot be reproduced with print simulation
Categories
(Core :: Printing: Output, defect, P2)
Tracking
()
People
(Reporter: jdescottes, Unassigned)
References
(Regression, )
Details
(Keywords: regression)
From https://discourse.mozilla.org/t/media-print-and-real-pdf-print-have-real-difference/102860
Trying to print https://dev.recolte.org/recolte/installation-en-maraichage-biologique-sur-des-terres-communales-dans-le-marais-de-guines-62 in Firefox creates a lot of blank pages, especially in landscape mode (more than 12 000 blank pages).
STRs:
- open https://dev.recolte.org/recolte/installation-en-maraichage-biologique-sur-des-terres-communales-dans-le-marais-de-guines-62
- optionally switch to landscape mode to make the issue even more visible
Not sure if that qualifies as an expected result, but Chrome does a "reasonable" print, without blank pages, showing all the content.
Using print simulation in DevTools does not show the same issue.
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
Short of fixing the symptoms in Firefox, any tip to investigate the problem would be helpful.
Reporter | ||
Comment 2•1 year ago
|
||
Hi Emilio! I see you have been commenting on some printing bugs, so maybe you could have an idea here.
The print preview for the website linked here creates thousands of pages. When trying to bisect on the markup/style, it seems like I can "fix" it by removing a display: table
rule at https://dev.recolte.org/media/cck/css/cck.css line 21, but I haven't been able to create a reduced test case.
I can say that ESR 91 doesn't have the same issue, but the preview has a lot of blank space in ESR 91 so not great either.
Comment 3•1 year ago
|
||
The difference between esr91 and trunk is the layout.display-list.improve-fragmentation
pref... In any case yeah, there should be no reason to create thousands of blank pages, there's something going very wrong there.
A more reduced test-case would be great here. The root cause is probably a fragmentation issue with tables, but we should also fix the slicing fallback. cc'ing some folks that have looked at related areas.
Reporter | ||
Comment 4•1 year ago
|
||
thanks a lot for the info! will try again to get a reduced test case today
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Set release status flags based on info from the regressing bug 1681052
Updated•1 year ago
|
Comment 6•1 year ago
|
||
For what it's worth, it seems to be related to overflow: visible;
being set on the body in custom_21.css.
The related @media
rule looks like this:
@media print {
/* line 3, templates/terredeliens/custom/scss/print.scss */
html, body {
height: auto;
}
/* line 6, templates/terredeliens/custom/scss/print.scss */
body {
color: #000;
overflow: visible !important;
}
/* line 10, templates/terredeliens/custom/scss/print.scss */
body #g-page-surround {
left: 0px !important;
overflow: visible !important;
}
/* line 14, templates/terredeliens/custom/scss/print.scss */
body #g-page-surround > *:not(#g-container-main), body .aftercontent, body .printcta, body #g-container-topbar, body .cck_r_recoltes_carte, body #g-offcanvas, body img, body .cboxElement {
display: none !important;
}
/* line 27, templates/terredeliens/custom/scss/print.scss */
body #g-offcanvas {
width: 0px;
height: 0px;
}
}
I couldn't reduce it to a simple test case yet, though.
Sebastian
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Hi Sebastian, just checking if you had a fix in mind or any updates to share? Thx
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Fix no, as I have no idea about the code behind this. I'll try to come up with a simplified test case so it's easier for someone to come up with a solution. I'll keep the ni for now to not forget about it.
Sebastian
![]() |
||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Comment 10•1 year ago
|
||
As the other bug already has a reduced test case, I remove my ni here.
Sebastian
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Thanks all of you for pointing in the right direction.
We succeed in getting something functional, as you can see there : https://ressources.terredeliens.org/recolte/installation-en-maraichage-biologique-sur-des-terres-communales-dans-le-marais-de-guines-62
Description
•