最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Issue with Editable PDF Fields Not Displaying in Adobe Acrobat - Stack Overflow

programmeradmin3浏览0评论

I am filling in editable fields in a PDF file using Python (PyPDF library) and saving the file with the code below. However, when I open the PDF, the filled fields do not appear. If I open the saved file in Google Drive, I can see that the fields remain editable and the information was inserted. However, when opening it in Adobe Acrobat, the data is not displayed.

reader = PdfReader(rdp_modelo)
writer = PdfWriter()

for page in reader.pages:
 writer.add_page(page)

writer.update_page_form_field_values(writer.pages[0], dados_RDP)
writer._flatten()

output_pdf_path = "rdp_preenchido.pdf"
with open(output_pdf_path, "wb") as output_pdf:
 writer.write(output_pdf)
发布评论

评论列表(0)

  1. 暂无评论