Skip to content

set_stretching: raise a clear error for a stretching that is not posi… - #2082

Merged
andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:stretching-non-positive
Oct 29, 2026
Merged

andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:stretching-non-positive

Conversation

@RavSinghChandan

Copy link
Copy Markdown

set_stretching(0) or a negative value gave text no width: justified text from multi_cell(align="J") was all put on a single line, and other text raised an unrelated Not enough horizontal space to render a single character error. It now raises ValueError: Stretching must be a positive number.

  • 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 efbe4e1 into py-pdf:master Oct 29, 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.

2 participants