Documentation
¶
Overview ¶
Package print runs the one-shot pipeline: parse -> render -> headless Chromium -> wait for paged.js -> page.PDF -> write to disk.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
Print renders a document to PDF and writes it to disk. Returns the absolute path of the resulting PDF.
func ResolveOutputPath ¶ added in v0.1.1
ResolveOutputPath returns the absolute path Print will write to: the explicit outputPath when given, otherwise <source-basename>.pdf next to the document. Exposed so callers can check for an existing file before committing to a render.
Types ¶
type Options ¶
type Options struct {
// OutputPath is the PDF file to write. Empty means write next to the
// source document as <basename>.pdf.
OutputPath string
// WriteHTML, if true, also writes the rendered HTML alongside the PDF
// for debugging.
WriteHTML bool
// Version is propagated into the render System.Version field.
Version string
}
Options configures Print.
Click to show internal directories.
Click to hide internal directories.