pdf

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderOpts

type RenderOpts struct {
	// The width of the PDF page in mm
	Width float64
	// The height of the PDF page in mm
	Height float64
	// GenerateTaggedPDF indicates whether to generate a tagged PDF, see
	// https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
	GenerateTaggedPDF bool
	// GenerateDocumentOutline indicates whether to generate a document outline,
	// see https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
	GenerateDocumentOutline bool
}

RenderOpts contains options for rendering a PDF

type Renderer

type Renderer interface {
	Render(ctx context.Context, url string, pdf io.Writer, opts RenderOpts) error
}

Renderer is an interface for rendering PDFs from HTML content

func NewRodRenderer

func NewRodRenderer(chromium string) Renderer

NewRodRenderer creates a new rodRenderer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL