Documentation ¶
Index ¶
- func CleanString(str string) string
- func ContentBox(fpdf *gofpdf.Fpdf) (width, height float64)
- func ContentBoxBottom(fpdf *gofpdf.Fpdf) float64
- func ContentBoxHeight(fpdf *gofpdf.Fpdf) float64
- func ContentBoxRight(fpdf *gofpdf.Fpdf) float64
- func ContentBoxWidth(fpdf *gofpdf.Fpdf) float64
- func HexToRGB(s string) (r, g, b int, err error)
- func PxToMm(pixels int) float64
- type EM
- type IN
- type MM
- type PT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanString ¶
CleanString places escape characters with their real values and replaces tabs with a number of spaces.
func ContentBox ¶
ContentBox returns the width and height of a page minus margins.
func ContentBoxBottom ¶
ContentBoxBottom returns the page height minus the bottom margin. Anything written below this needs to break to a new page.
func ContentBoxHeight ¶
ContentBoxHeight returns the height of a page minus top and bottom margins.
func ContentBoxRight ¶
ContentBoxRight returns the page width minus the right margin. Anything written beyond this needs to wrap to a new line.
func ContentBoxWidth ¶
ContentBoxWidth returns the width of a width minus left and right margins.
func HexToRGB ¶
HexToRGB takes a hex color value and returns three ints with its red, green, and blue values. Source: https://stackoverflow.com/a/54200713/7687024