Documentation ¶
Index ¶
- type AddHTMLOptions
- type Cell
- type Column
- type PdfHTMLElement
- type Row
- type Style
- type Table
- func (t *Table) AcceptPageBreak() map[string]func() bool
- func (t *Table) Add(value any, styles ...*Style) *Table
- func (t *Table) AddHTML(htmlStr string, styles ...*Style) *Table
- func (t *Table) AddImage(imageNameStr string) *Table
- func (t *Table) AddInline(value any, styles ...*Style) *Table
- func (t *Table) AddMany(values ...any) *Table
- func (t *Table) AddNext(value any, styles ...*Style) *Table
- func (t *Table) Close() *Table
- func (t *Table) Col(index int) *Column
- func (t *Table) ColumnBoundaries(colIndex ...int) (x1 float64, x2 float64)
- func (t *Table) ColumnSize(colIndex ...int) float64
- func (t *Table) Columns() *[]Column
- func (t *Table) DrawBorder(borderStr string, x, y, w, h float64)
- func (t *Table) Footers() map[string]func(*gofpdf.Fpdf)
- func (t *Table) Headers() map[string]func(*gofpdf.Fpdf)
- func (t *Table) Hr() *Table
- func (t *Table) Next() *Table
- func (t *Table) NextRow() *Table
- func (t *Table) RowHeight() float64
- func (t *Table) SetFooterFunc(footerFunc func()) *Table
- func (t *Table) SetHeaderFunc(headerFunc func()) *Table
- func (t *Table) SetRowHeight(rowHeight float64) *Table
- func (t *Table) SetSizes(sizes ...float64) *Table
- func (t *Table) SetStyle(style *Style) *Table
- func (t *Table) SetStyles(styles ...*Style) *Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddHTMLOptions ¶
type AddHTMLOptions struct {
Width float64
}
type PdfHTMLElement ¶
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
type Style ¶
type Style struct { VAlign string Align string Border string Format string Size float64 Ln float64 Fill *[]int Color *[]int PaddingTop float64 PaddingRight float64 PaddingBottom float64 PaddingLeft float64 MarginTop float64 MarginRight float64 MarginBottom float64 MarginLeft float64 // contains filtered or unexported fields }
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) AcceptPageBreak ¶
Calls the tablePageBreak method of the table if exists by default it keeps printing the table in a new page
func (*Table) AddNext ¶
Add the specified value, style and skips to the next column if there is one otherwise it skips to the next row
func (*Table) ColumnBoundaries ¶
func (*Table) ColumnSize ¶
func (*Table) DrawBorder ¶
func (*Table) Hr ¶
Hr will draw an horizontal line at the bottom of the current row's next Draw call
func (*Table) SetFooterFunc ¶
Used for setting the footerFunc method
func (*Table) SetHeaderFunc ¶
Used for setting the headerFunc method
func (*Table) SetRowHeight ¶
Sets the desired row height for the next rows.
Set it to 0 to reset to dynamic height.
func (*Table) SetSizes ¶
SetSizes overrides the current column sizes with the provided ones It also initializes the styles array with the columns' size This method resets columnIndex and rowHeight to 0 when called