[cairo] Multiple pages in single PDF ?

Ian Britten britten at caris.com
Tue Sep 2 13:49:57 PDT 2008

Behdad Esfahbod wrote:
> rush ta wrote:
>> >From the documentation i understand that it is poosible to read from
>> muliple pages and copy them to a surface..
>> Is it possible to create multiple pages in a single PDF file.
>> I am trying to print a table into PDF file. The content of which may
>> be exceed to 2 pages.
>> Currently i am making another PDF file for storing the exceded data.
>> But its a lame solution i guess... Any help please... ?
> cairo_show_page()

[ I'm assuming you meant cairo_surface_show_page() ... ]

Interesting - This got me thinking about something similar, since
this topic came up...

We often produce large sized output (eg: Desk-sized maps).  Our
rendering mechanism simply renders one 'page', and the user prints
it to their plotter (or printer, etc), which is expected to be big
enough to handle it.

Can any of this Cairo functionality be used so as to cut up a
PDF surface after it's been generated?  Sortof like some final
processing stage, after all the rendering has been done to a single
PDF Surface, but before it's written out to disk?  I really don't
want to have to rework our drawing engine right now to be aware of
multiple pages, but it'd be nice if a large plot could be cut into
smaller pages.  A common use of this is to send the printout to a
cheaper/faster printer, for rough QA, etc.

Yes, I'm aware of fact that separate post-processing tools can
do this sort of work, but they require separate installation and
use (And training!) by the end-user.  I'm just wondering if the
same functionality can be achieved from within the Cairo API.

Thanks for any information!

More information about the cairo mailing list