Input and compilation/PDF/PDF boxes
< Input and compilation | PDF
Jump to navigation
Jump to search
Basics
While PostScript (and EPS, that is) knows only one kind of page size, defined by the BoundingBox (or HiResBoundingBox), the size of PDF pages can have different meanings – e.g. the visible page, the printed page, the cropped printed page. Therefore the PDF standard defines a set of "boxes":
Name | Meaning |
---|---|
MediaBox | Size of the physical medium (print sheet); this is the page format. |
CropBox | Page size that is visible in a viewer. |
BleedBox | Page size plus bleed (cut space); defines the trimmed page plus the bleed. |
TrimBox | Size of trimmed (cut) page, “final” page size; the net result document format. |
ArtBox | Size of the page content (artwork); might be used for imposition purposes; typically, it can be used to specify any section of the page. |
In PDF/X, if ArtBox is defined at all, it must not differ from TrimBox.
In ConTeXt
\setuppapersize[A5][A5,oversized] \setuplayout [location=middle, cropoffset=0mm,% default trimoffset=-7.5mm,% negative offset from MediaBox to TrimBox bleedoffset=3mm,% bleed size ] \setupinteractionscreen[width=max,height=max] \starttext \showlayout \stoptext
- Unfortunately, the offsets are not independent: If you define a
cropoffset
, you must add its value to the negativetrimoffset
. - It doesn’t work without \setupinteractionscreen.
cropoffset=auto
only works withlocation=middle
(message otherwise).- You can’t set ArtBox, since nobody seems to need it. (\externalfigure understands
size=art
if you need to place a PDF image by its ArtBox.) - \setupbackend is not significant for the box calculations.
- \setupbleeding affects only image placement, but not the BleedBox, see the Template:manual manual.
- MediaBox (i.e. the size of the sheet) is taken from the second parameter of \setuppapersize.
trimoffset
specifies the difference between the CropBox and the TrimBox. This parameter seems to be completely ignored, if it is positive.bleedoffset
defines the difference between the TrimBox and the BleedBox. Negative values yield a BleedBox that’s smaller than the TrimBox, which is against the specs. Values bigger than the (positive)trimoffset
also make no sense.
Complete Example
This uses a print
mode:
\setuppapersize[A5][A5,oversized] % oversized adds 15mm, enough for the crop marks \setuplayout[ location=middle, marking=on, ] \startmode[print] \setuplayout[ cropoffset=0mm,% default bleedoffset=3mm,% bleed trimoffset=-7.5mm,% half of negative size difference of sheet and paper ] \stopmode \startnotmode[print] \setuplayout[ cropoffset=7.5mm,% shrink the visible page to the final paper size bleedoffset=3mm, trimoffset=0mm,% the TrimBox is influenced by the CropBox ] \stopnotmode \setupinteractionscreen[width=max,height=max]% activate! \starttext \showlayout \stoptext