Open main menu

Changes

1,441 bytes added ,  19:21, 30 October 2021
corrected and reworked
< [[PDFX|PDF/X]] | [[PDF/A]] >=Basics=
==Basics==[[File:page-boxes.png|350px|thumb|PDF Boxes]]
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":
{| class=wikitable
! Meaning
|-
|CropBox MediaBox ||Page size that Size of the physical medium (print sheet); this is visible in a viewer (fallback for the other boxes, minimally required)page format.
|-
|BleedBox CropBox ||Page size plus bleed (cut space)that is visible in a viewer.
|-
|TrimBox BleedBox ||Size of trimmed Page size plus bleed (cutspace) ; defines the trimmed page, "final" page sizeplus the bleed.
|-
|MediaBox TrimBox ||Size of the physical medium trimmed (print sheetcut)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 [[PDFX|PDF/X]], if ArtBox is defined at all, it must not differ from TrimBox.
==In ConTeXt== End of August 2015 ConTeXt got the necessary setup keys to define these boxes (minimal example by Hans):
<texcode>
\showframesetuppapersize[A5][A5,oversized]
\setuplayout
[location=middle,
width=middle, height=middle, cropoffset=auto0mm,% default trimoffset=1bp-7.5mm,% negative offset from MediaBox to TrimBox bleedoffset=2bp3mm,% bleed size
]
\setupinteractionscreen[width=max,height=max]
\starttext
\showlayout
\stoptext
</texcode>
\definepapersize[TestA][width* Unfortunately, the offsets are not independent: If you define a {{code|1=cropoffset}}, you must add its value to the negative {{code|1=trimoffset}}.* It doesn’t work without {{cmd|setupinteractionscreen}}.* {{code|1=cropoffset=auto}} only works with {{code|1=location=100bpmiddle}} (message otherwise).* You can’t set ArtBox,heightsince nobody seems to need it. ({{cmd|externalfigure}} understands <code>size=200bp]art</code> if you need to place a PDF image by its ArtBox.)* {{cmd|setupbackend}} is ''not'' significant for the box calculations.* {{cmd|setupbleeding}} affects only image placement, but not the BleedBox, see the {{manual|details}} manual.* MediaBox (i.e. the size of the sheet) is taken from the second parameter of {{cmd|setuppapersize}}.* {{code|1=trimoffset}} specifies the difference between the CropBox and the TrimBox. This parameter seems to be completely ignored, if it is positive.\definepapersize[TestB][width* {{code|1=150bpbleedoffset}} defines the difference between the TrimBox and the BleedBox. Negative values yield a BleedBox that’s smaller than the TrimBox,heightwhich is against the specs. Values bigger than the (positive) {{code|1=250bp]trimoffset}} also make no sense.
\setuppapersize[TestA][TestB]==Complete Example==
testThis uses a {{code|1=print}} mode: <texcode>\setuppapersize[A5][A5,oversized] % oversized adds 15mm, enough for the crop marks \setuplayout[ location=middle, marking=on,]
\stoptextstartmode[print]</texcode>\setuplayout[ cropoffset=0mm,% default bleedoffset=3mm,% bleed trimoffset=-7.5mm,% half of negative size difference of sheet and paper]\stopmode
The <code>auto</code> option only works with <code>layout\startnotmode[print]\setuplayout[ cropoffset=middle</code> (message otherwise)7.5mm,% shrink the visible page to the final paper size bleedoffset=3mm, trimoffset=0mm,% the TrimBox is influenced by the CropBox]The offset are accumulative (so crop &lt; trim &lt; bleed).\stopnotmode
The default CropBox and TrimBox handling is unchanged\setupinteractionscreen[width=max, so one really needs to set this when it's needed.The already present interactionscreen cropping is unchanged.height=max]% activate!
ConTeXt doesn’t set ArtBox at the moment, since nobody seems to need it.\starttext\showlayout\stoptext</texcode>
[[category:PDF]]