Skip to content

Instantly share code, notes, and snippets.

@SingAvi
Created October 5, 2018 15:04
Show Gist options
  • Save SingAvi/6e9b270ccbc4fa918e2b9ca1620f4ea8 to your computer and use it in GitHub Desktop.
Save SingAvi/6e9b270ccbc4fa918e2b9ca1620f4ea8 to your computer and use it in GitHub Desktop.
pdf
import PyPDF2
newFile - open('x.pdf','r')
pdfreader = PyPDF2.PdfFileReader(newFile)
print(pdfreader.getNumPages())
pageObj = pdfreader.getPage(0)
x = pageObj.extractText()
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment