-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simply duplicate fillable pdf but can't get fields() from the new one. #1792
Comments
PyPDF2 is deprecated. Use pypdf. |
Thanks for the quick reply, I've tried both pypdf, pypdf2, it doesn't matter which version. Both versions produce the same results.
|
fields are part of the PDF structure not pages. try |
That is not the point. When you use deprecated software you cannot expect any support. Development will continue with |
The sample code in the docs doesn't mention this (https://pypdf.readthedocs.io/en/stable/user/forms.html?highlight=Interactions%20with%20PDF%20Forms). Does it need to be updated? |
Adding some information there is certainly a good idea! Do you want to open a PR @neversphere ? 😇 |
I just simply duplicate fillable pdf form using
PdfWriter.add_page
. After that I open the new one withPdfReader
. Now the new pdf return None fromreader.get_fields()
reader.get_fields()
writer.update_page_form_field_values(writer.pages[0], {})
before saving)Environment
Which environment were you using when you encountered the problem?
Code + PDF
This is a minimal, complete example that shows the issue:
pdf: https://cdn.discordapp.com/attachments/1082352569973751868/1096945829291503676/jt32.pdf
Share here the PDF file(s) that cause the issue. The smaller they are, the
better. Let us know if we may add them to our tests!
Traceback
This is the complete Traceback I see:
Noting error !!
The text was updated successfully, but these errors were encountered: