pdf

package
v0.0.0-...-07bc63f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Writer

func Writer(w io.Writer, c *canvas.Canvas) error

Writer writes the canvas as a PDF file.

Types

type PDF

type PDF struct {
	// contains filtered or unexported fields
}

func New

func New(w io.Writer, width, height float64) *PDF

NewPDF creates a portable document format renderer.

func (*PDF) Close

func (r *PDF) Close() error

func (*PDF) NewPage

func (r *PDF) NewPage(width, height float64)

NewPage starts adds a new page where further rendering will be written to

func (*PDF) RenderImage

func (r *PDF) RenderImage(img image.Image, m canvas.Matrix)

func (*PDF) RenderPath

func (r *PDF) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

func (*PDF) RenderText

func (r *PDF) RenderText(text *canvas.Text, m canvas.Matrix)

func (*PDF) SetCompression

func (r *PDF) SetCompression(compress bool)

func (*PDF) SetImageEncoding

func (r *PDF) SetImageEncoding(enc canvas.ImageEncoding)

func (*PDF) SetInfo

func (r *PDF) SetInfo(title, subject, keywords, author string)

func (*PDF) Size

func (r *PDF) Size() (float64, float64)

Jump to

Keyboard shortcuts

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