С PyMuPDF:
>>> import fitz >>> doc = fitz.open("example.pdf") >>> page = doc.loadPage(0) >>> print(page.MediaBox) Rect(0.0, 0.0, 595.0, 842.0) #format is (0.0, 0.0, width, height) if page is not rotated