Skip to content

PPF-2056: Accept integer coordinates wherever numeric geometry is supported #2056

Closed

Description

@chinapandaman

Version

Reviewed baseline: PyPDFForm 6.0.0, commit 0b5cc1dc8604b36693864852d76ed7e60f903451.

Issue Description

At the reviewed snapshot, assigning pdf.widgets["test"].x = 123 changed the live value, but reopening the PDF still returned the old coordinate (73.3365 in the review probe). The geometry hooks accepted actual floats while silently ignoring equivalent integer inputs.

Work

Correct the geometry hooks in PyPDFForm/lib/hooks.py so accepted integer coordinates are normalized and serialized like equivalent floats. Apply the change consistently to relevant coordinate and dimension properties, including supported per-option geometry.

Acceptance Criteria

  • Setting x = 123 changes the reopened field to 123; equivalent integer and float inputs agree. Invalid types fail without silently retaining the old geometry.

Basis and Dependencies

R10. Keep this focused on the documented numeric API; broader geometry validation belongs to E4-01.

Source and Validation

Action E1-03, Group 1 — Lowest-hanging fruit, from the October 10, 2026 action plan; supporting review evidence. Related action identifiers refer to that plan.

The behavior above is evidence from the source review, not a new reproduction performed when filing this issue. Reconfirm the relevant baseline or document intervening changes before implementation. Follow the plan's completion and validation rules and the Developer Guide, including meaningful regression assertions for behavior changes.

Activity

  1. changed the title [-]Accept integer coordinates wherever numeric geometry is supported[/-] [+]PPF-2056: Accept integer coordinates wherever numeric geometry is supported[/+] on Oct 11, 2026
  2. moved this from Backlog to In progress in PyPDFForm-support-2026on Oct 11, 2026
  3. moved this from In progress to In review in PyPDFForm-support-2026on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions