Skip to content

Commit

Permalink
DOC: get_form_text_fields does not extract dropdown data (#1029)
Browse files Browse the repository at this point in the history
See #391
  • Loading branch information
MartinThoma committed Jun 26, 2022
1 parent 595739f commit a40946c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion PyPDF2/_reader.py
Expand Up @@ -560,7 +560,15 @@ def _write_field(self, fileobj: Any, field: Any, field_attributes: Any) -> None:
pass

def get_form_text_fields(self) -> Dict[str, Any]:
"""Retrieves form fields from the document with textual data (inputs, dropdowns)"""
"""
Retrieves form fields from the document with textual data.
The key is the name of the form field, the value is the content of the
field.
If the document contains multiple form fields with the same name, the
second and following will get the suffix _2, _3, ...
"""
# Retrieve document form fields
formfields = self.get_fields()
if formfields is None:
Expand Down
2 changes: 1 addition & 1 deletion sample-files

0 comments on commit a40946c

Please sign in to comment.