我使用PyPdf从pdf文件中读取文本。然而,pyPDF不逐行读取文本,它的读取方式有些随意。把新的线,当它甚至不存在于pdf。import PyPDF2pdfFileObj = open(pdf_path, '2021 Date Received: 10/12/2021
Last Paid: Amt Last Paid: A/C
我使用的是pdf水管工,它工作得很好,唯一的问题是这样的pdfs通常包含列,而且我的算法还没有找到识别这一点的方法。我的代码是:with pdfplumber.open(r'example.pdf') as pdf: for i, pg inenumerate(pages):
text = text + " &qu