Skip to content

Commit

Permalink
DOC: Use append instead of add_page
Browse files Browse the repository at this point in the history
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 #1790
Closes #1792
Closes #1804
  • Loading branch information
neversphere authored Apr 23, 2023
1 parent 914c43e commit 190b4dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/user/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ writer = PdfWriter()
page = reader.pages[0]
fields = reader.get_fields()

writer.add_page(page)
writer.append(reader)

writer.update_page_form_field_values(
writer.pages[0], {"fieldname": "some filled in text"}
Expand Down

0 comments on commit 190b4dc

Please sign in to comment.