import PyPDF2 pdfFileObj = open('pdf-and-word\meetingminutes.pdf', 'rb') pdfReader = PyPDF2.PdfReader(pdfFileObj) print(len(pdfReader.pages))