Versions in this module Expand all Collapse all v0 v0.1.2 Jul 30, 2026 Changes in this version + type ColumnDef struct + Space string + W string + XMLName xml.Name type Columns + Col []ColumnDef + EqualWidth string + type SectType struct + Val string + XMLName xml.Name type SectionProperties + Type *SectType v0.1.1 Jun 26, 2026 Changes in this version + var ErrBlockNotFound = NewDocumentError("block_not_found", fmt.Errorf("block not found"), "") + var ErrCorruptedFile = errors.New("corrupted file") + var ErrDocumentNotFound = errors.New("document not found") + var ErrInvalidBlockDefinition = NewDocumentError("invalid_block_definition", fmt.Errorf("invalid block definition"), "") + var ErrInvalidDocument = errors.New("invalid document") + var ErrInvalidFormat = errors.New("invalid format") + var ErrInvalidPageSettings = errors.New("invalid page settings") + var ErrInvalidTemplateData = NewDocumentError("invalid_template_data", fmt.Errorf("invalid template data"), "") + var ErrTemplateNotFound = NewDocumentError("template_not_found", fmt.Errorf("template not found"), "") + var ErrTemplateRenderError = NewDocumentError("template_render_error", fmt.Errorf("template render error"), "") + var ErrTemplateSyntaxError = NewDocumentError("template_syntax_error", fmt.Errorf("template syntax error"), "") + var ErrUnsupportedOperation = errors.New("unsupported operation") + func Debug(msg string) + func Debugf(format string, args ...interface{}) + func Error(msg string) + func Errorf(format string, args ...interface{}) + func Info(msg string) + func Infof(format string, args ...interface{}) + func SetGlobalLevel(level LogLevel) + func SetGlobalOutput(output io.Writer) + func Warn(msg string) + func Warnf(format string, args ...interface{}) + func WrapError(operation string, err error) error + func WrapErrorWithContext(operation string, err error, context string) error + type AbstractNum struct + AbstractNumID string + Levels []*Level + XMLName xml.Name + type AbstractNumReference struct + Val string + XMLName xml.Name + type AlignmentType string + const AlignCenter + const AlignJustify + const AlignLeft + const AlignRight + type AnchorDrawing struct + AllowOverlap string + BehindDoc string + CNvGraphicFramePr *CNvGraphicFramePr + DistB string + DistL string + DistR string + DistT string + DocPr *DrawingDocPr + EffectExtent *EffectExtent + Extent *DrawingExtent + Graphic *DrawingGraphic + LayoutInCell string + Locked string + PositionH *HorizontalPosition + PositionV *VerticalPosition + RelativeHeight string + SimplePos string + SimplePosition *SimplePosition + WrapNone *WrapNone + WrapSquare *WrapSquare + WrapThrough *WrapThrough + WrapTight *WrapTight + WrapTopAndBottom *WrapTopAndBottom + XMLName xml.Name + type AppProperties struct + Application string + Characters int + DocSecurity int + Lines int + LinksUpToDate bool + Pages int + Paragraphs int + ScaleCrop bool + Words int + XMLName xml.Name + Xmlns string + XmlnsVT string + type AvLst struct + XMLName xml.Name + type Blip struct + Embed string + XMLName xml.Name + type BlipFill struct + Blip *Blip + Stretch *Stretch + XMLName xml.Name + type Body struct + Elements []interface{} + XMLName xml.Name + func (b *Body) AddElement(element interface{}) + func (b *Body) GetParagraphs() []*Paragraph + func (b *Body) GetTables() []*Table + func (b *Body) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type BodyElement interface + ElementType func() string + type Bold struct + XMLName xml.Name + type BoldCs struct + XMLName xml.Name + type BookmarkEnd struct + ID string + XMLName xml.Name + func (b *BookmarkEnd) ElementType() string + type BookmarkStart struct + ID string + Name string + XMLName xml.Name + func (b *BookmarkStart) ElementType() string + type BorderConfig struct + Color string + Space int + Style BorderStyle + Width int + type BorderStyle string + const BorderStyleDashDotStroked + const BorderStyleDashSmallGap + const BorderStyleDashed + const BorderStyleDotDash + const BorderStyleDotDotDash + const BorderStyleDotted + const BorderStyleDouble + const BorderStyleDoubleWave + const BorderStyleInset + const BorderStyleNone + const BorderStyleOutset + const BorderStyleSingle + const BorderStyleThick + const BorderStyleThickThinLargeGap + const BorderStyleThickThinMediumGap + const BorderStyleThickThinSmallGap + const BorderStyleThinThickLargeGap + const BorderStyleThinThickMediumGap + const BorderStyleThinThickSmallGap + const BorderStyleThinThickThinLargeGap + const BorderStyleThinThickThinMediumGap + const BorderStyleThinThickThinSmallGap + const BorderStyleThreeDEmboss + const BorderStyleThreeDEngrave + const BorderStyleTriple + const BorderStyleWave + type Break struct + Type string + XMLName xml.Name + type BulletType string + const BulletTypeArrow + const BulletTypeCircle + const BulletTypeDash + const BulletTypeDot + const BulletTypeSquare + type CNvGraphicFramePr struct + GraphicFrameLocks *GraphicFrameLocks + XMLName xml.Name + type CNvPicPr struct + PicLocks *PicLocks + XMLName xml.Name + type CNvPr struct + Descr string + ID string + Name string + Title string + XMLName xml.Name + type CPText struct + Text string + type CantSplit struct + Val string + XMLName xml.Name + type CellAlignment string + const CellAlignCenter + const CellAlignJustify + const CellAlignLeft + const CellAlignRight + type CellBorderConfig struct + Bottom *BorderConfig + DiagDown *BorderConfig + DiagUp *BorderConfig + Left *BorderConfig + Right *BorderConfig + Top *BorderConfig + type CellFormat struct + BackgroundColor string + BorderStyle string + HorizontalAlign CellAlignment + Padding int + TextDirection CellTextDirection + TextFormat *TextFormat + VerticalAlign CellVerticalAlignment + type CellImageConfig struct + AltText string + Data []byte + FilePath string + Format ImageFormat + Height float64 + KeepAspectRatio bool + Title string + Width float64 + type CellInfo struct + Cell *TableCell + Col int + IsLast bool + Row int + Text string + type CellIterator struct + func (iter *CellIterator) Current() (int, int) + func (iter *CellIterator) HasNext() bool + func (iter *CellIterator) Next() (*CellInfo, error) + func (iter *CellIterator) Progress() float64 + func (iter *CellIterator) Reset() + func (iter *CellIterator) Total() int + type CellListConfig struct + BulletSymbol BulletType + Items []string + Type ListType + type CellTextDirection string + const TextDirectionBT + const TextDirectionBTV + const TextDirectionLR + const TextDirectionRL + const TextDirectionTB + const TextDirectionTBV + type CellVerticalAlignment string + const CellVAlignBottom + const CellVAlignCenter + const CellVAlignTop + type CharacterSpacingControl struct + Val string + XMLName xml.Name + type Color struct + Val string + XMLName xml.Name + type Columns struct + Num string + Space string + XMLName xml.Name + type ContentTypes struct + Defaults []Default + Overrides []Override + XMLName xml.Name + Xmlns string + type CoreProperties struct + Category *CPText + Created *DCDate + Creator *DCText + Description *DCText + Keywords *CPText + Language *DCText + LastPrinted *DCDate + Modified *DCDate + Revision *CPText + Subject *DCText + Title *DCText + Version *CPText + XMLName xml.Name + XmlnsCP string + XmlnsDC string + XmlnsDCMIType string + XmlnsDCTerms string + XmlnsXSI string + type DCDate struct + Date time.Time + XSIType string + type DCText struct + Text string + type Default struct + ContentType string + Extension string + type DefaultTabStop struct + Val string + XMLName xml.Name + type DocGrid struct + CharSpace string + LinePitch string + Type string + XMLName xml.Name + type DocGridType string + const DocGridDefault + const DocGridLines + const DocGridSnapToChars + const DocGridSnapToLines + type DocPart struct + Val string + XMLName xml.Name + type DocPartGallery struct + Val string + XMLName xml.Name + type DocPartObj struct + DocPartGallery *DocPartGallery + DocPartUnique *DocPartUnique + XMLName xml.Name + type DocPartUnique struct + XMLName xml.Name + type Document struct + Body *Body + func New() *Document + func Open(filename string) (*Document, error) + func OpenFromMemory(readCloser io.ReadCloser) (*Document, error) + func (d *Document) AddBulletList(text string, level int, bulletType BulletType) *Paragraph + func (d *Document) AddCellImage(table *Table, row, col int, config *CellImageConfig) (*ImageInfo, error) + func (d *Document) AddCellImageFromData(table *Table, row, col int, data []byte, widthMM float64) (*ImageInfo, error) + func (d *Document) AddCellImageFromFile(table *Table, row, col int, filePath string, widthMM float64) (*ImageInfo, error) + func (d *Document) AddEndnote(text string, endnoteText string) error + func (d *Document) AddFooter(footerType HeaderFooterType, text string) error + func (d *Document) AddFooterWithPageNumber(footerType HeaderFooterType, text string, showPageNum bool) error + func (d *Document) AddFootnote(text string, footnoteText string) error + func (d *Document) AddFootnoteToRun(run *Run, footnoteText string) error + func (d *Document) AddFormattedFooter(footerType HeaderFooterType, config *HeaderFooterConfig) error + func (d *Document) AddFormattedHeader(headerType HeaderFooterType, config *HeaderFooterConfig) error + func (d *Document) AddFormattedParagraph(text string, format *TextFormat) *Paragraph + func (d *Document) AddHeader(headerType HeaderFooterType, text string) error + func (d *Document) AddHeaderWithPageNumber(headerType HeaderFooterType, text string, showPageNum bool) error + func (d *Document) AddHeadingParagraph(text string, level int) *Paragraph + func (d *Document) AddHeadingParagraphWithBookmark(text string, level int, bookmarkName string) *Paragraph + func (d *Document) AddHeadingWithBookmark(text string, level int, bookmarkName string) *Paragraph + func (d *Document) AddImageFromData(imageData []byte, fileName string, format ImageFormat, width, height int, ...) (*ImageInfo, error) + func (d *Document) AddImageFromDataWithoutElement(imageData []byte, fileName string, format ImageFormat, width, height int, ...) (*ImageInfo, error) + func (d *Document) AddImageFromFile(filePath string, config *ImageConfig) (*ImageInfo, error) + func (d *Document) AddListItem(text string, config *ListConfig) *Paragraph + func (d *Document) AddMathFormula(latex string, isBlock bool) *MathParagraph + func (d *Document) AddNumberedList(text string, level int, numType ListType) *Paragraph + func (d *Document) AddPageBreak() + func (d *Document) AddParagraph(text string) *Paragraph + func (d *Document) AddTable(config *TableConfig) (*Table, error) + func (d *Document) AutoGenerateTOC(config *TOCConfig) error + func (d *Document) ClearDocGrid() error + func (d *Document) CreateMultiLevelList(items []ListItem) error + func (d *Document) CreateTOCSDT(title string, maxLevel int) *SDT + func (d *Document) CreateTable(config *TableConfig) (*Table, error) + func (d *Document) GenerateTOC(config *TOCConfig) error + func (d *Document) GetDocumentProperties() (*DocumentProperties, error) + func (d *Document) GetEndnoteCount() int + func (d *Document) GetFootnoteCount() int + func (d *Document) GetHeadingCount() map[int]int + func (d *Document) GetPageSettings() *PageSettings + func (d *Document) GetParts() map[string][]byte + func (d *Document) GetStyleManager() *style.StyleManager + func (d *Document) ListHeadings() []TOCEntry + func (d *Document) RemoveElementAt(index int) bool + func (d *Document) RemoveEndnote(endnoteID string) error + func (d *Document) RemoveFootnote(footnoteID string) error + func (d *Document) RemoveParagraph(paragraph *Paragraph) bool + func (d *Document) RemoveParagraphAt(index int) bool + func (d *Document) ResizeImage(imageInfo *ImageInfo, size *ImageSize) error + func (d *Document) RestartNumbering(numID string) + func (d *Document) Save(filename string) error + func (d *Document) SetAuthor(author string) error + func (d *Document) SetCategory(category string) error + func (d *Document) SetCustomPageSize(width, height float64) error + func (d *Document) SetDescription(description string) error + func (d *Document) SetDifferentFirstPage(different bool) + func (d *Document) SetDocGrid(gridType DocGridType, linePitch int, charSpace int) error + func (d *Document) SetDocumentProperties(properties *DocumentProperties) error + func (d *Document) SetFootnoteConfig(config *FootnoteConfig) error + func (d *Document) SetGutterWidth(width float64) error + func (d *Document) SetHeaderFooterDistance(header, footer float64) error + func (d *Document) SetImageAlignment(imageInfo *ImageInfo, alignment AlignmentType) error + func (d *Document) SetImageAltText(imageInfo *ImageInfo, altText string) error + func (d *Document) SetImagePosition(imageInfo *ImageInfo, position ImagePosition, offsetX, offsetY float64) error + func (d *Document) SetImageTitle(imageInfo *ImageInfo, title string) error + func (d *Document) SetImageWrapText(imageInfo *ImageInfo, wrapText ImageWrapText) error + func (d *Document) SetKeywords(keywords string) error + func (d *Document) SetPageMargins(top, right, bottom, left float64) error + func (d *Document) SetPageOrientation(orientation PageOrientation) error + func (d *Document) SetPageSettings(settings *PageSettings) error + func (d *Document) SetPageSize(size PageSize) error + func (d *Document) SetSubject(subject string) error + func (d *Document) SetTOCStyle(level int, style *TextFormat) error + func (d *Document) SetTitle(title string) error + func (d *Document) ToBytes() ([]byte, error) + func (d *Document) UpdateStatistics() error + func (d *Document) UpdateTOC() error + type DocumentError struct + Cause error + Context string + Operation string + func NewDocumentError(operation string, cause error, context string) *DocumentError + func (e *DocumentError) Error() string + func (e *DocumentError) Unwrap() error + type DocumentProperties struct + Category string + Characters int + Created time.Time + Creator string + Description string + Keywords string + Language string + LastModified time.Time + LastPrinted time.Time + Lines int + Pages int + Paragraphs int + Revision string + Subject string + Title string + Version string + Words int + type DrawingDocPr struct + Descr string + ID string + Name string + Title string + XMLName xml.Name + type DrawingElement struct + Anchor *AnchorDrawing + Inline *InlineDrawing + XMLName xml.Name + type DrawingExtent struct + Cx string + Cy string + XMLName xml.Name + type DrawingGraphic struct + GraphicData *GraphicData + XMLName xml.Name + Xmlns string + type EffectExtent struct + B string + L string + R string + T string + XMLName xml.Name + type Endnote struct + ID string + Paragraphs []*Paragraph + Type string + XMLName xml.Name + type EndnoteNumFmt struct + Val string + XMLName xml.Name + type EndnoteNumRestart struct + Val string + XMLName xml.Name + type EndnoteNumStart struct + Val string + XMLName xml.Name + type EndnotePos struct + Val string + XMLName xml.Name + type EndnotePr struct + NumFmt *EndnoteNumFmt + NumRestart *EndnoteNumRestart + NumStart *EndnoteNumStart + Pos *EndnotePos + XMLName xml.Name + type EndnoteProperties struct + NumberFormat string + Position string + RestartRule string + StartNumber int + type EndnoteReference struct + ID string + XMLName xml.Name + type Endnotes struct + Endnotes []*Endnote + XMLName xml.Name + Xmlns string + type Ext struct + Cx string + Cy string + XMLName xml.Name + type FieldChar struct + FieldCharType string + XMLName xml.Name + type FillRect struct + XMLName xml.Name + type FontFamily struct + ASCII string + CS string + EastAsia string + HAnsi string + Hint string + XMLName xml.Name + type FontSize struct + Val string + XMLName xml.Name + type FontSizeCs struct + Val string + XMLName xml.Name + type Footer struct + MCIgnorable string + Paragraphs []*Paragraph + XMLName xml.Name + XmlnsM string + XmlnsMC string + XmlnsO string + XmlnsR string + XmlnsV string + XmlnsW string + XmlnsW10 string + XmlnsW14 string + XmlnsW15 string + XmlnsWNE string + XmlnsWP string + XmlnsWP14 string + XmlnsWPC string + XmlnsWPG string + XmlnsWPI string + XmlnsWPS string + XmlnsWPSCD string + type FooterReference struct + ID string + Type string + XMLName xml.Name + type Footnote struct + ID string + Paragraphs []*Paragraph + Type string + XMLName xml.Name + type FootnoteConfig struct + NumberFormat FootnoteNumberFormat + Position FootnotePosition + RestartEach FootnoteRestart + StartNumber int + func DefaultFootnoteConfig() *FootnoteConfig + type FootnoteManager struct + type FootnoteNumFmt struct + Val string + XMLName xml.Name + type FootnoteNumRestart struct + Val string + XMLName xml.Name + type FootnoteNumStart struct + Val string + XMLName xml.Name + type FootnoteNumberFormat string + const FootnoteFormatDecimal + const FootnoteFormatLowerLetter + const FootnoteFormatLowerRoman + const FootnoteFormatSymbol + const FootnoteFormatUpperLetter + const FootnoteFormatUpperRoman + type FootnotePos struct + Val string + XMLName xml.Name + type FootnotePosition string + const FootnotePositionBeneathText + const FootnotePositionDocumentEnd + const FootnotePositionPageBottom + const FootnotePositionSectionEnd + type FootnotePr struct + NumFmt *FootnoteNumFmt + NumRestart *FootnoteNumRestart + NumStart *FootnoteNumStart + Pos *FootnotePos + XMLName xml.Name + type FootnoteProperties struct + NumberFormat string + Position string + RestartRule string + StartNumber int + type FootnoteReference struct + ID string + XMLName xml.Name + type FootnoteRestart string + const FootnoteRestartContinuous + const FootnoteRestartEachPage + const FootnoteRestartEachSection + type FootnoteType string + const FootnoteTypeEndnote + const FootnoteTypeFootnote + type Footnotes struct + Footnotes []*Footnote + XMLName xml.Name + Xmlns string + type GraphicData struct + Pic *PicElement + Uri string + XMLName xml.Name + type GraphicFrameLocks struct + NoChangeAspect string + NoCrop string + NoMove string + NoResize string + NoRot string + NoSelect string + XMLName xml.Name + Xmlns string + type GridSpan struct + Val string + XMLName xml.Name + type Header struct + MCIgnorable string + Paragraphs []*Paragraph + XMLName xml.Name + XmlnsM string + XmlnsMC string + XmlnsO string + XmlnsR string + XmlnsV string + XmlnsW string + XmlnsW10 string + XmlnsW14 string + XmlnsW15 string + XmlnsWNE string + XmlnsWP string + XmlnsWP14 string + XmlnsWPC string + XmlnsWPG string + XmlnsWPI string + XmlnsWPS string + XmlnsWPSCD string + type HeaderFooterConfig struct + Alignment AlignmentType + Format *TextFormat + Text string + type HeaderFooterReference struct + ID string + Type string + XMLName xml.Name + type HeaderFooterType string + const HeaderFooterTypeDefault + const HeaderFooterTypeEven + const HeaderFooterTypeFirst + type HideMark struct + Val string + XMLName xml.Name + type Highlight struct + Val string + XMLName xml.Name + type HorizontalPosition struct + Align *PosAlign + PosOffset *PosOffset + RelativeFrom string + XMLName xml.Name + type Hyperlink struct + Anchor string + Runs []Run + XMLName xml.Name + type HyperlinkField struct + BeginChar FieldChar + EndChar FieldChar + InstrText InstrText + SeparateChar FieldChar + func CreateHyperlinkField(anchor string) HyperlinkField + type ILevel struct + Val string + XMLName xml.Name + type ImageConfig struct + Alignment AlignmentType + AltText string + OffsetX float64 + OffsetY float64 + Position ImagePosition + Size *ImageSize + Title string + WrapText ImageWrapText + type ImageFormat string + const ImageFormatGIF + const ImageFormatJPEG + const ImageFormatPNG + type ImageInfo struct + Config *ImageConfig + Data []byte + Format ImageFormat + Height int + ID string + RelationID string + Width int + type ImagePosition string + const ImagePositionFloatLeft + const ImagePositionFloatRight + const ImagePositionInline + type ImageSize struct + Height float64 + KeepAspectRatio bool + Width float64 + type ImageWrapText string + const ImageWrapNone + const ImageWrapSquare + const ImageWrapTight + const ImageWrapTopAndBottom + type Indentation struct + FirstLine string + Left string + Right string + XMLName xml.Name + type InlineDrawing struct + DistB string + DistL string + DistR string + DistT string + DocPr *DrawingDocPr + Extent *DrawingExtent + Graphic *DrawingGraphic + XMLName xml.Name + type InstrText struct + Content string + Space string + XMLName xml.Name + type Italic struct + XMLName xml.Name + type ItalicCs struct + XMLName xml.Name + type Justification struct + Val string + XMLName xml.Name + type KeepLines struct + Val string + XMLName xml.Name + type KeepNext struct + Val string + XMLName xml.Name + type Level struct + ILevel string + LevelJc *LevelJc + LevelText *LevelText + NumFmt *NumFmt + PPr *LevelPPr + RPr *LevelRPr + Start *Start + XMLName xml.Name + type LevelIndent struct + Hanging string + Left string + XMLName xml.Name + type LevelJc struct + Val string + XMLName xml.Name + type LevelPPr struct + Ind *LevelIndent + XMLName xml.Name + type LevelRPr struct + FontFamily *FontFamily + XMLName xml.Name + type LevelText struct + Val string + XMLName xml.Name + type ListConfig struct + BulletSymbol BulletType + IndentLevel int + StartNumber int + Type ListType + type ListItem struct + BulletSymbol BulletType + Level int + StartNumber int + Text string + Type ListType + type ListType string + const ListTypeBullet + const ListTypeDecimal + const ListTypeLowerLetter + const ListTypeLowerRoman + const ListTypeNumber + const ListTypeUpperLetter + const ListTypeUpperRoman + type LogLevel int + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelSilent + const LogLevelWarn + func (l LogLevel) String() string + type Logger struct + func NewLogger(level LogLevel, output io.Writer) *Logger + func (l *Logger) Debug(msg string) + func (l *Logger) Debugf(format string, args ...interface{}) + func (l *Logger) Error(msg string) + func (l *Logger) Errorf(format string, args ...interface{}) + func (l *Logger) Info(msg string) + func (l *Logger) Infof(format string, args ...interface{}) + func (l *Logger) SetLevel(level LogLevel) + func (l *Logger) SetOutput(output io.Writer) + func (l *Logger) Warn(msg string) + func (l *Logger) Warnf(format string, args ...interface{}) + type MathParagraph struct + Math *OfficeMath + MathPara *OfficeMathPara + Properties *ParagraphProperties + Runs []Run + XMLName xml.Name + func (mp *MathParagraph) ElementType() string + func (mp *MathParagraph) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type NoWrap struct + Val string + XMLName xml.Name + type NumFmt struct + Val string + XMLName xml.Name + type NumID struct + Val string + XMLName xml.Name + type NumInstance struct + AbstractNumID *AbstractNumReference + NumID string + XMLName xml.Name + type Numbering struct + AbstractNums []*AbstractNum + NumberingInstances []*NumInstance + XMLName xml.Name + Xmlns string + type NumberingManager struct + type NumberingProperties struct + ILevel *ILevel + NumID *NumID + XMLName xml.Name + type NvPicPr struct + CNvPicPr *CNvPicPr + CNvPr *CNvPr + XMLName xml.Name + type Off struct + X string + XMLName xml.Name + Y string + type OfficeMath struct + RawXML string + XMLName xml.Name + Xmlns string + type OfficeMathPara struct + Math *OfficeMath + XMLName xml.Name + Xmlns string + type OutlineLevel struct + Val string + XMLName xml.Name + type Override struct + ContentType string + PartName string + type PageBreakBefore struct + Val string + XMLName xml.Name + type PageMargin struct + Bottom string + Footer string + Gutter string + Header string + Left string + Right string + Top string + XMLName xml.Name + type PageNumType struct + Fmt string + XMLName xml.Name + type PageNumber struct + Instr string + Text *Text + XMLName xml.Name + type PageOrientation string + const OrientationLandscape + const OrientationPortrait + type PageRefField struct + BeginChar FieldChar + EndChar FieldChar + InstrText InstrText + SeparateChar FieldChar + func CreatePageRefField(anchor string) PageRefField + type PageSettings struct + CustomHeight float64 + CustomWidth float64 + DocGridCharSpace int + DocGridLinePitch int + DocGridType DocGridType + FooterDistance float64 + GutterWidth float64 + HeaderDistance float64 + MarginBottom float64 + MarginLeft float64 + MarginRight float64 + MarginTop float64 + Orientation PageOrientation + Size PageSize + func DefaultPageSettings() *PageSettings + type PageSize string + const PageSizeA3 + const PageSizeA4 + const PageSizeA5 + const PageSizeCustom + const PageSizeLegal + const PageSizeLetter + type PageSizeXML struct + H string + Orient string + W string + XMLName xml.Name + type Paragraph struct + Properties *ParagraphProperties + Runs []Run + XMLName xml.Name + func (p *Paragraph) AddFormattedText(text string, format *TextFormat) + func (p *Paragraph) AddInlineMath(ommlContent string) + func (p *Paragraph) AddPageBreak() + func (p *Paragraph) ElementType() string + func (p *Paragraph) SetAlignment(alignment AlignmentType) + func (p *Paragraph) SetBold(bold bool) + func (p *Paragraph) SetBorder(top, left, bottom, right *ParagraphBorderConfig) + func (p *Paragraph) SetColor(color string) + func (p *Paragraph) SetFontFamily(name string) + func (p *Paragraph) SetFontSize(size int) + func (p *Paragraph) SetHighlight(color string) + func (p *Paragraph) SetHorizontalRule(style BorderStyle, size int, color string) + func (p *Paragraph) SetIndentation(firstLineCm, leftCm, rightCm float64) + func (p *Paragraph) SetItalic(italic bool) + func (p *Paragraph) SetKeepLines(keep bool) + func (p *Paragraph) SetKeepWithNext(keep bool) + func (p *Paragraph) SetOutlineLevel(level int) + func (p *Paragraph) SetPageBreakBefore(pageBreak bool) + func (p *Paragraph) SetParagraphFormat(config *ParagraphFormatConfig) + func (p *Paragraph) SetSnapToGrid(snapToGrid bool) + func (p *Paragraph) SetSpacing(config *SpacingConfig) + func (p *Paragraph) SetStrike(strike bool) + func (p *Paragraph) SetStyle(styleID string) + func (p *Paragraph) SetUnderline(underline bool) + func (p *Paragraph) SetWidowControl(control bool) + type ParagraphBorder struct + Bottom *ParagraphBorderLine + Left *ParagraphBorderLine + Right *ParagraphBorderLine + Top *ParagraphBorderLine + XMLName xml.Name + type ParagraphBorderConfig struct + Color string + Size int + Space int + Style BorderStyle + type ParagraphBorderLine struct + Color string + Space string + Sz string + Val string + type ParagraphFormatConfig struct + AfterPara int + Alignment AlignmentType + BeforePara int + FirstLineCm float64 + FirstLineIndent int + KeepLines bool + KeepWithNext bool + LeftCm float64 + LineSpacing float64 + OutlineLevel int + PageBreakBefore bool + RightCm float64 + SnapToGrid *bool + Style string + WidowControl bool + type ParagraphProperties struct + Indentation *Indentation + Justification *Justification + KeepLines *KeepLines + KeepNext *KeepNext + NumberingProperties *NumberingProperties + OutlineLevel *OutlineLevel + PageBreakBefore *PageBreakBefore + ParagraphBorder *ParagraphBorder + ParagraphStyle *ParagraphStyle + SectPr *SectionProperties + SnapToGrid *SnapToGrid + Spacing *Spacing + Tabs *Tabs + WidowControl *WidowControl + func (pp *ParagraphProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type ParagraphStyle struct + Val string + XMLName xml.Name + type PicElement struct + BlipFill *BlipFill + NvPicPr *NvPicPr + SpPr *SpPr + XMLName xml.Name + Xmlns string + type PicLocks struct + NoChangeArrowheads string + NoChangeAspect string + XMLName xml.Name + type PolygonLineTo struct + X string + XMLName xml.Name + Y string + type PolygonStart struct + X string + XMLName xml.Name + Y string + type PosAlign struct + Value string + XMLName xml.Name + type PosOffset struct + Value string + XMLName xml.Name + type PrstGeom struct + AvLst *AvLst + Prst string + XMLName xml.Name + type Relationship struct + ID string + Target string + Type string + type Relationships struct + Relationships []Relationship + XMLName xml.Name + Xmlns string + type RowBreakConfig struct + CantSplit *CantSplit + TblHeader *TblHeader + TrHeight *TableRowH + XMLName xml.Name + type RowHeightConfig struct + Height int + Rule RowHeightRule + type RowHeightRule string + const RowHeightAuto + const RowHeightExact + const RowHeightMinimum + type Run struct + Break *Break + Drawing *DrawingElement + FieldChar *FieldChar + InstrText *InstrText + Properties *RunProperties + Text Text + XMLName xml.Name + func (r *Run) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type RunProperties struct + Bold *Bold + BoldCs *BoldCs + Color *Color + FontFamily *FontFamily + FontSize *FontSize + FontSizeCs *FontSizeCs + Highlight *Highlight + Italic *Italic + ItalicCs *ItalicCs + Strike *Strike + Underline *Underline + XMLName xml.Name + type SDT struct + Content *SDTContent + EndPr *SDTEndPr + Properties *SDTProperties + XMLName xml.Name + func (s *SDT) ElementType() string + func (sdt *SDT) AddTOCEntry(text string, level int, pageNum int, entryID string) + func (sdt *SDT) FinalizeTOCSDT() + type SDTColor struct + Val string + XMLName xml.Name + type SDTContent struct + Elements []interface{} + XMLName xml.Name + func (s *SDTContent) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type SDTEndPr struct + RunPr *RunProperties + XMLName xml.Name + type SDTID struct + Val string + XMLName xml.Name + type SDTPlaceholder struct + DocPart *DocPart + XMLName xml.Name + type SDTProperties struct + Color *SDTColor + DocPartObj *DocPartObj + ID *SDTID + Placeholder *SDTPlaceholder + RunPr *RunProperties + XMLName xml.Name + type SectionProperties struct + Columns *Columns + DocGrid *DocGrid + FooterReferences []*FooterReference + HeaderReferences []*HeaderFooterReference + PageMargins *PageMargin + PageNumType *PageNumType + PageSize *PageSizeXML + TitlePage *TitlePage + XMLName xml.Name + XmlnsR string + func (s *SectionProperties) ElementType() string + type Settings struct + CharacterSpacingControl *CharacterSpacingControl + DefaultTabStop *DefaultTabStop + EndnotePr *EndnotePr + FootnotePr *FootnotePr + XMLName xml.Name + Xmlns string + type ShadingConfig struct + BackgroundColor string + ForegroundColor string + Pattern ShadingPattern + type ShadingPattern string + const ShadingPatternClear + const ShadingPatternDiagCross + const ShadingPatternDiagStripe + const ShadingPatternHorzCross + const ShadingPatternHorzStripe + const ShadingPatternPct10 + const ShadingPatternPct20 + const ShadingPatternPct25 + const ShadingPatternPct30 + const ShadingPatternPct40 + const ShadingPatternPct5 + const ShadingPatternPct50 + const ShadingPatternPct60 + const ShadingPatternPct70 + const ShadingPatternPct75 + const ShadingPatternPct80 + const ShadingPatternPct90 + const ShadingPatternReverseDiagStripe + const ShadingPatternSolid + const ShadingPatternVertStripe + type SimplePosition struct + X string + XMLName xml.Name + Y string + type SnapToGrid struct + Val string + XMLName xml.Name + type SpPr struct + PrstGeom *PrstGeom + XMLName xml.Name + Xfrm *Xfrm + type Spacing struct + After string + Before string + Line string + LineRule string + XMLName xml.Name + type SpacingConfig struct + AfterPara int + BeforePara int + FirstLineIndent int + LineSpacing float64 + type Start struct + Val string + XMLName xml.Name + type Stretch struct + FillRect *FillRect + XMLName xml.Name + type Strike struct + XMLName xml.Name + type TOCConfig struct + DotLeader bool + MaxLevel int + RightAlign bool + ShowPageNum bool + Title string + UseHyperlink bool + func DefaultTOCConfig() *TOCConfig + type TOCEntry struct + BookmarkID string + Level int + PageNum int + Text string + type TOCField struct + Instr string + Runs []Run + XMLName xml.Name + type Tab struct + XMLName xml.Name + type TabDef struct + Leader string + Pos string + Val string + XMLName xml.Name + type Table struct + Grid *TableGrid + Properties *TableProperties + Rows []TableRow + XMLName xml.Name + func (t *Table) AddCellFormattedParagraph(row, col int, text string, format *TextFormat) (*Paragraph, error) + func (t *Table) AddCellFormattedText(row, col int, text string, format *TextFormat) error + func (t *Table) AddCellList(row, col int, config *CellListConfig) error + func (t *Table) AddCellParagraph(row, col int, text string) (*Paragraph, error) + func (t *Table) AddNestedTable(row, col int, config *TableConfig) (*Table, error) + func (t *Table) AppendColumn(data []string, width int) error + func (t *Table) AppendRow(data []string) error + func (t *Table) ApplyTableStyle(config *TableStyleConfig) error + func (t *Table) ClearCellContent(row, col int) error + func (t *Table) ClearCellFormat(row, col int) error + func (t *Table) ClearCellParagraphs(row, col int) error + func (t *Table) ClearTable() + func (t *Table) CopyTable() *Table + func (t *Table) CreateCustomTableStyle(styleID, styleName string, borderConfig *TableBorderConfig, ...) error + func (t *Table) DeleteColumn(colIndex int) error + func (t *Table) DeleteColumns(startIndex, endIndex int) error + func (t *Table) DeleteRow(rowIndex int) error + func (t *Table) DeleteRows(startIndex, endIndex int) error + func (t *Table) ElementType() string + func (t *Table) FindCells(predicate func(row, col int, cell *TableCell, text string) bool) ([]*CellInfo, error) + func (t *Table) FindCellsByText(searchText string, exactMatch bool) ([]*CellInfo, error) + func (t *Table) ForEach(fn func(row, col int, cell *TableCell, text string) error) error + func (t *Table) ForEachInColumn(colIndex int, fn func(row int, cell *TableCell, text string) error) error + func (t *Table) ForEachInRow(rowIndex int, fn func(col int, cell *TableCell, text string) error) error + func (t *Table) GetCell(row, col int) (*TableCell, error) + func (t *Table) GetCellFormat(row, col int) (*CellFormat, error) + func (t *Table) GetCellParagraphs(row, col int) ([]Paragraph, error) + func (t *Table) GetCellRange(startRow, startCol, endRow, endCol int) ([]*CellInfo, error) + func (t *Table) GetCellText(row, col int) (string, error) + func (t *Table) GetCellTextDirection(row, col int) (CellTextDirection, error) + func (t *Table) GetColumnCount() int + func (t *Table) GetMergedCellInfo(row, col int) (map[string]interface{}, error) + func (t *Table) GetNestedTables(row, col int) ([]Table, error) + func (t *Table) GetRowCount() int + func (t *Table) GetRowHeight(rowIndex int) (*RowHeightConfig, error) + func (t *Table) GetTableBreakInfo() map[string]interface{} + func (t *Table) GetTableLayout() *TableLayoutConfig + func (t *Table) InsertColumn(position int, data []string, width int) error + func (t *Table) InsertRow(position int, data []string) error + func (t *Table) IsCellMerged(row, col int) (bool, error) + func (t *Table) IsRowHeader(rowIndex int) (bool, error) + func (t *Table) IsRowKeepTogether(rowIndex int) (bool, error) + func (t *Table) MergeCellsHorizontal(row, startCol, endCol int) error + func (t *Table) MergeCellsRange(startRow, endRow, startCol, endCol int) error + func (t *Table) MergeCellsVertical(startRow, endRow, col int) error + func (t *Table) NewCellIterator() *CellIterator + func (t *Table) RemoveCellBorders(row, col int) error + func (t *Table) RemoveTableBorders() error + func (t *Table) SetAlternatingRowColors(evenRowColor, oddRowColor string) error + func (t *Table) SetCellBorders(row, col int, config *CellBorderConfig) error + func (t *Table) SetCellFormat(row, col int, format *CellFormat) error + func (t *Table) SetCellFormattedText(row, col int, text string, format *TextFormat) error + func (t *Table) SetCellPadding(row, col int, padding int) error + func (t *Table) SetCellShading(row, col int, config *ShadingConfig) error + func (t *Table) SetCellText(row, col int, text string) error + func (t *Table) SetCellTextDirection(row, col int, direction CellTextDirection) error + func (t *Table) SetHeaderRows(startRow, endRow int) error + func (t *Table) SetRowAsHeader(rowIndex int, isHeader bool) error + func (t *Table) SetRowHeight(rowIndex int, config *RowHeightConfig) error + func (t *Table) SetRowHeightRange(startRow, endRow int, config *RowHeightConfig) error + func (t *Table) SetRowKeepTogether(rowIndex int, keepTogether bool) error + func (t *Table) SetRowKeepWithNext(rowIndex int, keepWithNext bool) error + func (t *Table) SetTableAlignment(alignment TableAlignment) error + func (t *Table) SetTableBorders(config *TableBorderConfig) error + func (t *Table) SetTableLayout(config *TableLayoutConfig) error + func (t *Table) SetTablePageBreak(config *TablePageBreakConfig) error + func (t *Table) SetTableShading(config *ShadingConfig) error + func (t *Table) UnmergeCells(row, col int) error + type TableAlignment string + const TableAlignCenter + const TableAlignInside + const TableAlignLeft + const TableAlignOutside + const TableAlignRight + type TableAnalysis struct + ColCount int + HasTemplate bool + Index int + LoopVariables []string + RowCount int + TemplateRowIndex int + TemplateVars map[string]bool + type TableBorder struct + Color string + Space string + Sz string + ThemeColor string + Val string + type TableBorderConfig struct + Bottom *BorderConfig + InsideH *BorderConfig + InsideV *BorderConfig + Left *BorderConfig + Right *BorderConfig + Top *BorderConfig + type TableBorders struct + Bottom *TableBorder + InsideH *TableBorder + InsideV *TableBorder + Left *TableBorder + Right *TableBorder + Top *TableBorder + XMLName xml.Name + type TableBreakRule string + const BreakAuto + const BreakColumn + const BreakPage + type TableCell struct + Paragraphs []Paragraph + Properties *TableCellProperties + Tables []Table + XMLName xml.Name + func (tc *TableCell) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type TableCellBorder struct + Color string + Space string + Sz string + ThemeColor string + Val string + type TableCellBorders struct + Bottom *TableCellBorder + InsideH *TableCellBorder + InsideV *TableCellBorder + Left *TableCellBorder + Right *TableCellBorder + TL2BR *TableCellBorder + TR2BL *TableCellBorder + Top *TableCellBorder + XMLName xml.Name + type TableCellMargins struct + Bottom *TableCellSpace + Left *TableCellSpace + Right *TableCellSpace + Top *TableCellSpace + XMLName xml.Name + type TableCellMarginsCell struct + Bottom *TableCellSpaceCell + Left *TableCellSpaceCell + Right *TableCellSpaceCell + Top *TableCellSpaceCell + XMLName xml.Name + type TableCellProperties struct + GridSpan *GridSpan + HideMark *HideMark + NoWrap *NoWrap + Shd *TableCellShading + TableCellW *TableCellW + TcBorders *TableCellBorders + TcMar *TableCellMarginsCell + TextDirection *TextDirection + VAlign *VAlign + VMerge *VMerge + XMLName xml.Name + type TableCellShading struct + Color string + Fill string + ThemeFill string + Val string + XMLName xml.Name + type TableCellSpace struct + Type string + W string + type TableCellSpaceCell struct + Type string + W string + type TableCellW struct + Type string + W string + XMLName xml.Name + type TableConfig struct + ColWidths []int + Cols int + Data [][]string + Emphases [][]int + Rows int + Width int + type TableGrid struct + Cols []TableGridCol + XMLName xml.Name + type TableGridCol struct + W string + XMLName xml.Name + type TableIndentation struct + Type string + W string + XMLName xml.Name + type TableJc struct + Val string + XMLName xml.Name + type TableLayoutConfig struct + Alignment TableAlignment + Position TablePosition + Positioning *TablePositioning + TextWrap TableTextWrap + type TableLayoutType struct + Type string + XMLName xml.Name + type TableLook struct + FirstCol string + FirstRow string + LastCol string + LastRow string + NoHBand string + NoVBand string + Val string + XMLName xml.Name + type TablePageBreakConfig struct + KeepLines bool + KeepWithNext bool + PageBreakBefore bool + WidowControl bool + type TablePosition string + const PositionFloating + const PositionInline + type TablePositioning struct + BottomFromText string + HorzAnchor string + LeftFromText string + RightFromText string + TblpX string + TblpXSpec string + TblpY string + TblpYSpec string + TopFromText string + VertAnchor string + XMLName xml.Name + type TableProperties struct + Shd *TableShading + TableBorders *TableBorders + TableCellMar *TableCellMargins + TableInd *TableIndentation + TableJc *TableJc + TableLayout *TableLayoutType + TableLook *TableLook + TableStyle *TableStyle + TableW *TableWidth + XMLName xml.Name + type TableRow struct + Cells []TableCell + Properties *TableRowProperties + XMLName xml.Name + type TableRowH struct + HRule string + Val string + XMLName xml.Name + type TableRowProperties struct + CantSplit *CantSplit + TableRowH *TableRowH + TblHeader *TblHeader + XMLName xml.Name + func (trp *TableRowProperties) SetCantSplit(cantSplit bool) + func (trp *TableRowProperties) SetTblHeader(isHeader bool) + type TableRowPropertiesExtended struct + CantSplit *CantSplit + KeepLines *KeepLines + KeepNext *KeepNext + TableRowH *TableRowH + TblHeader *TblHeader + XMLName xml.Name + type TableShading struct + Color string + Fill string + ThemeFill string + Val string + XMLName xml.Name + type TableStyle struct + Val string + XMLName xml.Name + type TableStyleConfig struct + BandedColumns bool + BandedRows bool + FirstColumnHeader bool + FirstRowHeader bool + LastColumnTotal bool + LastRowTotal bool + StyleID string + Template TableStyleTemplate + type TableStyleTemplate string + const TableStyleTemplateColorful1 + const TableStyleTemplateColorful2 + const TableStyleTemplateColorful3 + const TableStyleTemplateColumns1 + const TableStyleTemplateColumns2 + const TableStyleTemplateColumns3 + const TableStyleTemplateGrid + const TableStyleTemplateList + const TableStyleTemplateNormal + const TableStyleTemplatePlain1 + const TableStyleTemplatePlain2 + const TableStyleTemplatePlain3 + const TableStyleTemplateRows1 + const TableStyleTemplateRows2 + const TableStyleTemplateRows3 + type TableTextWrap string + const TextWrapAround + const TextWrapNone + type TableWidth struct + Type string + W string + XMLName xml.Name + type Tabs struct + Tabs []TabDef + XMLName xml.Name + type TblHeader struct + Val string + XMLName xml.Name + type Template struct + BaseDoc *Document + Blocks []*TemplateBlock + Content string + DefinedBlocks map[string]*TemplateBlock + Name string + Parent *Template + Variables map[string]string + type TemplateAnalysis struct + Conditions map[string]bool + Lists map[string]bool + Tables []*TableAnalysis + TemplateName string + Variables map[string]bool + func (analysis *TemplateAnalysis) GetRequiredData() *TemplateData + type TemplateBlock struct + Children []*TemplateBlock + Condition string + Content string + Data map[string]interface{} + DefaultContent string + IsOverridden bool + Name string + Type string + Variable string + type TemplateData struct + Conditions map[string]bool + Images map[string]*TemplateImageData + Lists map[string][]interface{} + Variables map[string]interface{} + func NewTemplateData() *TemplateData + func (td *TemplateData) Clear() + func (td *TemplateData) FromStruct(data interface{}) error + func (td *TemplateData) GetCondition(name string) (bool, bool) + func (td *TemplateData) GetImage(name string) (*TemplateImageData, bool) + func (td *TemplateData) GetList(name string) ([]interface{}, bool) + func (td *TemplateData) GetVariable(name string) (interface{}, bool) + func (td *TemplateData) Merge(other *TemplateData) + func (td *TemplateData) SetCondition(name string, value bool) + func (td *TemplateData) SetImage(name, filePath string, config *ImageConfig) + func (td *TemplateData) SetImageFromData(name string, data []byte, config *ImageConfig) + func (td *TemplateData) SetImageWithDetails(name, filePath string, data []byte, config *ImageConfig, altText, title string) + func (td *TemplateData) SetList(name string, list []interface{}) + func (td *TemplateData) SetVariable(name string, value interface{}) + func (td *TemplateData) SetVariables(variables map[string]interface{}) + type TemplateEngine struct + func NewTemplateEngine() *TemplateEngine + func (te *TemplateEngine) ClearCache() + func (te *TemplateEngine) GetTemplate(name string) (*Template, error) + func (te *TemplateEngine) LoadTemplate(name, content string) (*Template, error) + func (te *TemplateEngine) LoadTemplateFromDocument(name string, doc *Document) (*Template, error) + func (te *TemplateEngine) RemoveTemplate(name string) + func (te *TemplateEngine) RenderTemplateToDocument(templateName string, data *TemplateData) (*Document, error) + func (te *TemplateEngine) RenderToDocument(templateName string, data *TemplateData) (*Document, error) + func (te *TemplateEngine) SetBasePath(path string) + func (te *TemplateEngine) ValidateTemplate(template *Template) error + type TemplateImageData struct + AltText string + Config *ImageConfig + Data []byte + FilePath string + Title string + type TemplateLogger struct + type TemplateRenderer struct + func NewTemplateRenderer() *TemplateRenderer + func (tr *TemplateRenderer) AnalyzeTemplate(templateName string) (*TemplateAnalysis, error) + func (tr *TemplateRenderer) LoadTemplateFromFile(name, filePath string) (*Template, error) + func (tr *TemplateRenderer) RenderTemplate(templateName string, data *TemplateData) (*Document, error) + func (tr *TemplateRenderer) SetLogging(enabled bool) + type Text struct + Content string + Space string + XMLName xml.Name + type TextDirection struct + Val string + XMLName xml.Name + type TextFormat struct + Bold bool + FontColor string + FontFamily string + FontName string + FontSize int + Highlight string + Italic bool + Strike bool + Underline bool + type TitlePage struct + XMLName xml.Name + type Underline struct + Val string + XMLName xml.Name + type VAlign struct + Val string + XMLName xml.Name + type VMerge struct + Val string + XMLName xml.Name + type ValidationError struct + Field string + Message string + Value string + func NewValidationError(field, value, message string) *ValidationError + func (e *ValidationError) Error() string + type VerticalPosition struct + Align *PosAlign + PosOffset *PosOffset + RelativeFrom string + XMLName xml.Name + type WidowControl struct + Val string + XMLName xml.Name + type WrapNone struct + XMLName xml.Name + type WrapPolygon struct + LineTo []PolygonLineTo + Start *PolygonStart + XMLName xml.Name + type WrapSquare struct + DistB string + DistL string + DistR string + DistT string + WrapText string + XMLName xml.Name + type WrapThrough struct + DistL string + DistR string + WrapPolygon *WrapPolygon + WrapText string + XMLName xml.Name + type WrapTight struct + DistL string + DistR string + WrapPolygon *WrapPolygon + WrapText string + XMLName xml.Name + type WrapTopAndBottom struct + DistB string + DistT string + EffectExtent *EffectExtent + XMLName xml.Name + type Xfrm struct + Ext *Ext + Off *Off + XMLName xml.Name