How to edit editable pdf using the pdfrw library?

前端 未结 4 1594
说谎
说谎 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条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-18 13:01

    I figure out that if you add NeedAppearances param you will solve your problem:

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

提交回复
热议问题