Closed Bug 1785107 Opened 1 year ago Closed 1 year ago

Print adds many blank pages, cannot be reproduced with print simulation


(Core :: Printing: Output, defect, P2)






(Reporter: jdescottes, Unassigned)


(Regression, )


(Keywords: regression)


Trying to print in Firefox creates a lot of blank pages, especially in landscape mode (more than 12 000 blank pages).


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.

Short of fixing the symptoms in Firefox, any tip to investigate the problem would be helpful.

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 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.

Flags: needinfo?(emilio)

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.

Severity: -- → S2
Flags: needinfo?(emilio)
Priority: -- → P2
Regressed by: 1681052

thanks a lot for the info! will try again to get a reduced test case today

Flags: needinfo?(jdescottes)

Set release status flags based on info from the regressing bug 1681052

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.


Hi Sebastian, just checking if you had a fix in mind or any updates to share? Thx

Flags: needinfo?(sebastianzartner)

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.


Closed: 1 year ago
Resolution: --- → DUPLICATE
Flags: needinfo?(jdescottes)

As the other bug already has a reduced test case, I remove my ni here.


Flags: needinfo?(sebastianzartner)

Thanks all of you for pointing in the right direction.
We succeed in getting something functional, as you can see there :

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