Changes

Jump to navigation Jump to search
1,906 bytes removed ,  19:21, 30 October 2021
corrected and reworked
|MediaBox ||Size of the physical medium (print sheet); this is the page format.
|-
|CropBox ||Page size that is visible in a viewer (fallback for the other boxes, minimally required); this includes the bleed box and all marks for the printshop.
|-
|BleedBox ||Page size plus bleed (cut space); defines the trimmed page plus the bleed.
|-
|TrimBox ||Size of trimmed (cut) page, "final" “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 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
 \definepapersize[TestA][width=100bp,height=200bp]\definepapersize[TestB][width=150bp,height=250bp] \setuppapersize[TestA][TestB] testshowlayout
\stoptext
</texcode>
The <* 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</code> option }} only works with {{code|1=location=middle}} (message otherwise).* You can’t set ArtBox, since nobody seems to need it. ({{cmd|externalfigure}} understands <code>layoutsize=middleart</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 (message otherwisei.e. the size of the sheet)is taken from the second parameter of {{cmd|setuppapersize}}.The offset are accumulative * {{code|1=trimoffset}} specifies the difference between the CropBox and the TrimBox. This parameter seems to be completely ignored, if it is positive.* {{code|1=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 (so crop &lt; trim &lt; bleedpositive){{code|1=trimoffset}} also make no sense.
The default CropBox and TrimBox handling is unchanged, so one really needs to set this when it's needed.The already present interactionscreen cropping is unchanged.==Complete Example==
ConTeXt doesn’t set ArtBox at the moment, since nobody seems to need it.This uses a {{code|1=print}} mode:
=Bugs and Pitfalls=<texcode>\setuppapersize[A5][A5,oversized] % oversized adds 15mm, enough for the crop marks
In a thread on \setuplayout[https://tex.stackexchange.com/questions/370749/how-to-get-correct-pdf-boxes-especially-regarding-bleeding-and-the-trimbox-in tex.stackexchange.com] from 2017-05 location=middle, there are few clarifications by user Marcus C. marking=on, to be integrated here:]
* The parameter {{cmd|setupinteractionscreen}}{{code|1=\startmode[width=max,height=maxprint]}} is necessary for the calculations to be enabled.* {{cmd|setupbackend}}{{code|1=\setuplayout[format=PDF/X-1a:2001]}}, on the other hand, doesn't seem to have any effect. Nice to have, when exporting a PDF file for printing, of course, but not sigificant for the box calculations.* The media size (i.e. the size of the MediaBox) is taken from the second parameter in the command {{cmd|setuppapersize}}. I'm not sure, if that's been a good choice, but anyway: It's the way it's currently done.* The first parameter {{code|1 cropoffset=cropoffset}} specifies the difference in size between the MediaBox and the CropBox. As it is usually suggested that the CropBox should be equal to the TrimBox, this might as well be set to something other than 0, so that MediaBox becomes the biggest "box". However, looking at how the Adobe software handles this, I guess it is expected that the MediaBox and the CropBox are identical. So0mm, I'll set this parameter to 0 mm.% default* Next, the parameter {{code|1 bleedoffset=trimoffset}} specifies the difference between the CropBox and the TrimBox. For achieving correct bleed, this is essential. However, in contrast to the example given (above), this parameter seems to be completely ignored, if it is positive. So3mm, to get any % bleed at all, I'll set this to -3 mm (the value most often used here in Europe).* The parameter {{code|1 trimoffset=bleedoffset}}, then, gives the difference between the TrimBox and the BleedBox-7. And here's a weirdness: Setting this to -3mm yields a BleedBox that's smaller than the TrimBox5mm, which is obviously not correct. The value 0mm yields the same % half of negative size as the TrimBox, which is unusable, as well. Choosing 6mm for {{code|1=bleedoffset}} yields a BleedBox that's bigger than the MediaBox, which doesn't make any sense at all (difference of sheet and should probably be corrected by the compiler, but that's another story).paper]* So, taking all this into account: The correct value should be 3mm. However, trying this exact value yields a PDF file that doesn't have a BleedBox at all. This got me stumped for a while and I suspect it is a bug in the current version. But it is, after all, the only way for achieving something closely resembling the output by Adobe InDesign. And, while this might not be standards-compliant, it should work well in practice.\stopmode
So, here's the complete MWE, just in case anybody else needs it: <texcode>\startnotmode[print]\setuplayout [location=middle, width=middle, height=middle, cropoffset=0mm, trimoffset=-3mm7.5mm,% shrink the visible page to the final paper size
bleedoffset=3mm,
artoffsettrimoffset=0mm,% the TrimBox is influenced by the CropBox
]
\stopnotmode
\setupinteractionscreen[width=max,height=max] \definepapersize[A4plusbleed][width=216mm,height=303mm] \setuppapersize[A4][A4plusbleed]% activate!
\starttext
 \input tufteshowlayout
\stoptext
</texcode>
 
Except for the missing BleedBox, the resulting PDF file is now equivalent to the one created by InDesign.
[[category:PDF]]

Navigation menu