pdf

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bold = &table.Style{Format: "B"}
View Source
var Bordered = &table.Style{Border: "1"}
View Source
var Centered = &table.Style{Align: "C"}
View Source
var Reset = &table.Style{Format: "-"}

Functions

func Box

func Box(p *gofpdf.Fpdf, x, y, w, h float64, styleStr string, checked bool)

func LoadPngFromUrl

func LoadPngFromUrl(p *gofpdf.Fpdf, registerName, url string, wg *sync.WaitGroup)

Types

type Document

type Document struct {
	HeaderFns          *orderedmap.OrderedMap
	FooterFns          *orderedmap.OrderedMap
	AcceptPageBreakFns *orderedmap.OrderedMap
}

func NewDocument

func NewDocument(p *gofpdf.Fpdf) *Document

func (Document) AddAcceptPageBreak

func (d Document) AddAcceptPageBreak(key string, value func() bool)

func (Document) AddFooter

func (d Document) AddFooter(key string, value func(*gofpdf.Fpdf))

func (Document) AddHeader

func (d Document) AddHeader(key string, value func(*gofpdf.Fpdf))

func (*Document) Init

func (d *Document) Init(p *gofpdf.Fpdf)

func (*Document) Register

func (d *Document) Register(reg Registrable)

func (Document) RemoveAcceptPageBreak

func (d Document) RemoveAcceptPageBreak(key string)

func (Document) RemoveFooter

func (d Document) RemoveFooter(key string)

func (Document) RemoveHeader

func (d Document) RemoveHeader(key string)

func (*Document) Unregister

func (d *Document) Unregister(reg Registrable)

type Registrable

type Registrable interface {
	Headers() map[string]func(*gofpdf.Fpdf)
	Footers() map[string]func(*gofpdf.Fpdf)
	AcceptPageBreak() map[string]func() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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