* how to set the CropBox in MkIV?
@ 2014-02-23 10:20 Sanjoy Mahajan
0 siblings, 0 replies; only message in thread
From: Sanjoy Mahajan @ 2014-02-23 10:20 UTC (permalink / raw)
To: ntg-context
What is the MkIV/LuaTeX way to set the CropBox?
In MkII/PDFTeX, I used
\pdfpagesattr = {/CropBox [54 72 558 720]}
With MkIV, I've tried
\pdfcompresslevel 0
\pdfbackendsetpagesattribute{CropBox}{[54 72 558 720]}
\starttext
\input knuth
\stoptext
but that set the CropBox as a string, and didn't override the A4 setting:
<</Type/Pages /CropBox ([54 72 558 720])/Count 1/Kids[16 0 R]>>
I also tried
\pdfcompresslevel 0
\startluacode
local box = lpdf.array{54, 72, 558, 720}
lpdf.addtopagesattributes("CropBox",box)
\stopluacode
\starttext
\input knuth
\stoptext
and that produced an improved line in the Pages object:
<</Type/Pages /CropBox [ 54 72 558 720 ]/Count 1/Kids[16 0 R]>>
but the actual cropbox for the page is unchanged (A4), probably because
the page object itself (object #16) overrides the CropBox with this:
/CropBox [ 0.0000 0.0000 595.2756 841.8898 ]
(This is all with the 2014.02.14 beta.)
Regards,
-Sanjoy
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-23 10:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-23 10:20 how to set the CropBox in MkIV? Sanjoy Mahajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).