Skip to content

Changes - #5138

Open
JorjMcKie wants to merge 1 commit into
mainfrom
widget-updates
Open

Changes#5138
JorjMcKie wants to merge 1 commit into
mainfrom
widget-updates

Conversation

@JorjMcKie

Copy link
Copy Markdown
Collaborator

The new test script required significant changes in PyMuPDF's widget handling.

  1. Method Page.add_widget(widget): better coverage for creating / extending Radio Button Groups and corresponding RB widgets.
  2. Method Page.delete_widget(widget): no changes, turned out to be good enough
  3. Function JM_set_widget_properties(annot, Widget): major changes -
    • Full support for updating Radio Button Groups which adhere to the standard, recommended /Kids ⇆ /Parent relationship structure. Other RBG variants are still not supported; these are
      • RBGs defined via JavaScript code (i.e. zero PDF structure)
      • RBGs defined implicitly by the name equality of multiple singleton RB widgets.
      • "No supports" here means that we do not even detect these cases.
    • Full support for updating widgets having a /Parent. In essence, we no longer change field-only properties (like field_name or field_flags) on Widget.update() if the widget has a /Parent.
      • Note that we now always ensure a /Parent (as the actual field) when creating widgets.
      • The /Kids ⇆ /Parent is essential for defining field hierarchies and Widget aliases.

@JorjMcKie
JorjMcKie force-pushed the widget-updates branch 2 times, most recently from ebf5317 to f222b54 Compare September 24, 2026 16:13
* One test had to be changed (test_2333) because of improved RBG handling.
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.

1 participant