Created
January 15, 2019 18:47
-
-
Save olivx/5bedb32c29e88d5affb97ecec5566976 to your computer and use it in GitHub Desktop.
extract text from pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pdfReader = PyPDF2.PdfFileReader(absolute_file_name) | |
num_pages = pdfReader.numPages | |
count = 0 | |
text_from_pdf = "" | |
while count < num_pages: | |
pageObj = pdfReader.getPage(count) | |
count +=1 | |
text_from_pdf += pageObj.extractText() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment