pdfgen

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPdfGen

func NewPdfGen(mypdf pdf.PDF, genConf *pdfGenConf) export.PDF

func NewPdfGenConf

func NewPdfGenConf(ctx context.Context, data interface{}, storage gcp.Storage) *pdfGenConf

Types

type BrElemnt

type BrElemnt struct {
	*Element
	H float64
}

func (*BrElemnt) Generate

func (ele *BrElemnt) Generate(p pdf.PDF) error

type Element

type Element struct {
	Type string `json:"type"`
}

type ImageElement

type ImageElement struct {
	*Element
	Key     string   `json:"key"`
	Perm    gcp.Perm `json:"perm"`
	X       float64  `json:"x"`
	Y       float64  `json:"y"`
	W       float64  `json:"width"`
	H       float64  `json:"height"`
	Alpha   float64  `json:"alpha"`
	Spacing float64  `json:"spacing"`
	// contains filtered or unexported fields
}

func (*ImageElement) Generate

func (ele *ImageElement) Generate(p pdf.PDF) error

type LineElemnt

type LineElemnt struct {
	*Element
	Width float64 `json:"width"`
	Style string  `json:"style"`
}

func (*LineElemnt) Generate

func (ele *LineElemnt) Generate(p pdf.PDF) error

type PdfElement

type PdfElement interface {
	Generate(p pdf.PDF) error
}

type TableElement added in v0.11.0

type TableElement struct {
	*Element
	Title     []tableTitleRow `json:"title"`
	DSKey     string          `json:"dsKey"`
	X         float64         `json:"x"`
	Y         float64         `json:"y"`
	RowHeight float64         `json:"rowHeight"`
	Alpha     float64         `json:"alpha"`
	// contains filtered or unexported fields
}

func (*TableElement) Generate added in v0.11.0

func (ele *TableElement) Generate(p pdf.PDF) error

type TextElemnt

type TextElemnt struct {
	*Element
	X        float64   `json:"x"`
	Y        float64   `json:"y"`
	Field    string    `json:"field"`
	Split    string    `json:"split"`
	Value    string    `json:"value"`
	Font     string    `json:"font"`
	FontSize int       `json:"fontSize"`
	Color    pdf.Color `json:"color"`
	Align    string    `json:"align"`
}

func (*TextElemnt) Generate

func (ele *TextElemnt) Generate(p pdf.PDF) error

func (*TextElemnt) Text

func (ele *TextElemnt) Text() string

Jump to

Keyboard shortcuts

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