Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import PyPDF2
  2. path="C:\UsersUserDownloadsWPy64-3720soln.pdf"
  3. text="C:\UsersUserDownloadsWPy64-3720Soln.text"
  4. pdf_file = open(path, 'rb')
  5. text =""
  6. read_pdf = PyPDF2.PdfFileReader(pdf_file)
  7. c = read_pdf.numPages
  8. for i in range(c):
  9. page = read_pdf.getPage(i)
  10. text+=(page.extractText())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement