我正在运行一个脚本,它使用pdfminer来拆分页面并逐页分析文档。我的脚本一页一页地写着: from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter text = retstr.getvalue() 然而,有时我得到的pdf是基于图像
Python库pdfminer.six允许您使用command line tool从pdf中提取图像,但这似乎不是很灵活。它还允许您使用extract_pages API迭代文档中的元素,并检查项目是否为pdfminer.layout.LTFigure类型。figures = []
for element in page_layout:
i
我需要从pdf文件中提取文本,并成功地使用了pdfminer.six,提取文本段落和表格。软件包pdfmin.Six-20181108 我使用的代码是基于这个的:How to read pdf file using pdfminer3k?然后,基于下面的网页,我认为值得尝试拆分PDFparser,PDFDocument: from pdfminer.pdfparser import PDFParse