-
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
PdfReader.get_form_text_fields() not returning dropdown fields #391
Comments
if you want to get all the values, instead of .getFormTextFields() you can use the following method after opening the pdf file with PyPDF2.PdfFileReader() : .getFields()
|
I've just added https://github.com/py-pdf/sample-files/tree/main/012-libreoffice-form to confirm the issue |
@akallai I've added a minimal example to your question. Thank you for raising the issue! |
Added /Opt to the checked field_attributes within reader.get_fields Closes #391
Hi I'm running version 3.0.1 and still have the same issue when using get_form_text_fields(), not seeing dropdown data. Was this fix released then removed? Or am I missing something? Thanks Shani |
You need to use
|
@shanimuffin You've discoverd a documentation issue. Would you mind to expand https://pypdf.readthedocs.io/en/latest/user/forms.html which such an example / explanation? |
I have a pdf form with multiple Form-Fields in it. The function "getFormTextFields()" is only returning a dictionary without the dropdown-fields. The dictionary contains the information of all other fields, but the dropdown-fields are simply missing.
Minimal Example
gives
The "Nationality" part is missing.
On the other hand:
The text was updated successfully, but these errors were encountered: