If one has, for example, a pdf with the wrong page size specified one can crop away the unwanted portions of the document with ghostscript and the command parameter /CropBox
. My question is, what do the numbers in the command refer to? I know they are point units (72nds of an inch) but what are their origins and axes?
By dint of trail and error from this example I've come up with following to keep an area approximately 6"x4" from the top left corner of a 11"x8.5" page (example source pdf). I'd like to do the math though and get my numbers precise instead of approximate (my final page needs to be landscape A6, 5.83"x4.13").
gswin64c ^
-o fixed-A6.pdf ^
-sDEVICE=pdfwrite ^
-c "[/CropBox [0 315 420 610] /PAGES pdfmark" ^
-f landscape-letter-size.pdf
Also, are the brackets [ ]
supposed to be unbalanced? The opening [/Crop...
doesn't have a corresponding close.