entity

package
v2.0.0-alpha.41 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	X      float64
	Y      float64
	Width  float64
	Height float64
}

Cell represents a cell inside the PDF.

func NewRootContext

func NewRootContext(pageWidth, pageHeight float64, margins Margins) Cell

func (Cell) Copy

func (c Cell) Copy() Cell

func (Cell) GetDimensions

func (c Cell) GetDimensions() *Dimensions

type Config

type Config struct {
	ProviderType      provider.Type
	Dimensions        *Dimensions
	Margins           *Margins
	DefaultFont       *props.Font
	CustomFonts       []*CustomFont
	Workers           int
	Debug             bool
	MaxGridSize       int
	PageNumberPattern string
	PageNumberPlace   props.Place
	Protection        *Protection
	Compression       bool
	Metadata          *Metadata
	BackgroundImage   *Image
}

func (*Config) ToMap

func (c *Config) ToMap() map[string]interface{}

type CustomFont

type CustomFont struct {
	Family string
	Style  fontstyle.Type
	File   string
	Bytes  []byte
}

type Dimensions

type Dimensions struct {
	Width  float64
	Height float64
}

func (*Dimensions) AppendMap

func (d *Dimensions) AppendMap(label string, m map[string]interface{}) map[string]interface{}

type Image

type Image struct {
	Bytes      []byte
	Extension  extension.Type
	Dimensions *Dimensions
}

func (*Image) AppendMap

func (i *Image) AppendMap(m map[string]interface{}) map[string]interface{}

type Margins

type Margins struct {
	Left   float64
	Right  float64
	Top    float64
	Bottom float64
}

func (*Margins) AppendMap

func (m *Margins) AppendMap(mp map[string]interface{}) map[string]interface{}

type Metadata

type Metadata struct {
	Author       *Utf8Text
	Creator      *Utf8Text
	Subject      *Utf8Text
	Title        *Utf8Text
	CreationDate *time.Time
}

func (*Metadata) AppendMap

func (m *Metadata) AppendMap(mp map[string]interface{}) map[string]interface{}

type Protection

type Protection struct {
	Type          protection.Type
	UserPassword  string
	OwnerPassword string
}

func (*Protection) AppendMap

func (p *Protection) AppendMap(m map[string]interface{}) map[string]interface{}

type Utf8Text

type Utf8Text struct {
	Text string
	UTF8 bool
}

func (*Utf8Text) ToString

func (u *Utf8Text) ToString() string

Jump to

Keyboard shortcuts

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