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
___________________________________________________________________________________

Reply via email to