Documentation
¶
Index ¶
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 New ¶
New creates a PDF file with the provided file name, initializes a new boxes and glue frontend document and loads a default CSS stylesheet.
func NewWithFrontend ¶
NewWithFrontend creates a document from a boxes and glue frontend document and a csshtml CSS parser. The default fonts for the families monospace, sans and serif are loaded.
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() (htmlbag.PageDimensions, error)
PageSize returns a struct with the dimensions of the current page.
func (*Document) ReadCSSFile ¶
ReadCSSFile parses the CSS file at the filename.
Click to show internal directories.
Click to hide internal directories.