我有image.want提取具有相同布局的图像数据到docx文件中,并以可读的形式使用python.i。我已经尝试了应用tessaract对图像和转换为pdf使用pyteesaract,然后转换为pdf到word文件,但我无法保持布局和格式。
发布于 2019-12-13 01:12:53
这个问题在in here之前已经回答过了。您可以使用pdf2image库来解决此问题:
from pdf2image import convert_from_path
pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)
pages[0].save("sample.png")https://stackoverflow.com/questions/59309580
复制相似问题