I try to use PyPDF2 module in Python 3 but I can't display 'Page Size' property. I would like to know what the sheet of paper dimensions were before scanning to PDF file.
Something like this:
import PyPDF2
pdf=PdfFileReader("sample.pdf","rb")
print(pdf.getNumPages())
But I'm looking for another Python function instead of for example getNumPages()...
This command below prints some kind of metadata but without page size:
pdf_info=pdf.getDocumentInfo()
print(pdf_info)
This code should help you: