Versions in this module Expand all Collapse all v0 v0.1.7 Oct 30, 2026 v0.1.6 Oct 27, 2026 Changes in this version + const StyleFirstLineIndent + const StyleLineHeight + const StyleSize + const StyleSpaceAfter + const StyleSpaceBefore + type Block struct + Fixed *Fixed + ID string + Image *Image + KeepTogether bool + KeepWithNext bool + Kind string + Level int + Marker string + Orphans int + PageBreakAfter bool + PageBreakBefore bool + Runs []Run + Section *Section + Style *TextStyle + TOC *TOC + Table *Table + Text string + Widows int + type CellBorders struct + Bottom *TableBorder + Left *TableBorder + Right *TableBorder + Top *TableBorder + type CellStyle struct + Borders *CellBorders + Fill *creator.Color + Padding *Margins + VerticalAlign string + type Columns struct + Balance bool + Count int + Gap float64 + type Document struct + Blocks []Block + Metadata creator.Document + Options Options + func New(options ...Options) *Document + func (d *Document) AddColumnBreak() + func (d *Document) AddFigureList(title ...string) + func (d *Document) AddFixed(fixed Fixed) + func (d *Document) AddHeading(level int, text string) + func (d *Document) AddImage(image Image) + func (d *Document) AddList(ordered bool, items []string) + func (d *Document) AddPageBreak() + func (d *Document) AddParagraph(text string, style ...TextStyle) + func (d *Document) AddRecipient(text string) + func (d *Document) AddSection(section Section) + func (d *Document) AddTOC(options ...TOC) + func (d *Document) AddTable(table Table) + func (d *Document) AddTableList(title ...string) + func (d *Document) Build(ctx context.Context) (*creator.Document, error) + func (d *Document) Write(ctx context.Context, w io.Writer, options creator.CreateOptions) error + type Fixed struct + Align string + Caption string + CaptionPrefix string + Height float64 + Items []creator.Item + Numbered bool + Width float64 + type FontFamily struct + Bold string + BoldItalic string + Italic string + Regular string + type Footnote struct + ID string + Runs []Run + Style *TextStyle + Text string + type Image struct + Caption string + CaptionPrefix string + Data []byte + Height float64 + Numbered bool + Width float64 + type Margins struct + Bottom float64 + Left float64 + Right float64 + Top float64 + type NamedStyle struct + Name string + Style TextStyle + type Official struct + Colophon *OfficialColophon + Fonts OfficialFonts + Letterhead *OfficialLetterhead + Signature *OfficialSignature + type OfficialColophon struct + Cc string + IssuedBy string + IssuedDate string + type OfficialFonts struct + Body string + Hei string + Kai string + Song string + Title string + type OfficialLetterhead struct + DocNo string + Org string + OrgSize float64 + Security string + SerialNo string + Signatory string + Urgency string + type OfficialSignature struct + Date string + Org string + type Options struct + BoldFont string + BoldItalicFont string + Columns Columns + FallbackFonts []string + FontFaces map[string]int + FontFamilies []FontFamily + Fonts []creator.Font + Footer string + FootnoteStyle *TextStyle + Footnotes []Footnote + GenerateOutlines bool + Header string + ItalicFont string + MarginBottom float64 + MarginLeft float64 + MarginRight float64 + MarginTop float64 + Official *Official + PageNumbers bool + PageSize creator.PageSize + ReferencePageNumbers string + Styles []NamedStyle + Theme Theme + func DefaultOptions() Options + func GBT9704Options(fonts OfficialFonts) Options + type Run struct + Bold bool + CaptionRef string + Font string + Footnote string + Href string + Italic bool + PageRef string + Strike bool + Target string + Text string + TitleRef string + type Section struct + Columns *Columns + FirstPageFooter *string + FirstPageHeader *string + Footer *string + Header *string + HideFirstPageNumber bool + Margins *Margins + PageNumberPrefix *string + PageNumberStyle string + PageNumbers *bool + PageSize *creator.PageSize + StartPageNumber *int + type TOC struct + MaxLevel int + Source string + Title string + type Table struct + Caption string + CaptionPrefix string + CellStyle *CellStyle + ColumnWidths []float64 + Columns []TableColumn + ContinuationSuffix string + Grid [][]TableCell + Header []string + HeaderRows int + Numbered bool + RepeatCaption bool + Rows [][]string + SplitRows bool + StripeFill *creator.Color + type TableBorder struct + Color *creator.Color + Width float64 + type TableCell struct + Appearance *CellStyle + ColSpan int + RowSpan int + Runs []Run + Style *TextStyle + Text string + type TableColumn struct + Align string + MaxWidth float64 + MinWidth float64 + NoWrap bool + Weight float64 + Width float64 + type TextStyle struct + Align string + BasedOn string + Color *creator.Color + FirstLineIndent float64 + Font string + LineHeight float64 + Set uint32 + Size float64 + SpaceAfter float64 + SpaceBefore float64 + type Theme struct + Body TextStyle + BorderColor *creator.Color + Caption TextStyle + HeaderFill *creator.Color + Headings [6]TextStyle + Table TextStyle + func Bootstrap5Theme() Theme + func CarbonTheme() Theme + func Fluent2Theme() Theme + func Material2Theme() Theme + func Material3Theme() Theme + func MaterialTheme() Theme