Documentation ¶
Index ¶
- func NewCode(pdf fpdf.Fpdf, math Math) *code
- func NewFont(pdf fpdf.Fpdf, size float64, family string, style fontstyle.Type) *font
- func NewImage(pdf fpdf.Fpdf, math Math) *image
- func NewMath(pdf fpdf.Fpdf) *math
- func NewSignature(pdf fpdf.Fpdf, math Math, text Text) *signature
- func NewText(pdf fpdf.Fpdf, math Math, font Font) *text
- type Code
- type Font
- type Image
- type Math
- type Signature
- type Text
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSignature ¶
NewSignature create a Signature.
Types ¶
type Code ¶
type Code interface { AddQr(code string, cell core.Cell, prop props.Rect) AddBar(code string, cell core.Cell, prop props.Barcode) (err error) AddDataMatrix(code string, cell core.Cell, prop props.Rect) }
Code is the abstraction which deals of how to add QrCodes or Barcode in a PDF.
type Font ¶
type Font interface { SetFamily(family string) SetStyle(style fontstyle.Type) SetSize(size float64) SetFont(family string, style fontstyle.Type, size float64) GetFamily() string GetStyle() fontstyle.Type GetSize() float64 GetFont() (string, fontstyle.Type, float64) GetScaleFactor() (scaleFactor float64) SetColor(color *props.Color) GetColor() *props.Color }
Font is the abstraction which deals of how to set fontstyle configurations.
type Image ¶
type Image interface { AddFromFile(path string, cell core.Cell, prop props.Rect) (err error) AddFromBase64(stringBase64 string, cell core.Cell, prop props.Rect, extension extension.Type) (err error) }
Image is the abstraction which deals of how to add images in a PDF.
type Math ¶
type Math interface { GetRectCenterColProperties(imageWidth float64, imageHeight float64, colWidth float64, colHeight float64, xColOffset float64, percent float64) (x float64, y float64, w float64, h float64) GetRectNonCenterColProperties(imageWidth float64, imageHeight float64, colWidth float64, colHeight float64, xColOffset float64, prop props.Rect) (x float64, y float64, w float64, h float64) GetCenterCorrection(outerSize, innerSize float64) float64 }
Math is the abstraction which deals with useful calc.
Click to show internal directories.
Click to hide internal directories.