Skip to content

fix: preserve tables in unbreakable blocks - #2041

Merged
andersonhc merged 2 commits into
py-pdf:masterfrom
alphaZytx:fix/unbreakable-table-replay
Oct 22, 2026
Merged

andersonhc merged 2 commits into
py-pdf:masterfrom
alphaZytx:fix/unbreakable-table-replay

Conversation

@alphaZytx

Copy link
Copy Markdown

Summary

  • teach FPDFRecorder to retain completed table contents for replay
  • prevent tables from disappearing when an unbreakable() block moves to a new page
  • add a regression test comparing automatic relocation with an explicit page break
  • document the fix in the changelog

Fixes #1230.

Validation

  • 101 recorder and table tests passed
  • mypy fpdf/recorder.py: no issues
  • pylint fpdf/recorder.py test/test_recorder.py: 10.00/10
  • Black and git diff --check passed

@alphaZytx
alphaZytx force-pushed the fix/unbreakable-table-replay branch from 906d246 to cbdb911 Compare October 20, 2026 16:24
@andersonhc

Copy link
Copy Markdown
Collaborator

@allcontributors please add @alphaZytx for code

@allcontributors

Copy link
Copy Markdown

@andersonhc

I've put up a pull request to add @alphaZytx! 🎉

@andersonhc
andersonhc merged commit 5b72f6c into py-pdf:master Oct 22, 2026
40 of 42 checks passed
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.

FPDF.unbreakable() drops table instead of adding page break beforehand

2 participants