Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PdfReader works fine, reads a simple PDF with fields and correctly identifies every field. I update a field value (see below), and create the filled-out.pdf file. The file is created perfectly but doesn't contain my field value. What's am I doing wrong?
I'm using the example code as follows:
`from pypdf import PdfReader, PdfWriter
reader = PdfReader("form.pdf")
writer = PdfWriter()
page = reader.pages[0]
fields = reader.get_form_text_fields()
writer.add_page(page)
writer.update_page_form_field_values(
writer.pages[0], {"employee_name":"John Smith"} )
with open("filled-out.pdf", "wb") as output_stream:
writer.write(output_stream)`
Beta Was this translation helpful? Give feedback.
All reactions