无法从python中的PDF中提取表单数据

时间:2020-04-29 13:49:41

标签: python pdf pypdf2

我有一个pdf文件,我需要提取python中表格的内容。我已经尝试了每个python的pdf库,但返回的是空值或错误“ TypeError:'NoneType'对象不可迭代”

我尝试过

pdf_reader = PdfFileReader(open(path, "rb"))

dictionary = pdf_reader.getFormTextFields()

如果我使用:

    pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
    pageObj = pdfReader.getPage(0)
    text = pageObj.extractText()

我得到所有字段名,但没有输入。

这是我正在使用的PDF的链接: https://drive.google.com/file/d/1gZ7y4fuPVJnQw8tq1caky_wLNRrKVu8y/view?usp=sharing

0 个答案:

没有答案