Versions in this module Expand all Collapse all v0 v0.0.2 Dec 10, 2024 v0.0.1 Dec 10, 2024 Changes in this version + var ISO639Codes = []string + func CalcCheckBoxASNames(d types.Dict) (types.Name, types.Name) + func EnsureComboBoxAP(ctx *model.Context, d types.Dict, v string, fonts map[string]types.IndirectRef) error + func EnsureDateFieldAP(ctx *model.Context, d types.Dict, v string, fonts map[string]types.IndirectRef) error + func EnsureListBoxAP(ctx *model.Context, d types.Dict, opts []string, ind types.Array, ...) error + func EnsureTextFieldAP(ctx *model.Context, d types.Dict, text string, multiLine bool, ...) error + func FontIndRef(fName string, ctx *model.Context, fonts map[string]types.IndirectRef) (*types.IndirectRef, error) + func FormFontNameAndLangForID(xRefTable *model.XRefTable, indRef types.IndirectRef) (string, string, error) + func FormFontResDict(xRefTable *model.XRefTable) (types.Dict, error) + func NewForm(xRefTable *model.XRefTable, bb []byte, fontID string, ...) (*types.IndirectRef, error) + type AP struct + type Bar struct + Color string + Hide bool + Style string + Width int + X float64 + Y float64 + type Border struct + Color string + Name string + Style string + Width int + type Buttons struct + Gap int + Label *TextFieldLabel + Values []string + func (b *Buttons) Rtl() bool + type CheckBox struct + BackgroundColor string + Debug bool + Default bool + Dx float64 + Dy float64 + Hide bool + ID string + Label *TextFieldLabel + Locked bool + Margin *Margin + Position [2]float64 + Tab int + Tip string + Value bool + Width float64 + type ComboBox struct + Alignment string + BackgroundColor string + BgCol *color.SimpleColor + Border *Border + BoundingBox *types.Rectangle + Debug bool + Default string + Dx float64 + Dy float64 + Edit bool + Font *FormFont + Hide bool + HorAlign types.HAlignment + ID string + Label *TextFieldLabel + Locked bool + Margin *Margin + Options []string + Position [2]float64 + RTL bool + Tab int + Tip string + Value string + Width float64 + func NewComboBox(ctx *model.Context, d types.Dict, v string, fonts map[string]types.IndirectRef) (*ComboBox, *types.IndirectRef, error) + func (cb *ComboBox) SetFontID(s string) + type Content struct + BackgroundColor string + Bars []*Bar + Border *Border + Borders map[string]*Border + CheckBoxes []*CheckBox + ComboBoxes []*ComboBox + DateFields []*DateField + FieldGroupPool map[string]*FieldGroup + FieldGroups []*FieldGroup + Fonts map[string]*FormFont + Guides []*Guide + ImageBoxPool map[string]*ImageBox + ImageBoxes []*ImageBox + ListBoxes []*ListBox + Margin *Margin + Margins map[string]*Margin + Padding *Padding + Paddings map[string]*Padding + RadioButtonGroups []*RadioButtonGroup + Regions *Regions + SimpleBoxPool map[string]*SimpleBox + SimpleBoxes []*SimpleBox + TablePool map[string]*Table + Tables []*Table + TextBoxPool map[string]*TextBox + TextBoxes []*TextBox + TextFields []*TextField + func (c *Content) BorderRect() *types.Rectangle + func (c *Content) Box() *types.Rectangle + type DateField struct + Alignment string + BackgroundColor string + BgCol *color.SimpleColor + Border *Border + BoundingBox *types.Rectangle + DateFormat string + Debug bool + Default string + Dx float64 + Dy float64 + Font *FormFont + Hide bool + HorAlign types.HAlignment + ID string + Label *TextFieldLabel + Locked bool + Margin *Margin + Position [2]float64 + Tab int + Tip string + Value string + Width float64 + func NewDateField(ctx *model.Context, d types.Dict, v string, fonts map[string]types.IndirectRef) (*DateField, *types.IndirectRef, error) + func (df *DateField) RefreshN(xRefTable *model.XRefTable, indRef *types.IndirectRef) error + func (df *DateField) SetFontID(s string) + type DateFormat struct + Ext string + Int string + func DateFormatForDate(date string) (*DateFormat, error) + func DateFormatForFmtExt(fmtExt string) (*DateFormat, error) + func DateFormatForFmtInt(fmtInt string) (*DateFormat, error) + type Divider struct + Color string + Pos float64 + Width int + type FieldFlags int + const FieldComb + const FieldCombo + const FieldCommitOnSelChange + const FieldDoNotScroll + const FieldDoNotSpellCheck + const FieldEdit + const FieldFileSelect + const FieldMultiline + const FieldMultiselect + const FieldNoExport + const FieldNoToggleToOff + const FieldPassword + const FieldPushbutton + const FieldRadio + const FieldReadOnly + const FieldRequired + const FieldRichTextAndRadiosInUnison + const FieldSort + const UnusedFlag10 + const UnusedFlag11 + const UnusedFlag12 + const UnusedFlag4 + const UnusedFlag5 + const UnusedFlag6 + const UnusedFlag7 + const UnusedFlag8 + const UnusedFlag9 + type FieldGroup struct + BackgroundColor string + Border *Border + CheckBoxes []*CheckBox + ComboBoxes []*ComboBox + DateFields []*DateField + Hide bool + ListBoxes []*ListBox + Name string + Padding *Padding + RadioButtonGroups []*RadioButtonGroup + TextFields []*TextField + Value string + type FormFont struct + Color string + Lang string + Name string + Script string + Size int + func (f *FormFont) SetCol(c color.SimpleColor) + func (f FormFont) RTL() bool + type Guide struct + Position [2]float64 + type HorizontalBand struct + BackgroundColor string + Border bool + Center string + Dx int + Dy int + Font *FormFont + From int + Height float64 + Left string + RTL bool + Right string + Thru int + type ImageBox struct + Anchor string + BackgroundColor string + Border *Border + Data *ImageData + Dx float64 + Dy float64 + Height float64 + Hide bool + Margin *Margin + Name string + Padding *Padding + PageNr string + Position [2]float64 + Rotation float64 + Src string + Url string + Width float64 + func (ib *ImageBox) RenderForFill(pdf *PDF, p *model.Page, pageNr int, imageMap model.ImageMap) error + type ImageData struct + Format string + Height int + Payload string + Width int + type ListBox struct + Alignment string + BackgroundColor string + BgCol *color.SimpleColor + Border *Border + BoundingBox *types.Rectangle + Debug bool + Default string + Defaults []string + Dx float64 + Dy float64 + Font *FormFont + Height float64 + Hide bool + HorAlign types.HAlignment + ID string + Ind types.Array + Label *TextFieldLabel + Locked bool + Margin *Margin + Multi bool + Options []string + Position [2]float64 + RTL bool + Tab int + Tip string + Value string + Values []string + Width float64 + func NewListBox(ctx *model.Context, d types.Dict, opts []string, ind types.Array, ...) (*ListBox, *types.IndirectRef, error) + func (lb *ListBox) SetFontID(s string) + type Margin struct + Bottom float64 + Left float64 + Name string + Right float64 + Top float64 + Width float64 + type PDF struct + BackgroundColor string + Border *Border + Borders map[string]*Border + CheckBoxAPs map[float64]*AP + Colors map[string]string + Conf *model.Configuration + ContentBox bool + Crop string + DateFormat string + Debug bool + DirNames map[string]string + FieldGroupPool map[string]*FieldGroup + FieldIDs types.StringSet + Fields types.Array + FileNames map[string]string + FontResIDs map[int]types.Dict + Fonts map[string]*FormFont + Footer *HorizontalBand + FormFonts map[string]*FormFont + Guides bool + HasForm bool + Header *HorizontalBand + ImageBoxPool map[string]*ImageBox + InheritedDA string + Margin *Margin + Margins map[string]*Margin + OldFieldIDs types.StringSet + Optimize *model.OptimizationContext + Origin string + Padding *Padding + Paddings map[string]*Padding + Pages map[string]*PDFPage + Paper string + RadioBtnAPs map[float64]*AP + SimpleBoxPool map[string]*SimpleBox + TablePool map[string]*Table + TextBoxPool map[string]*TextBox + TimestampFormat string + XObjectResIDs map[int]types.Dict + XRefTable *model.XRefTable + func (pdf *PDF) DuplicateField(ID string) bool + func (pdf *PDF) RenderPages() ([]*model.Page, model.FontMap, error) + func (pdf *PDF) Update() bool + func (pdf *PDF) Validate() error + type PDFPage struct + BackgroundColor string + Border *Border + Borders map[string]*Border + Content *Content + Crop string + DA types.Object + FieldGroupPool map[string]*FieldGroup + FileNames map[string]string + Fonts map[string]*FormFont + Guides []*Guide + ImageBoxPool map[string]*ImageBox + Margin *Margin + Margins map[string]*Margin + Padding *Padding + Paddings map[string]*Padding + Paper string + SimpleBoxPool map[string]*SimpleBox + TablePool map[string]*Table + Tabs types.IntSet + TextBoxPool map[string]*TextBox + type Padding struct + Bottom float64 + Left float64 + Name string + Right float64 + Top float64 + Width float64 + type RadioButtonGroup struct + BackgroundColor string + Buttons *Buttons + Debug bool + Default string + Dx float64 + Dy float64 + Hide bool + ID string + Label *TextFieldLabel + Locked bool + Margin *Margin + Orientation string + Position [2]float64 + RTL bool + Tab int + Tip string + Value string + Width float64 + func (rbg *RadioButtonGroup) Rtl() bool + type Regions struct + Bottom *Content + Divider *Divider + Left *Content + Name string + Orientation string + Right *Content + Top *Content + type SimpleBox struct + Anchor string + Border *Border + Dx float64 + Dy float64 + FillColor string + Height float64 + Hide bool + Margin *Margin + Name string + Position [2]float64 + Rotation float64 + Width float64 + type Table struct + Anchor string + BackgroundColor string + Border *Border + ColAnchors []string + ColPaddings []*Padding + ColWidths []int + Cols int + Dx float64 + Dy float64 + EvenColor string + Font *FormFont + Grid bool + Header *TableHeader + Hide bool + LineHeight int + Margin *Margin + Name string + OddColor string + Padding *Padding + Position [2]float64 + RTL bool + Rotation float64 + Rows int + Values [][]string + Width float64 + func (t *Table) Height() float64 + type TableHeader struct + BackgroundColor string + ColAnchors []string + ColPaddings []*Padding + Font *FormFont + RTL bool + Values []string + type TextBox struct + Alignment string + Anchor string + BackgroundColor string + Border *Border + Dx float64 + Dy float64 + Font *FormFont + Hide bool + Margin *Margin + Name string + Padding *Padding + Position [2]float64 + RTL bool + Rotation float64 + Value string + Width float64 + type TextField struct + Alignment string + BackgroundColor string + BgCol *color.SimpleColor + Border *Border + BoundingBox *types.Rectangle + Debug bool + Default string + Dx float64 + Dy float64 + Font *FormFont + Height float64 + Hide bool + HorAlign types.HAlignment + ID string + Label *TextFieldLabel + Locked bool + Margin *Margin + Multiline bool + Position [2]float64 + RTL bool + Tab int + Tip string + Value string + Width float64 + func NewTextField(ctx *model.Context, d types.Dict, v string, multiLine bool, ...) (*TextField, *types.IndirectRef, error) + func (tf *TextField) RefreshN(xRefTable *model.XRefTable, indRef *types.IndirectRef) error + func (tf *TextField) SetFontID(s string) + type TextFieldLabel struct + Gap int + Position string + Width int