Documentation ¶
Overview ¶
The document package provides the functionality to export reports and documents as PDF.
Index ¶
- type Doc
- func (d *Doc) AddFormattedMultilineText(x, y float64, content string, size int, style string)
- func (d *Doc) AddFormattedText(x, y float64, content string, size int, style string)
- func (d *Doc) AddMultilineText(x, y float64, content string)
- func (d *Doc) AddText(x, y float64, content string)
- func (d *Doc) DefaultFontSize()
- func (d *Doc) DefaultFontStyle()
- func (d Doc) LineHeight() float64
- func (d *Doc) SetFontSize(size int)
- func (d *Doc) SetFontStyle(style string)
- func (d *Doc) SetPosition(x, y float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doc ¶
Doc is the basic structure for a PDF file.
func (*Doc) AddFormattedMultilineText ¶
AddFormattedMultilineText has the same functionality as AddMultilineText but with a individual font-size and style.
func (*Doc) AddFormattedText ¶
AddFormattedText adds a text field at the given position with individual size and style.
func (*Doc) AddMultilineText ¶
AddMultilineText adds a text field with multiple lines of text. The lines are divided by the new-line character `\n`.
func (*Doc) DefaultFontSize ¶
func (d *Doc) DefaultFontSize()
DefaultFontSize resets the font size to the initial default.
func (*Doc) DefaultFontStyle ¶
func (d *Doc) DefaultFontStyle()
DefaultFontStyle resets the font style to normal style.
func (Doc) LineHeight ¶
LineHeight calculates and returns the line height.
func (*Doc) SetFontSize ¶
SetFontSize sets the font size for all elements added after.
func (*Doc) SetFontStyle ¶
SetFontStyle changes the font style (italic, bold...) for elements added afterwards.
func (*Doc) SetPosition ¶
SetPosition encapsulates the SetX and SetY methods of gopdf. New elements will be added at the currently set position.