用Python中的PDF从字体细节(样式和大小)中提取文本 [英] Extract Text with its Font Details (Style and Size) from a PDF in Python

查看:1223
本文介绍了用Python中的PDF从字体细节(样式和大小)中提取文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Python中的PDF从字体细节(样式和大小)中提取文本。

我需要读取/解析文本内容,并获取字体细节。请建议。

解决方案

有一个python库。请看PDFMiner。



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

pdftext.py为您提供了从pdf中提取的文本,并且还提供了其他信息,例如字体和字体大小等。

您可以尝试。



注意: Python 3不受支持

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.

解决方案

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

这篇关于用Python中的PDF从字体细节(样式和大小)中提取文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆