text-mine PDF files with Python?

后端 未结 2 1352
灰色年华
灰色年华 2021-01-03 04:34

Is there a package/library for python that would allow me to open a PDF, and search the text for certain words?

相关标签:
2条回答
  • 2021-01-03 05:11

    Using PyPdf2 you can use extractText() method to extract pdf text and work on it.

    Update: Changed text to refer to PyPdf2, thanks to @Aditya Kumar for heads up.

    0 讨论(0)
  • 2021-01-03 05:29

    I don't think you can do it in one step, but you can certainly get the text out of a pdf with pdfminer. Then you can apply whatever text search to that recovered data.

    0 讨论(0)
提交回复
热议问题