在Python

时间:2017-03-23 17:40:12

标签: python pypdf2

PDF为https://www.pdf-archive.com/2017/03/22/pdf/

我希望获得一个JSON文件,其中包含:引用,日期,申请人,位置和提案。我的第一个目标是弄清楚如何通过水平线“分割”pdf来提取每个单独的应用程序。

我正在使用PyPDF2

import PyPDF2

pdfFileObj = open('example.pdf','rb') 
pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
pageObj = pdfReader.getPage(0)         
print (pageObj.extractText())
然而,我不能让这种分裂发挥作用。我一直试图让PyPDF2从PDF中打印出它所看到的一切,但也不能这样做。

0 个答案:

没有答案