pdfreport

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	io.Reader
	ImageType string
}

type Report

type Report struct {
	*gofpdf.Fpdf
	Encode func(string) string

	Sans, Mono string

	FontSize, Ht  float64
	Bottom, Width float64
	// contains filtered or unexported fields
}

func NewReport

func NewReport(params ReportParams) *Report

func (*Report) DefTable

func (pdf *Report) DefTable(keyvals ...string) error

func (*Report) Heading

func (pdf *Report) Heading(level int, title string) error

func (*Report) NewTable

func (pdf *Report) NewTable(names []string, sizes []int, headingSize, bodySize float64) Table

func (*Report) Output

func (pdf *Report) Output(w io.Writer) error

func (*Report) Println

func (pdf *Report) Println(text string) error

func (*Report) SetFont

func (pdf *Report) SetFont(nm string, style string, size float64)

func (*Report) Write

func (pdf *Report) Write(p []byte) (int, error)

type ReportParams

type ReportParams struct {
	HeaderLogoLeft, HeaderLogoRight Image
	Title, Subject, Author, Creator string
	Footer                          string
	Landscape                       bool
}

type Table

type Table struct {
	Ht float64
	// contains filtered or unexported fields
}

func (Table) Row

func (t Table) Row(values []string)

Jump to

Keyboard shortcuts

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