pdfgen

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 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"`
	// 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 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