Beispiel #1
0
def get_page_size(infilename):
    # sloppily not closing file here, but that is not important
    mediaBox = PdfFileReader(open(infilename, "rb")).getPage(0).mediaBox
    return (mediaBox.getWidth(), mediaBox.getHeight())