Documentation
¶
Index ¶
- Variables
- func GeneratePDFTable(pg PDFTableGenerator)
- type A4PDFTableGenerator
- func (a *A4PDFTableGenerator) Cleanup()
- func (a *A4PDFTableGenerator) GetColumnTitles() (x, y float64, height float64, fontFamily string, fontSize float64, ...)
- func (a *A4PDFTableGenerator) GetFonts() <-chan *Font
- func (a *A4PDFTableGenerator) GetImages() <-chan *ImageAttr
- func (a *A4PDFTableGenerator) GetLineAttr() (drawLine bool, width float64, lineType string)
- func (a *A4PDFTableGenerator) GetPageSize() (pageSize *Rect)
- func (a *A4PDFTableGenerator) GetRows() (firstY float64, height float64, fontFamily string, fontSize float64, ...)
- func (a *A4PDFTableGenerator) GetTitle() (title string, y float64, fontFamily string, fontSize float64)
- func (a *A4PDFTableGenerator) GetWriter() io.Writer
- func (a *A4PDFTableGenerator) Init()
- type Font
- type ImageAttr
- type PDFTableGenerator
- type Point
- type Rect
- type Title
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PageSizeA4 = gopdf.PageSizeA4
)
Functions ¶
func GeneratePDFTable ¶
func GeneratePDFTable(pg PDFTableGenerator)
Types ¶
type A4PDFTableGenerator ¶
type A4PDFTableGenerator struct{}
------ A4PDFTableGenerator -----
func (*A4PDFTableGenerator) Cleanup ¶
func (a *A4PDFTableGenerator) Cleanup()
func (*A4PDFTableGenerator) GetColumnTitles ¶
func (*A4PDFTableGenerator) GetFonts ¶
func (a *A4PDFTableGenerator) GetFonts() <-chan *Font
func (*A4PDFTableGenerator) GetImages ¶
func (a *A4PDFTableGenerator) GetImages() <-chan *ImageAttr
func (*A4PDFTableGenerator) GetLineAttr ¶
func (a *A4PDFTableGenerator) GetLineAttr() (drawLine bool, width float64, lineType string)
func (*A4PDFTableGenerator) GetPageSize ¶
func (a *A4PDFTableGenerator) GetPageSize() (pageSize *Rect)
func (*A4PDFTableGenerator) GetTitle ¶
func (a *A4PDFTableGenerator) GetTitle() (title string, y float64, fontFamily string, fontSize float64)
func (*A4PDFTableGenerator) GetWriter ¶
func (a *A4PDFTableGenerator) GetWriter() io.Writer
func (*A4PDFTableGenerator) Init ¶
func (a *A4PDFTableGenerator) Init()
type PDFTableGenerator ¶
type PDFTableGenerator interface { // called first. Init() // called last. Cleanup() // PageSize. e.g.: PageSizeA4 GetPageSize() (pageSize *Rect) // line attrubites. e.g.: width=0.5, lineType="normal" GetLineAttr() (drawLine bool, width float64, lineType string) // get font family name & font file name GetFonts() <-chan *Font // get image file path & left-upper pointer and crop size to show GetImages() <-chan *ImageAttr // where to output pdf GetWriter() io.Writer // get page title, left-bottom Y, font family name and font size. (title will be displayed center-aligned) GetTitle() (title string, y float64, fontFamily string, fontSize float64) // get table column titles: (x,y) of fisrt column, title height, font family name, font size and title attributes. GetColumnTitles() (x, y float64, height float64, fontFamily string, fontSize float64, titles []*Title) // get rows with Y of first row, row height, font family name, font size. rows is a channel containing (title name => value) GetRows() (firstY float64, height float64, fontFamily string, fontSize float64, rows <-chan map[string]string) }
Click to show internal directories.
Click to hide internal directories.