Conforming readers are required to support the CropBox and only view that area. So a CropBox is probably the correct thing to use for many cases. I thought I had added Get/Set for all the various boxes on a page - must be in the code that never got checked in :(.
Clipping paths are good things too - but serve a different purpose. Leonard On Oct 23, 2007, at 1:58 PM, Craig Ringer wrote: > Jonathan Sibony wrote: >> Hello, >> >> How do I set a Crop Box? (any painting will take place from that >> point >> only within the new clipping path). > > Do you really want to set the crop box (an attribute of a page, and > really more a hint to a renderer/RIP)? Or do you want to set a > clipping > path for drawing of a content stream? It sounds more like you want the > latter. > > See: > > Pdf Reference, 10.10.1, "Page Boundaries" > > I'm not even sure all renderers will honour the crop box - you'll want > to test that before relying on it instead of a clipping path in the > content stream. Also, the crop box is sometimes constrained to the > media > box - see implementation note 161 in the PDF reference. > > Personally, I'd use a clipping path if I wanted a clipping path, > rather > than using the page crop box. > > As for how to actually set the page's crop box - well, you can > probably > poke at the page dictionary directly if necessary. Extending PdfPage > with appropriate methods wouldn't be too hard or a bad idea though, > and > I'm sure they could be merged into podofo. Have a look at how the > existing media box is set for ideas. > > -- > Craig Ringer > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Podofo-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/podofo-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
