maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] Re: [cairo] Size of PDF when splitting a PDF surface


From: Arjen Nienhuis
Subject: [Maposmatic-dev] Re: [cairo] Size of PDF when splitting a PDF surface
Date: Wed, 18 Aug 2010 12:19:10 +0200

On Wed, Aug 18, 2010 at 10:52 AM, Chris Wilson <address@hidden> wrote:
> On Wed, 18 Aug 2010 10:29:52 +0200, Thomas Petazzoni <address@hidden> wrote:
>> Is our way of extracting parts of a surface into another surface
>> incorrect ? Is there a way of making sure that Cairo includes only once
>> in the final PDF the contents of the original surface ?
>
> The way you are generating the split PDF is valid, just Cairo is very
> conservative in what it discards. 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.

Cairo could also reuse the same group on different pages. I think
iText does that if a 'watermark' is printed on each page.

iText might be the right tool for this job.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]