Documentation ¶
Overview ¶
Package pdf implements the PDF backend for libcairo rendering.
Libcairo must be compiled with
CAIRO_HAS_PDF_SURFACE
in addition to the requirements of cairo.
Index ¶
Constants ¶
const ( //Version1_4 is the version 1.4 of the PDF specification. Version1_4 version = C.CAIRO_PDF_VERSION_1_4 //Version1_5 is the version 1.5 of the PDF specification. Version1_5 version = C.CAIRO_PDF_VERSION_1_5 )
The version type describes the version number of the PDF specification that a generated PDF file will conform to.
Originally cairo_pdf_version_t.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Surface ¶
type Surface struct {
cairo.XtensionPagedVectorSurface
}
Surface is a PDF surface.
Surface implements cairo.PagedVectorSurface.
func New ¶
New creates a new PDF of the specified size. W is the Writer the PDF is written to. Width and height are in the unit of a typographical point (1 point = 1/72 inch).
Originally cairo_pdf_surface_create_for_stream.
func (Surface) RestrictTo ¶
RestrictTo restricts the generated PDF to the specified verison.
This method should only be called before any drawing operations have been performed on this surface.
Originally cairo_pdf_surface_restrict_to_version.