Re: [NTG-context] /CropBox overflows /MediaBox
On 3/2/23 00:20, Hans Hagen wrote:
On 2/28/2023 6:23 PM, Pablo Rodriguez via ntg-context wrote:
[...] I only see one size. Anyway, attached a fix for the different rounding.
Sorry, Hans, I copied the wrong sample (value for "width" in "\setupinteractionscreen" should read "fit" instead of "max"): \nopdfcompression \setupinteractionscreen [width=fit] \setuplayout [standard] [backspace=.7\textwidth, cutspace=\cutspace, width=middle] \starttext \startmakeup[page] \null \stopmakeup \startmakeup[standard] \null \stopmakeup \stoptext Here are the boxes (using current latest from today [2023.03.06 14:48]): 3 0 obj [ 0 0 595.275590072 841.88975789 ] endobj 7 0 obj [ 0 0 968.199847496 841.88975789 ] endobj Page 1 (object 4) uses object 3 as /CropBox, /MediaBox and /TrimBox. Page 2 (object 7) uses object 3 as /MediaBox and object 7 as /CropBox and /TrimBox (I have just discovered it). I think it is better to avoid having a page with a /CropBox larger than its /MediaBox. But I’m afraid that it is wrong to have a /TrimBox larger than the /MediaBox for the same page. I hope it is clear now. Sorry for the mistake in copying the wrong sample. Many thanks for your help, Pablo
On 3/6/2023 7:02 PM, Pablo Rodriguez via ntg-context wrote:
But I’m afraid that it is wrong to have a /TrimBox larger than the /MediaBox for the same page.
Afaik the standard permits is to one gets what one asks. I will add some checks plus a warning and hopefully not break something. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 3/6/23 23:06, Hans Hagen via ntg-context wrote:
On 3/6/2023 7:02 PM, Pablo Rodriguez via ntg-context wrote:
But I’m afraid that it is wrong to have a /TrimBox larger than the /MediaBox for the same page.
Afaik the standard permits is to one gets what one asks. I will add some checks plus a warning and hopefully not break something.
Many thanks for the check that avoids this issue. As for the specification in re with boxes larger than the media box: In theory, trim and crop boxes may be larger than the media box. But the specification also warns that in that case, “they [would be] effectively reduced to their intersection with the media box” In practice, I see that as an issue of logical consistence. I don’t see a way of cropping or trimming an A5 page inside the boundaries of an A3 page. Of course, I may be missing something, but I see crop and trim as synonyms for cut or reduce. Many thanks again for your help, Pablo
participants (2)
-
Hans Hagen
-
Pablo Rodriguez