Created
January 11, 2021 05:39
-
-
Save haider11234/3dc9035e2015a857b76fc841ba802afe to your computer and use it in GitHub Desktop.
This file contains 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
# importing required modules | |
import PyPDF2 | |
# creating a pdf file object | |
pdfFileObj = open('file.pdf', 'rb') | |
# creating a pdf reader object | |
pdfReader = PyPDF2.PdfFileReader(pdfFileObj) | |
# printing number of pages in pdf file | |
print(pdfReader.numPages) | |
# closing the pdf file object | |
pdfFileObj.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment