我需要从pdf文件中提取文本。
问题是,一些页面的文件是扫描的pdf,而文本无法检索使用PyPDF或PDFMiner。所以文字是空的。
谁能给我一个如何处理的提示?
发布于 2022-02-22 16:33:32
我不认为有一个快速的解决方案来处理Unicode,尤其是日本人。
我们可以采取的解决办法之一是:
import cv2
import pytesseract
from pytesseract import Output
img = cv2.imread('invoice-sample.jpg')
d = pytesseract.image_to_data(img, output_type=Output.DICT)
print(d.keys())关于tesseract,您可以在这篇文章。中找到更多
https://stackoverflow.com/questions/71224718
复制相似问题