Versions in this module Expand all Collapse all v0 v0.0.1 Nov 21, 2025 Changes in this version + func FromImage(src image.Image) *semantic.Image + func ImageFromFile(path string) (*semantic.Image, error) + type AppearanceGenerator struct + Form *semantic.AcroForm + func NewAppearanceGenerator(form *semantic.AcroForm) *AppearanceGenerator + func (g *AppearanceGenerator) Generate(field semantic.FormField) (*semantic.XObject, error) + type CellPadding struct + Bottom float64 + Left float64 + Right float64 + Top float64 + type Color struct + A float64 + B float64 + G float64 + R float64 + type FormBuilder interface + Finish func() PDFBuilder + SetCheckbox func(name string, checked bool) FormBuilder + SetChoice func(name, value string) FormBuilder + SetText func(name, value string) FormBuilder + type HAlign string + const HAlignCenter + const HAlignLeft + const HAlignRight + type ImageOptions struct + Interpolate bool + SMask *semantic.Image + type LineOptions struct + DashPattern []float64 + DashPhase float64 + LineCap contentstream.LineCap + LineWidth float64 + StrokeColor Color + type Outline struct + Children []Outline + Page *semantic.Page + PageIndex int + Title string + X *float64 + Y *float64 + Zoom *float64 + type PDFBuilder interface + AddEmbeddedFile func(file semantic.EmbeddedFile) PDFBuilder + AddOutline func(out Outline) PDFBuilder + AddPage func(page *semantic.Page) PDFBuilder + AddPageLabel func(pageIndex int, prefix string) PDFBuilder + Build func() (*semantic.Document, error) + Form func() FormBuilder + NewPage func(width, height float64) PageBuilder + RegisterFont func(name string, font *semantic.Font) PDFBuilder + RegisterTrueTypeFont func(name string, data []byte) PDFBuilder + SetCalculationOrder func(fields []semantic.FormField) PDFBuilder + SetEncryption func(ownerPassword, userPassword string, perms raw.Permissions, ...) PDFBuilder + SetInfo func(info *semantic.DocumentInfo) PDFBuilder + SetLanguage func(lang string) PDFBuilder + SetMarked func(marked bool) PDFBuilder + SetMetadata func(xmp []byte) PDFBuilder + func NewBuilder() PDFBuilder + type PageBuilder interface + AddAnnotation func(ann semantic.Annotation) PageBuilder + AddFormField func(field semantic.FormField) PageBuilder + DrawImage func(img *semantic.Image, x, y, width, height float64, opts ImageOptions) PageBuilder + DrawLine func(x1, y1, x2, y2 float64, opts LineOptions) PageBuilder + DrawPath func(path *contentstream.Path, opts PathOptions) PageBuilder + DrawRectangle func(x, y, width, height float64, opts RectOptions) PageBuilder + DrawTable func(table Table, opts TableOptions) PageBuilder + DrawText func(text string, x, y float64, opts TextOptions) PageBuilder + Finish func() PDFBuilder + SetCropBox func(box semantic.Rectangle) PageBuilder + SetMediaBox func(box semantic.Rectangle) PageBuilder + SetRotation func(degrees int) PageBuilder + type PathOptions struct + DashPattern []float64 + DashPhase float64 + Fill bool + FillColor Color + LineCap contentstream.LineCap + LineJoin contentstream.LineJoin + LineWidth float64 + Stroke bool + StrokeColor Color + type RectOptions = PathOptions + type Table struct + Columns []float64 + HeaderRows int + Rows []TableRow + type TableCell struct + BackgroundColor Color + BorderColor Color + BorderWidth float64 + ColSpan int + Font string + FontSize float64 + HAlign HAlign + Padding *CellPadding + Tag string + Text string + TextColor Color + VAlign VAlign + type TableOptions struct + BorderColor Color + BorderWidth float64 + BottomMargin float64 + CellPadding float64 + DefaultFont string + DefaultSize float64 + HeaderFill Color + LeftMargin float64 + RepeatHeaders bool + RowHeight float64 + Tagged bool + TopMargin float64 + X float64 + Y float64 + type TableRow struct + Cells []TableCell + type TextOptions struct + CharSpacing float64 + Color Color + Font string + FontSize float64 + HorizScaling float64 + MCID *int + RenderMode contentstream.TextRenderMode + Rise float64 + Rotate float64 + Tag string + WordSpacing float64 + type VAlign string + const VAlignBottom + const VAlignMiddle + const VAlignTop