Next: PNG Support, Previous: Image Surfaces, Up: Top [Index]
Rendering PDF documents
The PDF surface is used to render cairo graphics to Adobe PDF files and is a multi-page vector surface backend.
<double>
) (height-in-points <double>
) [(filename <char>
)] ⇒ (ret <cairo-surface-t >
)Creates a PDF surface of the specified size in points to be written to filename. If filename is not given, the output is sent to the current output port.
a filename for the PDF output (must be writable), ‘#f
’ may
be used to specify no output. This will generate a PDF surface that may
be queried and used as a source, without generating a temporary file.
width of the surface, in points (1 point == 1/72.0 inch)
height of the surface, in points (1 point == 1/72.0 inch)
a pointer to the newly created surface. The caller owns the surface and
should call cairo-surface-destroy
when done with it. This
function always returns a valid pointer, but it will return a pointer to
a "nil" surface if an error such as out of memory occurs. You can use
cairo-surface-status
to check for this.
Since 1.2
<cairo-pdf-version-t const*>
) (num-versions <int>
)Used to retrieve the list of supported versions. See
cairo-pdf-surface-restrict-to-version
.
supported version list
list length
Since 1.10
<cairo-surface-t>
) (width-in-points <double>
) (height-in-points <double>
)Changes the size of a PDF surface for the current (and subsequent) pages.
This function should only be called before any drawing operations have
been performed on the current page. The simplest way to do this is to
call this function immediately after creating the surface or immediately
after completing a page with either cairo-show-page
or
cairo-copy-page
.
a PDF <cairo-surface-t>
new surface width, in points (1 point == 1/72.0 inch)
new surface height, in points (1 point == 1/72.0 inch)
Since 1.2
Next: PNG Support, Previous: Image Surfaces, Up: Top [Index]