-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsA minimal, complete and verifiable example helps a lot to debug / understand feature requestsis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFworkflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow
Description
I am using the following code to update the form fields with a dictionary:
from PyPDF2 import PdfFileReader, PdfFileWriter
reader = PdfFileReader(open("template_acrobat.pdf", "rb"), strict=False)
writer = PdfFileWriter()
writer.appendPagesFromReader(reader)
writer.updatePageFormFieldValues(writer.pages[0], dictionary_of_values)
with open("pdf_out.pdf", "wb") as f:
writer.write(f)The outputted PDF file does not show any form fields when opened in Adobe Acrobat or Foxit.
Only when we click on a field, the data is shown. Also, It does not show when we print the PDF.
Please refer the attachment:
Open the file in Adobe Acrobat and click on the 'Name' field in the PDF
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsA minimal, complete and verifiable example helps a lot to debug / understand feature requestsis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFworkflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow