You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a script to automatically fill out the 'Nr' field in a timesheet form.
The forms are digitally signed before they get a number.
When updating the 'Nr' field using writer.update_page_form_field_values() the signed signature field gets deleted.
Another signature field, which has not been signed at this point, has the expected behaviour.
This happened only when using:
writer.append(reader,[0])
Before I had the issue that all radio buttons were deleted but the signature was not.
This happend when using:
page=self._reader.pages[0]
writer.add_page(page)
Environment
Which environment were you using when you encountered the problem?
Update docs to use append rather than add_page so that the PDF structure is copied. This ensures the form structure is kept which is necessary for some PDFs.
See #1790Closes#1792Closes#1804
@neversphere Thanks for the reply, I tested your suggestion and the signed signature field and radio buttons stay intact.
But this still raises another problem because now the unsigned signature field gets deleted from the form
Seems like there are still issues copying the original structure of the pdf
I am developing a script to automatically fill out the 'Nr' field in a timesheet form.
The forms are digitally signed before they get a number.
When updating the 'Nr' field using writer.update_page_form_field_values() the signed signature field gets deleted.
Another signature field, which has not been signed at this point, has the expected behaviour.
This happened only when using:
Before I had the issue that all radio buttons were deleted but the signature was not.
This happend when using:
Environment
Which environment were you using when you encountered the problem?
$ python -m platform Windows-10-10.0.19045-SP0 $ python -c "import Pydf2;print(pypdf.__version__)" 3.0.1
Code + PDF
This is a minimal, complete example that shows the issue:
This is the form that is used. I just deleted personal informations from the form:
v2 - unsigned.pdf
This is the signed form:
v2 - signed.pdf
And this is the file after updating the form field:
v2 - after updating.pdf
The text was updated successfully, but these errors were encountered: