From wikinotes
Encoding/Manipulation
ghostscript | CLI utility for ps/pdf manipulation | |
pypdf | python module for pdf authoring/manipulation |
File Format
PDFs are composed of boxes, ....
Boxes
mediabox The largest dimension - contains all crop-marks etc for printing. cropbox Where the page should be clipped (in pdf viewer/when printed) bleedbox Where the printed material should be clipped (generally slightly larger than cropbox for print) trimbox The actual width/height artbox seldom used, allows you to crop small componenents from a pdf for printing.