text-mine PDF files with Python?
-
16-09-2019 - |
Question
Is there a package/library for python that would allow me to open a PDF, and search the text for certain words?
Solution
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.
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow