Extract Text with its Font Details (Style and Size) from a PDF in Python [closed]

筅森魡賤 提交于 2019-12-12 11:08:47

问题


I am looking to Extract Text with its Font Details (Style and Size) from a PDF in Python.

I need to read/parse the text content and also get the font details. Please suggest.


回答1:


There is a python library for that. Please have a look at PDFMiner.

http://www.unixuser.org/~euske/python/pdfminer/index.html.

pdftext.py gives you the text extracted out of pdf and it also gives you other information like font and font size etc.

You can try that.

Note: Python 3 is not supported



来源:https://stackoverflow.com/questions/21926762/extract-text-with-its-font-details-style-and-size-from-a-pdf-in-python

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