How to edit editable pdf using the pdfrw library?

前端 未结 4 1592
说谎
说谎 2020-12-18 12:05

I been doing research on how to edit PDF using Python and i have found this article:
How to Populate Fillable PDF\'s with Python

However there is a problem on

4条回答
  •  -上瘾入骨i
    2020-12-18 13:02

    To expand on Sergio's answer above, the following line:

    template_pdf.Root.AcroForm.update(pdfrw.PdfDict(NeedAppearances=pdfrw.PdfObject('true')))
    

    Should be put after this line in the example code from OP:

    template_pdf = pdfrw.PdfReader(input_pdf_path)
    

提交回复
热议问题