I'm not an expert on the PDF file format but I think that PDF files contains a "/Page" instruction for each page in it, and this is visible even if the file is protected.
Also, there is the "/Type /Pages" instruction that give a "/Count" of the number of pages of the document that is visible even on a protected file too.
So why is the getNumPages method so complicated? What am I missing?
Hi. I'm no longer maintaining pyPdf, but the project has been forked as pyPdf2 and is being maintained under that new name. (https://github.com/knowah/PyPDF2/) Perhaps the new maintainer can help you out.
I'm not an expert on the PDF file format but I think that PDF files contains a "/Page" instruction for each page in it, and this is visible even if the file is protected.
Also, there is the "/Type /Pages" instruction that give a "/Count" of the number of pages of the document that is visible even on a protected file too.
So why is the getNumPages method so complicated? What am I missing?