[cairo] Clipping on PDF surfaces

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Sat Feb 6 11:01:44 PST 2010


Hi,

On Sat, 06 Feb 2010 19:43:50 +0100
Pascal Germroth <funkycoder at gmail.com> wrote:
>I wrote a small program to emulate psposter's behaviour for PDF (split
>up a page into several smaller ones), using poppler and cairo.
>
>It works as expected, but the output PDF is a multiple of the input
>file's size (the full size of the input for every output file).

In your case, the most part of PDF is consumed by vevtor
graphics? text? raster image?

>I would like cairo to check, if the bounding rectangle of the path to be
>drawn intersects with the bounding rectangle of the clip path -- and
>only draw the path if there's a possibility it might be visible.
>This should not be too complicated, the actual clipping of the geometry
>can still be done by the PDF renderer. It would reduce the size of my
>outpout files drastically though.

I wish similar feature in poppler or cairo. When I make a
trimmed fragment from large scanned image in PDF by poppler's
cairo output, the "fragment" includes whole image data and 
clipping information. However, Adobe Acrobat's trimming feature
is same, so I should not call it as a disadvantage of poppler.

I've ever tried to write a patch to poppler and tested
very very simple case, but now I don't have sufficient
time to polish it up...

Regards,
mpsuzuki


More information about the cairo mailing list