Versions in this module Expand all Collapse all v0 v0.12.1 Sep 2, 2026 v0.12.0 Aug 31, 2026 Changes in this version + func ComposeHTML(docs []*mdx.Document, opts ComposeOptions) (string, error) + type ComposeOptions = compose.Options + func DefaultComposeOptions() ComposeOptions + type Option func(*PDF) + func WithAuthor(author string) Option + func WithCSS(css string) Option + func WithCalibreExecPath(path string) Option + func WithChromeExecPath(path string) Option + func WithComponent(name string, handler mdx.ComponentHandler) Option + func WithConfig(cfg *config.Config) Option + func WithConfigCSSAndTemplate(cfg *config.Config) Option + func WithCoverImage(imagePath string) Option + func WithEpubLanguage(lang string) Option + func WithFormats(formats ...OutputFormat) Option + func WithFullConfig(cfg *config.Config) Option + func WithGenerateDocumentOutline(enabled bool) Option + func WithGenerateTaggedPDF(enabled bool) Option + func WithHeaderTitle(title string) Option + func WithNetworkAccess(enabled bool) Option + func WithOutputFile(path string) Option + func WithPaperSize(width, height float64) Option + func WithRenderMargins(top, bottom, left, right float64) Option + func WithSharedBrowser(browserCtx context.Context) Option + func WithSourceDir(dir string) Option + func WithSubtitle(subtitle string) Option + func WithTemplate(html string) Option + func WithTheme(t theme.Theme) Option + func WithThemeName(name string, opts theme.Options) Option + func WithTimeout(d time.Duration) Option + func WithTitle(title string) Option + func WithValidator(v mdx.Validator) Option + func WithVars(vars map[string]string) Option + func WithVerbose(v bool) Option + type OutputFormat string + const FormatEPUB + const FormatKindle + const FormatPDF + func ParseFormats(s string) ([]OutputFormat, error) + type PDF struct + func New(opts ...Option) (*PDF, error) + func (p *PDF) Build(ctx context.Context) error + func (p *PDF) ComposeHTML(docs []*mdx.Document) (string, error) + func (p *PDF) Formats() []OutputFormat + func (p *PDF) LastAudit() *render.AuditReport + func (p *PDF) NeedsCalibre() bool + func (p *PDF) NeedsChrome() bool + func (p *PDF) ParseDir() ([]*mdx.Document, error) + func (p *PDF) Render(html string) error + func (p *PDF) RenderEpub(docs []*mdx.Document, outputPath string) error + func (p *PDF) RenderKindle(ctx context.Context, docs []*mdx.Document, outputPath string) error + func (p *PDF) RenderWithContext(ctx context.Context, html string) error + func (p *PDF) Validate(ctx context.Context) ([]mdx.ValidationError, error) + func (p *PDF) ValidateAll(docs []*mdx.Document) []mdx.ValidationError + func (p *PDF) ValidateDoc(doc *mdx.Document) []mdx.ValidationError + func (p *PDF) Warnings() []string