...

Package pdf

import "oss.terrastruct.com/d2/lib/pdf"
Overview
Index

Overview ▾

Constants

const TITLE_SEP = "  /  "

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) GetFillRGB

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