从Python的PDF中提取带有其字体详细信息(样式,大小,颜色,斜体等)的文本 [英] Extract Text with its Font Details (Style,Size,color,Italic etc) from a PDF in Python
本文介绍了从Python的PDF中提取带有其字体详细信息(样式,大小,颜色,斜体等)的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望从Python的PDF中提取带有其字体详细信息(样式,大小,颜色,斜体等)的文本.
I am looking to Extract Text with its Font Details (Style,Size,color,Italic etc) from a PDF in Python.
我需要提取文本及其元数据以进行翻译.任何人都可以为它推荐任何库.
I need to extract text and its metadata for translation purpose.Can anyone suggest any libraries for the same.
推荐答案
有一个python库.请看看PDFMiner.
There is a python library for that. Please have a look at PDFMiner.
http://www.unixuser.org/~euske/python/pdfminer/index.html .
pdftext.py为您提供了从pdf中提取的文本,还为您提供了其他信息,例如字体和字体大小等.
pdftext.py gives you the text extracted out of pdf and it also gives you other information like font and font size etc.
您可以尝试.
注意:不支持Python 3
这篇关于从Python的PDF中提取带有其字体详细信息(样式,大小,颜色,斜体等)的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文