render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package render paints a laid-out document (layout.Result) onto the PDF writer, producing the final bytes. It is waffle's analogue of react-pdf's render step, for the View-only subset: background fills and borders. Text, images, SVG, transforms, opacity, and border-radius arrive in later phases.

Layout uses a top-left origin (y grows downward); PDF uses a bottom-left origin (y grows upward). Every box is Y-flipped on the way out.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(res *layout.Result, w io.Writer, opts Options) error

Render paints every page of res and writes the PDF to w.

Types

type Options

type Options struct {
	DPI     float64     // default 72
	RemBase float64     // default 18
	Doc     pdf.Options // document metadata passthrough
}

Options configure rendering.

Jump to

Keyboard shortcuts

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