我试图使用pdfquery库返回所需的pdf bbox中的文本。在
import pdfquery
pdf = pdfquery.PDFQuery("C:/Users/tyler.cowan/Desktop/PDF Miner/test.pdf")
test = pdf.extract([
('UWI/API', 'LTTextLineHorizontal:in_bbox("35.28,700.56,127.44,717.84")'),
])
print(test)
我首先从返回的页面的左上角定义了bbox
^{pr2}$然后我从页面的左下角定义了bbox,并返回了类似的结果。然后我定义了一个包含整个页面8.5“x11”的bbox,并返回更多的值而不是所有文本。我在“快速入门”下面跟着Documentation时,是否做错了什么。我使用的是python2.7
它在“批量数据抓取”下的页面下面说了这一点:
相关问题 更多 >
编程相关推荐