How to extract text from a Specific Area in a PDF using Python?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 09:50:48

This is a rather complex topic, but it is possible. First you need to get familiar with the pdf format descripton.

Start here for example.

You can identify the location and contents of the text boxes and extract the string data.

This topic holds examples for pyPdf, the previous version of PyPDF2, but syntax is similar. There are examples on how to iterate through the indirect objects.

A good place to start is also the source of the function pageObj.extractText() that you used.

If you are not restricted to Python: How to extract text from a PDF?

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