Changes

Jump to navigation Jump to search
3,112 bytes added ,  08:12, 14 June 2017
Add hints from texexchange thread (bugs to be fixed)
ConTeXt doesn’t set ArtBox at the moment, since nobody seems to need it.
 
==Bugs and Pitfalls==
 
In a thread on [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, there are few clarifications by user Marcus C., to be integrated here:
 
* The parameter {{cmd|setupinteractionscreen}}{{code|1=[width=max,height=max]}} is necessary for the calculations to be enabled.
* {{cmd|setupbackend}}{{code|1=[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}} 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. So, I'll set this parameter to 0 mm.
* Next, the parameter {{code|1=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. So, 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=bleedoffset}}, then, gives the difference between the TrimBox and the BleedBox. And here's a weirdness: Setting this to -3mm yields a BleedBox that's smaller than the TrimBox, which is obviously not correct. The value 0mm yields the same 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 (and should probably be corrected by the compiler, but that's another story).
* 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.
 
So, here's the complete MWE, just in case anybody else needs it:
 
<texcode>
\setuplayout
[location=middle,
width=middle,
height=middle,
cropoffset=0mm,
trimoffset=-3mm,
bleedoffset=3mm,
artoffset=0mm
]
 
\setupinteractionscreen[width=max,height=max]
 
\definepapersize[A4plusbleed][width=216mm,height=303mm]
 
\setuppapersize[A4][A4plusbleed]
 
\starttext
 
\input tufte
 
\stoptext
</texcode>
 
Except for the missing BleedBox, the resulting PDF file is now equivalent to the one created by InDesign.
[[category:PDF]]

Navigation menu