pdf

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: CC0-1.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 Converter

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

func New

func New(options ...*ConverterOptions) (*Converter, error)

func (*Converter) Error

func (c *Converter) Error() error

func (*Converter) Generate

func (c *Converter) Generate(fileName string) error

func (*Converter) SetFooterHTMLTemplate

func (c *Converter) SetFooterHTMLTemplate(footerHTMLPath string) Converters

func (*Converter) SetTemplate

func (c *Converter) SetTemplate(templatePath string, data interface{}) Converters

type ConverterOptions

type ConverterOptions struct {
	PageSize     string
	MarginBottom uint
	MarginTop    uint
	MarginLeft   uint
	MarginRight  uint
}

type Converters

type Converters interface {
	SetTemplate(templatePath string, data interface{}) Converters
	SetFooterHTMLTemplate(footerHTMLPath string) Converters
	Generate(fileName string) error
	Error() error
}

type Generator added in v0.2.4

type Generator struct{}

func NewGenerator added in v0.2.4

func NewGenerator() *Generator

func (*Generator) GeneratePDF added in v0.2.4

func (f *Generator) GeneratePDF(fileName, value string, footerHTMLPath string) (encodedPDF string, fileNameResult string, err error)

func (*Generator) ParseTemplate added in v0.2.4

func (f *Generator) ParseTemplate(templateName string, data interface{}) (result string, err error)

type Generators added in v0.2.4

type Generators interface {
	ParseTemplate(templateName string, data interface{}) (result string, err error)
	GeneratePDF(fileName string, value string, footerHTMLPath string) (encodedPDF string, fileNameResult string, err error)
}

Jump to

Keyboard shortcuts

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