Skip to content

add_page: raise a clear error for a negative duration - #2090

Merged
andersonhc merged 5 commits into
py-pdf:masterfrom
RavSinghChandan:page-duration-negative
Oct 30, 2026
Merged

andersonhc merged 5 commits into
py-pdf:masterfrom
RavSinghChandan:page-duration-negative

Conversation

@RavSinghChandan

Copy link
Copy Markdown

add_page(duration=-1) wrote /Dur -1 into the page, a display duration that has no meaning. It now raises ValueError: 'duration' parameter must be equal or greater than 0, like label_start below 1, before the page is added.

  • 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 3c36077 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