Documentation ¶
Index ¶
- func NewCode(pdf gofpdf.Pdf, math Math) *code
- func NewFont(pdf gofpdf.Pdf, size float64, family consts.Family, style consts.Style) *font
- func NewImage(pdf gofpdf.Pdf, math Math) *image
- func NewMath(pdf gofpdf.Pdf) *math
- func NewSignature(pdf gofpdf.Pdf, math Math, text Text) *signature
- func NewTableList(text Text, font Font) *tableList
- func NewText(pdf gofpdf.Pdf, math Math, font Font) *text
- type Cell
- type Code
- type Font
- type Image
- type MarotoGridPart
- type Math
- type Signature
- type TableList
- type Text
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSignature ¶
NewSignature create a Signature
func NewTableList ¶ added in v0.21.2
NewTableList create a TableList
Types ¶
type Code ¶
type Code interface { AddQr(code string, cell Cell, prop props.Rect) AddBar(code string, cell Cell, prop props.Barcode) (err error) }
Code is the abstraction which deals of how to add QrCodes or Barcode in a PDF
type Font ¶
type Font interface { SetFamily(family consts.Family) SetStyle(style consts.Style) SetSize(size float64) SetFont(family consts.Family, style consts.Style, size float64) GetFamily() consts.Family GetStyle() consts.Style GetSize() float64 GetFont() (consts.Family, consts.Style, float64) GetScaleFactor() (scaleFactor float64) }
Font is the abstraction which deals of how to set font configurations
type Image ¶
type Image interface { AddFromFile(path string, cell Cell, prop props.Rect) (err error) AddFromBase64(stringBase64 string, cell Cell, prop props.Rect, extension consts.Extension) (err error) }
Image is the abstraction which deals of how to add images in a PDF
type MarotoGridPart ¶ added in v0.21.2
type MarotoGridPart interface { // Grid System Row(height float64, closure func()) Col(width uint, closure func()) ColSpace(width uint) // Helpers SetBackgroundColor(color color.Color) GetCurrentOffset() float64 GetPageSize() (width float64, height float64) GetPageMargins() (left float64, top float64, right float64, bottom float64) // Outside Col/Row Components Line(spaceHeight float64) // Inside Col/Row Components Text(text string, prop ...props.Text) }
MarotoGridPart is the abstraction to deal with the gris system inside the table list
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
type Signature ¶
Signature is the abstraction which deals of how to add a signature space inside PDF
Source Files ¶
Click to show internal directories.
Click to hide internal directories.