Versions in this module Expand all Collapse all v0 v0.2.6 Dec 5, 2026 v0.2.5 Dec 5, 2026 v0.2.4 Dec 3, 2026 v0.2.3 Nov 29, 2026 v0.2.2 Nov 22, 2026 Changes in this version + const StyleFirstLineIndent + const StyleLineHeight + const StyleSize + const StyleSpaceAfter + const StyleSpaceBefore + func Compose(ctx context.Context, source []Block, opts Options) (*creator.Document, error) + func ValidateText(text string) error + type Block struct + Callout *Callout + CodeLang string + Fixed *Fixed + ID string + Image *Image + Indent float64 + KeepTogether bool + KeepWithNext bool + Kind string + LeadingIcon *Icon + LeftBorderColor *creator.Color + 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 Callout struct + AccentColor *creator.Color + Appearance string + Blocks []Block + BorderColor *creator.Color + ContinuationSuffix string + Fill *creator.Color + Pagination string + RepeatTitle bool + Runs []Run + ShowIcon bool + Text string + Title string + Variant string + type CalloutPalette struct + AccentColor *creator.Color + BorderColor *creator.Color + Fill *creator.Color + type CalloutTheme struct + Danger CalloutPalette + Info CalloutPalette + Neutral CalloutPalette + Success CalloutPalette + Warning CalloutPalette + 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 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 Icon struct + Data string + Height float64 + Rule string + Width float64 + type Image struct + Align string + Caption string + CaptionPrefix string + Data []byte + Fit string + 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 + PageNumberSize float64 + Signature *OfficialSignature + type OfficialColophon struct + Cc string + IssuedBy string + IssuedDate string + Size float64 + type OfficialFonts struct + Body string + Hei string + Kai string + Song string + Title string + type OfficialLetterhead struct + DocNo string + DocNoSize float64 + Height float64 + Org string + OrgSize float64 + Security string + SerialNo string + Signatory string + Urgency string + type OfficialSignature struct + Date string + Org string + Size float64 + type Options struct + AllowLogicalFonts bool + BoldFont string + BoldItalicFont string + CodeFont 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 + type Run struct + Bold bool + CaptionRef string + Code bool + Color *creator.Color + Font string + Footnote string + Href string + Italic bool + Link 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 + Format string + 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 + Callouts CalloutTheme + Caption TextStyle + HeaderFill *creator.Color + Headings [6]TextStyle + Table TextStyle + func Bootstrap5Theme() Theme + func CarbonTheme() Theme + func Fluent2Theme() Theme + func GBT9704Theme(fonts OfficialFonts) Theme + func Material2Theme() Theme + func Material3Theme() Theme + func MaterialTheme() Theme