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>) ⇒ (ret
Creates a PDF surface of the specified size in points to be written to filename.
- 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-destroywhen 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-statusto check for this.
<cairo-pdf-version-t const*>) (num-versions
Used to retrieve the list of supported versions. See
- supported version list
- list length
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
- a PDF
- new surface width, in points (1 point == 1/72.0 inch)
- new surface height, in points (1 point == 1/72.0 inch)