开发者

pdf file with python

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜