8000 Workaround for float reflows limit by Fl0Cri · Pull Request #3714 · dompdf/dompdf · GitHub
[go: up one dir, main page]

Skip to content

Workaround for float reflows limit#3714

Merged
bsweeney merged 2 commits intodompdf:masterfrom
Fl0Cri:reflow-fix
Feb 12, 2026
Merged

Workaround for float reflows limit#3714
bsweeney merged 2 commits intodompdf:masterfrom
Fl0Cri:reflow-fix

Conversation

@Fl0Cri
Copy link
Contributor
@Fl0Cri Fl0Cri commented Feb 4, 2026

As discussed in #3713, related to #620.

Before someone can come up with a real fix (or a proof that this loop-prevention is not needed anymore), this PR resets the static reflows counter on every render.

By the way, users experiencing problems when rendering very large documents can override this limit externally to any absurd value that may suit their needs, for example:

\Dompdf\LineBox::$max_float_reflows = PHP_INT_MAX;

This counter was previously a static local variable, which made it impossible to reset. It could be problematic when generating multiple documents.
This commit is a temporary workaround with minimal side-effects for this specific use case, before a proper fix can be implemented.
@bsweeney bsweeney added this to the 3.1.5 milestone Feb 4, 2026
@bsweeney
Copy link
Member
bsweeney commented Feb 12, 2026

nicely refactored, I appreciate that you made the property public static so users could modify during use and not have to modify the source

@bsweeney bsweeney merged commit 6cba462 into dompdf:master Feb 12, 2026
18 checks passed
@Fl0Cri Fl0Cri deleted the reflow-fix branch March 12, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0