[cairo] Size of PDF when splitting a PDF surface

Thomas Petazzoni thomas.petazzoni at enix.org
Wed Aug 18 03:45:45 PDT 2010


Hello Chris,

Thanks for the quick feedback.

On Wed, 18 Aug 2010 09:52:21 +0100
Chris Wilson <chris at chris-wilson.co.uk> wrote:

> The way you are generating the split PDF is valid, just Cairo is very
> conservative in what it discards.

Ok.

> Currently it doesn't do any culling on the input geometry, though the
> mechanism are now in place that we could easily enable culling of
> operations that only affect areas outside of the PDF page boundaries.
> If you want to look for yourself, all one needs to do is hook up the
> PDF draw routines to cairo_composite_rectangles_init*() and return
> early if those routines indicate that the operation has zero ink
> extents.

I have absolutely zero knowledge of Cairo internals, so I'm not sure
how to implement this. The Cairo PDF drawing functions in
cairo-pdf-surface.c seem to already be using the
cairo_composite_rectangles_*() API. Could you provide a little bit more
details about what needs to be done ?

Thanks,

Thomas
-- 
Thomas Petazzoni                         http://thomas.enix.org
Promouvoir et défendre le Logiciel Libre http://www.april.org
Logiciels Libres à Toulouse              http://www.toulibre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100818/7c75af28/attachment.pgp>


More information about the cairo mailing list