pdfminer3 extracts text from pdf without spaces

徘徊边缘 提交于 2019-12-11 04:25:51

问题


pdfminer3 is simple tool for extracting text from pdf. While browsing the cite for minimal reproducible example, faced with the problem of spaces missing in extracted text.


回答1:


Solution is to specify laparams next way

from pdfminer3.layout import LAParams
converter = TextConverter(resource_manager, fake_file_handle, laparams=LAParams())


来源:https://stackoverflow.com/questions/58889337/pdfminer3-extracts-text-from-pdf-without-spaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!