开发者

pdf file with python

开发者 https://www.devze.com 2023-02-16 05:27 出处:网络
How can search a word or a line in a pdf file? Is t开发者_C百科here an existing module to do that by being concise?

How can search a word or a line in a pdf file?

Is t开发者_C百科here an existing module to do that by being concise?

Thank you in advance,


There's something called as pyPDF.
It is a Pure-Python library built as a PDF toolkit.

You can extract ( using extractText() method ) & also perform search on the pdf file with using something like following code.

pdf = pyPdf.PdfFileReader(file(path, "rb"))
content = pdf.getPage(1).extractText()
0

精彩评论

暂无评论...
验证码 换一张
取 消