How to extract PDF fields from a filled out form in Python?

后端 未结 6 1101
北恋
北恋 2020-12-02 07:10

I\'m trying to use Python to processes some PDF forms that were filled out and signed using Adobe Acrobat Reader.

I\'ve tried:

  • The pdfminer demo: it di
6条回答
  •  一向
    一向 (楼主)
    2020-12-02 07:33

    The Python PyPDF2 package (successor to pyPdf) is very convenient:

    import PyPDF2
    f = PyPDF2.PdfFileReader('form.pdf')
    ff = f.getFields()
    

    Then ff is a dict that contains all the relevant form information.

提交回复
热议问题