next up previous contents index
Next: Encryption and Decryption Up: Pages Previous: Flipping Pages   Contents   Index


Boxes and Cropping

All PDF files contain a media box for each page, giving the dimensions of the paper. To change these dimensions (without altering the page contents in any way), use the -mediabox option.

The four numbers are minimum x, minimum y, width, height. x coordinates increase to the right, y coordinates increase upwards. PDF file can also optionally contain a crop box for each page, defining to what extent the page is cropped before being displayed or printed. A crop box can be set, changed and removed, without affecting the underlying media box. To set or change the crop box use -crop. To remove any existing crop box, use -remove-crop.

Note that the crop box is only obeyed in some viewers.



This operation copies the contents of one box (Media box, Crop box, Trim box etc.) to another. If -mediabox-if-missing is added, the media box will be substituted when the 'from' box is not set for a given page. For example



copies the Trim Box of each page to the Crop Box of each page. The possible boxes are /MediaBox, /CropBox, /BleedBox, /TrimBox, /ArtBox.


next up previous contents index
Next: Encryption and Decryption Up: Pages Previous: Flipping Pages   Contents   Index
root 2014-11-28