Open Bug 1858571 Opened 1 year ago Updated 11 months ago

Printing page inserts a bunch of blank pages in the middle

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(3 files)

When I try to print https://ilibrary.ru/text/469/p.1/index.html in Firefox 118 on Mac, the resulting PDF (or preview shown by the Firefox print dialog, for that matter) has two pages with content, then 4.9 pages of blank space, a little bit of text at the bottom of page 7, and then the rest of the text seems to be fine.

Printing the same page in Safari seems to work ok.

I did try to get rid of a bunch of the float and <br clear="all"> and whatnot bits on the page using devtools, but none of that seemed to change the behavior, apart from changing how much text appeared before the 2-page cutoff.

(Hi bz!)

Looking in devtools, I see that the page is structured as two nested column-oriented flex containers -- the outer one being:

<div id="ex" class="l">

and the inner one being:

<div style="display:flex;justify-content:space-between;flex-direction:column">

If I disable the display:flex rule on both of those elements, then I don't see blank pages in the middle. So this is something related to flexbox fragmentation.

Severity: -- → S3
Component: Printing: Output → Layout: Flexbox
Version: Firefox 118 → Trunk
Attached file testcase 1 (original)

Here's the testcase, coalesced into a single file via testcase-reducer.

Attached file testcase 2
Attached file testcase 3

(Adding see-also for flexbox fragmentation issue bug 1744363, but this is not a dupe of that bug; the testcases here still render with blank pages in the middle, in a local build with that bug's patches applied.)

See Also: → 1744363
See Also: → 1881137
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: