pdf

package
v0.0.0-...-1fae4d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 4 Imported by: 0

README

#pdf GoDoc Package pdf implements the PDF backend for libcairo rendering.

Download:

go get github.com/jimmyfrasche/cairo/pdf

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.


Automatically generated by autoreadme on 2014.05.08

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

View Source
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

func Versions

func Versions() (versions []version)

Versions reports the supported PDF versions.

Originally cairo_pdf_get_versions.

Types

type Surface

type Surface struct {
	cairo.XtensionPagedVectorSurface
}

Surface is a PDF surface.

Surface implements cairo.PagedVectorSurface.

func New

func New(w io.Writer, width, height float64) (Surface, error)

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

func (s Surface) RestrictTo(v version) error

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.

func (Surface) SetSize

func (s Surface) SetSize(width, height float64) error

SetSize changes the size of the PDF surface for the current and subsequent pages.

This method should only be called before any drawing operations have been performed on the current page.

Originally cairo_pdf_surface_set_size.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL