Documentation
¶
Overview ¶
Package pdf renders a printout as PDF.
It does no layout. Every box in a printout is already absolute, every string already wrapped, every barcode already encoded, so rendering is a translation of marks into drawing operators and nothing else. What the renderer decides is only what a printout deliberately leaves to it: where a baseline sits inside its leading, how a justified line distributes its slack, and what a dash pattern measures.
The rules it follows are written down in doc/render.md.
out, err := tpl.Build(rows) err = pdf.WriteFile(out, "report.pdf")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*config)
Option configures a render.
func Uncompressed ¶
func Uncompressed() Option
Uncompressed leaves the content streams, fonts and images uncompressed, which makes the file readable in a text editor.
func WithProducer ¶
WithProducer overrides the Producer string in the document information dictionary, which defaults to the printout's engine.