Documentation ¶
Index ¶
- type Document
- func (d *Document) AddCSS(css string)
- func (d *Document) CreateVlist(te *frontend.Text, wd bag.ScaledPoint) (*node.VList, error)
- func (d *Document) Finish() error
- func (d *Document) HTMLToText(html string) (*frontend.Text, error)
- func (d *Document) NextPage() error
- func (d *Document) OutputAt(html string, width bag.ScaledPoint, x, y bag.ScaledPoint) error
- func (d *Document) PageSize() (cssbuilder.PageDimensions, error)
- func (d *Document) ParseHTMLFromNode(html *html.Node) (*frontend.Text, error)
- func (d *Document) ReadCSSFile(filename string) error
- func (d *Document) ShowCSS() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Title string Author string Keywords string // separated by comma Creator string Subject string Frontend *frontend.Document // contains filtered or unexported fields }
Document is the main starting point of the PDF generation.
func NewWithFrontend ¶
NewWithFrontend creates a document with a boxes and glue frontend document.
func (*Document) CreateVlist ¶
CreateVlist returns a single vertical list ready to be placed in the PDF.
func (*Document) HTMLToText ¶
HTMLToText interprets the HTML string and applies all previously read CSS data.
func (*Document) OutputAt ¶
func (d *Document) OutputAt(html string, width bag.ScaledPoint, x, y bag.ScaledPoint) error
OutputAt writes the HTML string to the PDF.
func (*Document) PageSize ¶
func (d *Document) PageSize() (cssbuilder.PageDimensions, error)
PageSize returns a struct with the dimensions of the current page.
func (*Document) ParseHTMLFromNode ¶
ParseHTMLFromNode interprets the HTML structure and applies all previously read CSS data.
func (*Document) ReadCSSFile ¶
ReadCSSFile parses the CSS file at the filename.
Click to show internal directories.
Click to hide internal directories.