Skip to content

text_columns: raise a clear error for a negative gutter - #2088

Merged
andersonhc merged 3 commits into
py-pdf:masterfrom
RavSinghChandan:text-columns-negative-gutter
Oct 30, 2026
Merged

andersonhc merged 3 commits into
py-pdf:masterfrom
RavSinghChandan:text-columns-negative-gutter

Conversation

@RavSinghChandan

Copy link
Copy Markdown

text_columns(ncols=2, gutter=-20) laid out overlapping columns (10-115 and 95-200 on A4), so the text of one column was printed on top of the other. It now raises ValueError: 'gutter' parameter must be equal or greater than 0, like ncols below 1.

  • A unit test is covering the code added / modified by this PR
  • A mention of the change is present in CHANGELOG.md
  • This PR is ready to be merged

@andersonhc
andersonhc merged commit 499f6d2 into py-pdf:master Oct 30, 2026
23 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.

2 participants