pdf

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MPL-2.0 Imports: 12 Imported by: 2 modules, 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

Index

Constants

View Source
const TITLE_SEP = "  /  "

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardTitle

type BoardTitle struct {
	Name    string
	BoardID string
}

type GoFPDF

type GoFPDF struct {
	// contains filtered or unexported fields
}

func Init

func Init() *GoFPDF

func (*GoFPDF) AddPDFPage

func (g *GoFPDF) AddPDFPage(png []byte, titlePath []BoardTitle, themeID int64, fill string, shapes []d2target.Shape, pad int64, viewboxX, viewboxY float64, pageMap map[string]int, includeNav bool) error

func (*GoFPDF) Export

func (g *GoFPDF) Export(outputPath string) error

func (*GoFPDF) ExportTo added in v0.9.0

func (g *GoFPDF) ExportTo(output io.Writer) error

ExportTo writes the complete PDF document to output. The caller retains ownership of output.

func (*GoFPDF) ExportWithStatus added in v0.9.0

func (g *GoFPDF) ExportWithStatus(outputPath string) (touched bool, err error)

ExportWithStatus writes the PDF document to outputPath and reports whether the target was created or truncated. A true result therefore means callers must treat an accompanying error as a partial output failure, even when the failure happened before the first byte was written.

func (*GoFPDF) GetFillRGB

func (g *GoFPDF) GetFillRGB(themeID int64, fill string) (color.RGB, error)

Jump to

Keyboard shortcuts

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