File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -430,3 +430,20 @@ def test_4055():
430430 # Round 5: final check: setting to "Yes" also does work
431431 for w in page .widgets (types = [2 ]):
432432 assert w .field_value == w .on_state ()
433+
434+
435+ def test_4965 ():
436+ path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_4965.pdf' )
437+ with pymupdf .open (path ) as document :
438+ for page in document :
439+ print (f'test_4965(): { page .number = } ' )
440+ # Iterate over all form fields (widgets) on the page
441+ for widget_i , field in enumerate (page .widgets ()):
442+ # Access field properties
443+ name = field .field_name # The internal name of the field
444+ value = field .field_value # The data currently in the field
445+ f_type = field .field_type # Integer representing the field type
446+ print (f' { widget_i = } ' )
447+ print (f' { name = } ' )
448+ print (f' { value = } ' )
449+ print (f' { f_type = } ' )
You can’t perform that action at this time.
0 commit comments