[Dev-luatex] problems with the mediabox

Peter Rolf indiego at gmx.net
Fri Sep 18 15:18:33 CEST 2009


Peter Rolf schrieb:
> Hi,
>
> I still have preflighting problems with the mediabox of luatex. It's 
> accuracy is sufficient for printing, but using the values for a 
> preflight is troublesome.
> An example: if I define a A4+ paper (303mm x 216mm) I get a mediabox 
> of 303.0mm x 215.999mm. Hans has already restricted the trailing 
> numbers of the trimbox/cropbox values in ConTeXt to adapt the accuracy 
> (else rounding of the mediabox can lead to a bigger trim|cropbox, 
> which is against definition). Anyhow, this is not enough for this 
> example:
>
> MediaBox (mm): 303.0x215.999 (0.0/0.0/303.0/215.999)
> CropBox  (mm): 303.0x216.0   (0.0/0.0/303.0/216.0  )
> TrimBox  (mm): 303.0x216.0   (0.0/0.0/303.0/216.0  )
>
> MediaBox < CropBox|TrimBox
>
> So using the same number of digits after the point (%.3f) does not 
> solve the problem.

oops, actually it's %.4f


>
> Setting the width to 216.001mm in this example helps, but this is 
> unsatisfying.
>
> MediaBox (mm): 303.0x216.0023  (0.0/0.0/303.0/216.0023 )
> CropBox  (mm): 303.0x216.00101 (0.0/0.0/303.0/216.00101)
> TrimBox  (mm): 303.0x216.00101 (0.0/0.0/303.0/216.00101)
>
> If you use some bleeding offset (in the A4+ example normally 3mm on 
> each side) the problem vanishes. But for PDF/X you have to set the 
> crop-|trimbox anyway, regardless if you use a bleeding offset or not.
>
>
> Possible solutions:
> - read access to the mediabox values, so that rounding errors can be 
> handled
> - use the same calculation routine for all pdf boxes (e.g. a luatex 
> library function)
> - ??
>
> Any comments are welcome.
>
>
> Best wishes,  Peter
>
> _______________________________________________
> dev-luatex mailing list
> dev-luatex at ntg.nl
> http://www.ntg.nl/mailman/listinfo/dev-luatex
>



More information about the dev-luatex mailing list