pdf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pdf lays out markdown as a PDF, so a run document can be read or shared as a printed page. It is pure Go: markdown is parsed with goldmark and drawn with fpdf in the Go fonts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(md []byte, opts Options) ([]byte, error)

Render lays out md as a PDF. Front matter is left out. Images that can't be drawn (remote, SVG, missing) show as their alt text.

Types

type Options

type Options struct {
	// Dir is where relative image paths are found. Empty means the
	// working directory.
	Dir string
	// Title is the PDF's title metadata.
	Title string
}

Options control how Render lays out the page.

Jump to

Keyboard shortcuts

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