-
Hi, I'm just trying to write some text into an already existing form field (widget). I was able to identify the widget by its xref, and read its contents, but I don't know how to modify its field_value and save it back. I've tried with different combinations of page.add_widget as you can see below, but without success. Thanks in advance for your help. This is the content of the widget, and below is my code: #My Code doc = fitz.open('Loan01.pdf') for i,field in enumerate(page.widgets()): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This should do it: field.field_value = "Mary"
field.update() About the only thing you didn't try, right 😉? |
Beta Was this translation helpful? Give feedback.
This should do it:
About the only thing you didn't try, right 😉?