document

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	A4     = &pdf.Rectangle{URx: 595.276, URy: 841.890}
	A4r    = &pdf.Rectangle{URx: 841.890, URy: 595.276}
	A5     = &pdf.Rectangle{URx: 420.945, URy: 595.276}
	A5r    = &pdf.Rectangle{URx: 595.276, URy: 420.945}
	Letter = &pdf.Rectangle{URx: 612, URy: 792}
)

Default paper sizes as PDF rectangles.

Functions

This section is empty.

Types

type MultiPage

type MultiPage struct {
	Out  pdf.Putter
	Tree *pagetree.Writer
	// contains filtered or unexported fields
}

func AddMultiPage added in v0.3.4

func AddMultiPage(out pdf.Putter, pageSize *pdf.Rectangle) (*MultiPage, error)

func CreateMultiPage

func CreateMultiPage(fileName string, pageSize *pdf.Rectangle, opt *pdf.WriterOptions) (*MultiPage, error)

func WriteMultiPage

func WriteMultiPage(w io.Writer, pageSize *pdf.Rectangle, opt *pdf.WriterOptions) (*MultiPage, error)

func (*MultiPage) AddPage

func (doc *MultiPage) AddPage() *Page

func (*MultiPage) Close

func (doc *MultiPage) Close() error

type Page

type Page struct {
	*graphics.Page
	PageDict pdf.Dict
	Out      pdf.Putter
	// contains filtered or unexported fields
}

func CreateSinglePage

func CreateSinglePage(fileName string, pageSize *pdf.Rectangle, opt *pdf.WriterOptions) (*Page, error)

func WriteSinglePage

func WriteSinglePage(w io.Writer, pageSize *pdf.Rectangle, opt *pdf.WriterOptions) (*Page, error)

func (*Page) Close

func (p *Page) Close() error

func (*Page) GetPageSize added in v0.3.5

func (p *Page) GetPageSize() *pdf.Rectangle

func (*Page) SetPageSize added in v0.3.5

func (p *Page) SetPageSize(paper *pdf.Rectangle)

Jump to

Keyboard shortcuts

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