Skip to content

Instantly share code, notes, and snippets.

@asadamatic
Created March 19, 2020 11:18
Show Gist options
  • Save asadamatic/0eaae285dd7ffc2081e894b34a362da9 to your computer and use it in GitHub Desktop.
Save asadamatic/0eaae285dd7ffc2081e894b34a362da9 to your computer and use it in GitHub Desktop.
Python program to extract data from a specific page of a pdf file. I have used PyPDF2 library for this module.
from PyPDF2 import PdfFileReader
with open('Sommerville-Software-Engineering-10ed.pdf', 'rb') as pdf:
pdfReader = PdfFileReader(pdf)
page = pdfReader.getPage(0)
pageText = page.extractText()
print(pageText)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment