Cropping pages of a .pdf file
pyPdf does what I expect in this area. Using the following script: #!/usr/bin/python # from pyPdf import PdfFileWriter, PdfFileReader with open(“in.pdf”, “rb”) as in_f: input1 = PdfFileReader(in_f) output = PdfFileWriter() numPages = input1.getNumPages() print “document has %s pages.” % numPages for i in range(numPages): page = input1.getPage(i) print page.mediaBox.getUpperRight_x(), page.mediaBox.getUpperRight_y() page.trimBox.lowerLeft = (25, 25) page.trimBox.upperRight … Read more