[cairo] Proposal: cairo_document_t

Kristian Høgsberg krh at bitplanet.net
Mon Dec 6 07:35:57 PST 2004


David Malcolm wrote:
> On Fri, 2004-12-03 at 00:56 -0500, Kristian Høgsberg wrote:
...
>>The API I would like to propose has a function for creating documents
>>for each paginated backend.  For PDF it would be:
>>
>>     cairo_document_t *
>>     cairo_pdf_document_create (FILE	*file,
>>			       double	width_inches,
>>			       double	height_inches,
>>			       double	x_pixels_per_inch,
>>			       double	y_pixels_per_inch);
> 
> Can different pages have different sizes within a document?  What would
> the different backends actually support?  IIRC, XSL:FO allows a document
> to have multiple page sizes within it,  I don't know about PDF and PS
> offhand.

It is possible to have different page have different sizes in PDF, but 
the API I'm suggesting doesn't allow that.  For what it's worth the old 
API didn't allow it either, but it should be fairly easy to add if there 
is consensus that something like that would be useful.

cheers,
Kristian



More information about the cairo mailing list