Versions in this module Expand all Collapse all v0 v0.0.2 Oct 19, 2023 Changes in this version + const FieldCreateDate + const FieldCurrentPage + const FieldDate + const FieldEditTime + const FieldNumberOfPages + const FieldPrintDate + const FieldSaveDate + const FieldTIme + const FieldTOC + type AnchoredDrawing struct + func (a AnchoredDrawing) GetImage() (common.ImageRef, bool) + func (a AnchoredDrawing) SetAlignment(h wml.WdST_AlignH, v wml.WdST_AlignV) + func (a AnchoredDrawing) SetHAlignment(h wml.WdST_AlignH) + func (a AnchoredDrawing) SetName(name string) + func (a AnchoredDrawing) SetOffset(x, y measurement.Distance) + func (a AnchoredDrawing) SetOrigin(h wml.WdST_RelFromH, v wml.WdST_RelFromV) + func (a AnchoredDrawing) SetSize(w, h measurement.Distance) + func (a AnchoredDrawing) SetTextWrapNone() + func (a AnchoredDrawing) SetTextWrapSquare(t wml.WdST_WrapText) + func (a AnchoredDrawing) SetVAlignment(v wml.WdST_AlignV) + func (a AnchoredDrawing) SetXOffset(x measurement.Distance) + func (a AnchoredDrawing) SetYOffset(y measurement.Distance) + func (a AnchoredDrawing) X() *wml.WdAnchor + type Bookmark struct + func (b Bookmark) Name() string + func (b Bookmark) SetName(name string) + func (b Bookmark) X() *wml.CT_Bookmark + type Cell struct + func (c Cell) AddParagraph() Paragraph + func (c Cell) AddTable() Table + func (c Cell) Paragraphs() []Paragraph + func (c Cell) Properties() CellProperties + func (c Cell) X() *wml.CT_Tc + type CellBorders struct + func (b CellBorders) SetAll(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetBottom(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetInsideHorizontal(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetInsideVertical(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetLeft(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetRight(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) SetTop(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b CellBorders) X() *wml.CT_TcBorders + type CellMargins struct + func (c CellMargins) SetBottom(d measurement.Distance) + func (c CellMargins) SetBottomPct(pct float64) + func (c CellMargins) SetLeft(d measurement.Distance) + func (c CellMargins) SetLeftPct(pct float64) + func (c CellMargins) SetRight(d measurement.Distance) + func (c CellMargins) SetRightPct(pct float64) + func (c CellMargins) SetStart(d measurement.Distance) + func (c CellMargins) SetStartPct(pct float64) + func (c CellMargins) SetTop(d measurement.Distance) + func (c CellMargins) SetTopPct(pct float64) + type CellProperties struct + func (c CellProperties) Borders() CellBorders + func (c CellProperties) Margins() CellMargins + func (c CellProperties) SetColumnSpan(cols int) + func (c CellProperties) SetShading(shd wml.ST_Shd, foreground, fill color.Color) + func (c CellProperties) SetVerticalAlignment(align wml.ST_VerticalJc) + func (c CellProperties) SetVerticalMerge(mergeVal wml.ST_Merge) + func (c CellProperties) SetWidth(d measurement.Distance) + func (c CellProperties) SetWidthAuto() + func (c CellProperties) SetWidthPercent(pct float64) + func (c CellProperties) X() *wml.CT_TcPr + type Color struct + func (c Color) SetColor(v color.Color) + func (c Color) SetThemeColor(t wml.ST_ThemeColor) + func (c Color) SetThemeShade(s uint8) + func (c Color) X() *wml.CT_Color + type Document struct + Numbering Numbering + Settings Settings + Styles Styles + func New() *Document + func Open(filename string) (*Document, error) + func OpenTemplate(filename string) (*Document, error) + func Read(r io.ReaderAt, size int64) (*Document, error) + func (d *Document) AddFooter() Footer + func (d *Document) AddHeader() Header + func (d *Document) AddImage(i common.Image) (common.ImageRef, error) + func (d *Document) AddParagraph() Paragraph + func (d *Document) AddTable() Table + func (d *Document) BodySection() Section + func (d *Document) Footers() []Footer + func (d *Document) FormFields() []FormField + func (d *Document) GetImageByRelID(relID string) (common.ImageRef, bool) + func (d *Document) Headers() []Header + func (d *Document) InsertParagraphAfter(relativeTo Paragraph) Paragraph + func (d *Document) InsertParagraphBefore(relativeTo Paragraph) Paragraph + func (d *Document) InsertTableAfter(relativeTo Paragraph) Table + func (d *Document) InsertTableBefore(relativeTo Paragraph) Table + func (d *Document) MailMerge(mergeContent map[string]string) + func (d *Document) Paragraphs() []Paragraph + func (d *Document) RemoveParagraph(p Paragraph) + func (d *Document) Save(w io.Writer) error + func (d *Document) SaveToFile(path string) error + func (d *Document) StructuredDocumentTags() []StructuredDocumentTag + func (d *Document) Tables() []Table + func (d *Document) Validate() error + func (d *Document) X() *wml.Document + func (d Document) AddHyperlink(url string) common.Hyperlink + func (d Document) Bookmarks() []Bookmark + func (d Document) GetWordRelationships() (relationships []relationships.CT_Relationship) + func (d Document) MergeFields() []string + type Fonts struct + func (f Fonts) SetASCIITheme(t wml.ST_Theme) + func (f Fonts) SetCSTheme(t wml.ST_Theme) + func (f Fonts) SetEastAsiaTheme(t wml.ST_Theme) + func (f Fonts) SetHANSITheme(t wml.ST_Theme) + func (f Fonts) X() *wml.CT_Fonts + type Footer struct + func (f Footer) AddImage(i common.Image) (common.ImageRef, error) + func (f Footer) AddParagraph() Paragraph + func (f Footer) Clear() + func (f Footer) Index() int + func (f Footer) Paragraphs() []Paragraph + func (f Footer) RemoveParagraph(p Paragraph) + func (f Footer) X() *wml.Ftr + type FormField struct + func (f FormField) IsChecked() bool + func (f FormField) Name() string + func (f FormField) PossibleValues() []string + func (f FormField) SetChecked(b bool) + func (f FormField) SetValue(v string) + func (f FormField) Type() FormFieldType + func (f FormField) Value() string + type FormFieldType byte + const FormFieldTypeCheckBox + const FormFieldTypeDropDown + const FormFieldTypeText + const FormFieldTypeUnknown + func (i FormFieldType) String() string + type Header struct + func (h Header) AddImage(i common.Image) (common.ImageRef, error) + func (h Header) AddParagraph() Paragraph + func (h Header) Clear() + func (h Header) Index() int + func (h Header) Paragraphs() []Paragraph + func (h Header) RemoveParagraph(p Paragraph) + func (h Header) X() *wml.Hdr + type HyperLink struct + func (h HyperLink) AddRun() Run + func (h HyperLink) SetTarget(url string) + func (h HyperLink) SetTargetBookmark(bm Bookmark) + func (h HyperLink) SetTargetByRef(link common.Hyperlink) + func (h HyperLink) SetToolTip(text string) + func (h HyperLink) X() *wml.CT_Hyperlink + type InlineDrawing struct + func (i InlineDrawing) GetImage() (common.ImageRef, bool) + func (i InlineDrawing) SetSize(width, height measurement.Distance, isZoom bool) + func (i InlineDrawing) X() *wml.WdInline + type Numbering struct + func NewNumbering() Numbering + func (n Numbering) AddDefinition() NumberingDefinition + func (n Numbering) Clear() + func (n Numbering) Definitions() []NumberingDefinition + func (n Numbering) InitializeDefault() + func (n Numbering) X() *wml.Numbering + type NumberingDefinition struct + func (n NumberingDefinition) AbstractNumberID() int64 + func (n NumberingDefinition) AddLevel() NumberingLevel + func (n NumberingDefinition) Levels() []NumberingLevel + func (n NumberingDefinition) MultiLevelType() wml.ST_MultiLevelType + func (n NumberingDefinition) SetMultiLevelType(t wml.ST_MultiLevelType) + func (n NumberingDefinition) X() *wml.CT_AbstractNum + type NumberingLevel struct + func (n NumberingLevel) Properties() ParagraphStyleProperties + func (n NumberingLevel) RunProperties() RunProperties + func (n NumberingLevel) SetAlignment(j wml.ST_Jc) + func (n NumberingLevel) SetFormat(f wml.ST_NumberFormat) + func (n NumberingLevel) SetText(t string) + func (n NumberingLevel) X() *wml.CT_Lvl + type OnOffValue byte + const OnOffValueOff + const OnOffValueOn + const OnOffValueUnset + type Paragraph struct + func (p Paragraph) AddBookmark(name string) Bookmark + func (p Paragraph) AddHyperLink() HyperLink + func (p Paragraph) AddRun() Run + func (p Paragraph) InsertRunAfter(relativeTo Run) Run + func (p Paragraph) InsertRunBefore(relativeTo Run) Run + func (p Paragraph) Properties() ParagraphProperties + func (p Paragraph) RemoveRun(r Run) + func (p Paragraph) Runs() []Run + func (p Paragraph) SetNumberingDefinition(nd NumberingDefinition) + func (p Paragraph) SetNumberingDefinitionByID(abstractNumberID int64) + func (p Paragraph) SetNumberingLevel(listLevel int) + func (p Paragraph) SetStyle(s string) + func (p Paragraph) Style() string + func (p Paragraph) X() *wml.CT_P + type ParagraphProperties struct + D *Document + func (p ParagraphProperties) AddSection(t wml.ST_SectionMark) Section + func (p ParagraphProperties) AddTabStop(position measurement.Distance, justificaton wml.ST_TabJc, leader wml.ST_TabTlc) + func (p ParagraphProperties) SetAlignment(align wml.ST_Jc) + func (p ParagraphProperties) SetEndIndent(m measurement.Distance) + func (p ParagraphProperties) SetFirstLineIndent(m measurement.Distance) + func (p ParagraphProperties) SetHangingIndent(m measurement.Distance) + func (p ParagraphProperties) SetHeadingLevel(idx int) + func (p ParagraphProperties) SetKeepOnOnePage(b bool) + func (p ParagraphProperties) SetKeepWithNext(b bool) + func (p ParagraphProperties) SetPageBreakBefore(b bool) + func (p ParagraphProperties) SetSpacing(before, after measurement.Distance) + func (p ParagraphProperties) SetStartIndent(m measurement.Distance) + func (p ParagraphProperties) SetStyle(s string) + func (p ParagraphProperties) SetWindowControl(b bool) + func (p ParagraphProperties) Spacing() ParagraphSpacing + func (p ParagraphProperties) Style() string + func (p ParagraphProperties) X() *wml.CT_PPr + type ParagraphSpacing struct + func (p ParagraphSpacing) SetAfter(after measurement.Distance) + func (p ParagraphSpacing) SetAfterAuto(b bool) + func (p ParagraphSpacing) SetBefore(before measurement.Distance) + func (p ParagraphSpacing) SetBeforeAuto(b bool) + func (p ParagraphSpacing) SetLineSpacing(d measurement.Distance, rule wml.ST_LineSpacingRule) + type ParagraphStyleProperties struct + func (p ParagraphStyleProperties) AddTabStop(position measurement.Distance, justificaton wml.ST_TabJc, leader wml.ST_TabTlc) + func (p ParagraphStyleProperties) SetAlignment(align wml.ST_Jc) + func (p ParagraphStyleProperties) SetContextualSpacing(b bool) + func (p ParagraphStyleProperties) SetHangingIndent(m measurement.Distance) + func (p ParagraphStyleProperties) SetKeepNext(b bool) + func (p ParagraphStyleProperties) SetKeepOnOnePage(b bool) + func (p ParagraphStyleProperties) SetLeftIndent(m measurement.Distance) + func (p ParagraphStyleProperties) SetOutlineLevel(lvl int) + func (p ParagraphStyleProperties) SetSpacing(before, after measurement.Distance) + func (p ParagraphStyleProperties) SetStartIndent(m measurement.Distance) + func (p ParagraphStyleProperties) X() *wml.CT_PPrGeneral + type Row struct + func (r Row) AddCell() Cell + func (r Row) Cells() []Cell + func (r Row) Properties() RowProperties + func (r Row) X() *wml.CT_Row + type RowProperties struct + func (r RowProperties) SetHeight(ht measurement.Distance, rule wml.ST_HeightRule) + type Run struct + D *Document + func (r Run) AddBreak() + func (r Run) AddDrawingAnchored(img common.ImageRef) (AnchoredDrawing, error) + func (r Run) AddDrawingInline(img common.ImageRef) (InlineDrawing, error) + func (r Run) AddField(code string) + func (r Run) AddFieldWithFormatting(code string, fmt string, isDirty bool) + func (r Run) AddPageBreak() + func (r Run) AddTab() + func (r Run) AddText(s string) + func (r Run) Clear() + func (r Run) ClearContent() + func (r Run) CurRunIsContainerPic() bool + func (r Run) DrawingAnchored() []AnchoredDrawing + func (r Run) GetPicInfo() (pics []pic.Pic) + func (r Run) Properties() RunProperties + func (r Run) Text() string + func (r Run) X() *wml.CT_R + type RunProperties struct + func (r RunProperties) BoldValue() OnOffValue + func (r RunProperties) ClearColor() + func (r RunProperties) Color() Color + func (r RunProperties) Fonts() Fonts + func (r RunProperties) IsBold() bool + func (r RunProperties) IsItalic() bool + func (r RunProperties) ItalicValue() OnOffValue + func (r RunProperties) SetAllCaps(b bool) + func (r RunProperties) SetBold(b bool) + func (r RunProperties) SetCharacterSpacing(size measurement.Distance) + func (r RunProperties) SetColor(c color.Color) + func (r RunProperties) SetDoubleStrikeThrough(b bool) + func (r RunProperties) SetEffect(e wml.ST_TextEffect) + func (r RunProperties) SetEmboss(b bool) + func (r RunProperties) SetFontFamily(family string) + func (r RunProperties) SetHighlight(c wml.ST_HighlightColor) + func (r RunProperties) SetImprint(b bool) + func (r RunProperties) SetItalic(b bool) + func (r RunProperties) SetKerning(size measurement.Distance) + func (r RunProperties) SetOutline(b bool) + func (r RunProperties) SetShadow(b bool) + func (r RunProperties) SetSize(size measurement.Distance) + func (r RunProperties) SetSmallCaps(b bool) + func (r RunProperties) SetStrikeThrough(b bool) + func (r RunProperties) SetStyle(style string) + func (r RunProperties) SetUnderline(style wml.ST_Underline, c color.Color) + func (r RunProperties) SetVerticalAlignment(v sharedTypes.ST_VerticalAlignRun) + func (r RunProperties) X() *wml.CT_RPr + type Section struct + func (s Section) SetFooter(f Footer, t wml.ST_HdrFtr) + func (s Section) SetHeader(h Header, t wml.ST_HdrFtr) + func (s Section) SetPageMargins(top, right, bottom, left, header, footer, gutter measurement.Distance) + func (s Section) X() *wml.CT_SectPr + type Settings struct + func NewSettings() Settings + func (s Settings) RemoveMailMerge() + func (s Settings) SetUpdateFieldsOnOpen(b bool) + func (s Settings) X() *wml.Settings + type StructuredDocumentTag struct + func (s StructuredDocumentTag) Paragraphs() []Paragraph + type Style struct + func (s Style) Name() string + func (s Style) ParagraphProperties() ParagraphStyleProperties + func (s Style) RunProperties() RunProperties + func (s Style) SetBasedOn(name string) + func (s Style) SetLinkedStyle(name string) + func (s Style) SetName(name string) + func (s Style) SetNextStyle(name string) + func (s Style) SetPrimaryStyle(b bool) + func (s Style) SetSemiHidden(b bool) + func (s Style) SetUISortOrder(order int) + func (s Style) SetUnhideWhenUsed(b bool) + func (s Style) StyleID() string + func (s Style) TableConditionalFormatting(typ wml.ST_TblStyleOverrideType) TableConditionalFormatting + func (s Style) TableProperties() TableStyleProperties + func (s Style) Type() wml.ST_StyleType + func (s Style) X() *wml.CT_Style + type Styles struct + func NewStyles() Styles + func (s Styles) AddStyle(styleID string, t wml.ST_StyleType, isDefault bool) Style + func (s Styles) Clear() + func (s Styles) InitializeDefault() + func (s Styles) ParagraphStyles() []Style + func (s Styles) Styles() []Style + func (s Styles) X() *wml.Styles + type Table struct + func (t Table) AddRow() Row + func (t Table) InsertRowAfter(r Row) Row + func (t Table) InsertRowBefore(r Row) Row + func (t Table) Properties() TableProperties + func (t Table) Rows() []Row + func (t Table) X() *wml.CT_Tbl + type TableBorders struct + func (b TableBorders) SetAll(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetBottom(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetInsideHorizontal(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetInsideVertical(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetLeft(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetRight(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) SetTop(t wml.ST_Border, c color.Color, thickness measurement.Distance) + func (b TableBorders) X() *wml.CT_TblBorders + type TableConditionalFormatting struct + func (t TableConditionalFormatting) CellProperties() CellProperties + func (t TableConditionalFormatting) ParagraphProperties() ParagraphStyleProperties + func (t TableConditionalFormatting) RunProperties() RunProperties + func (t TableConditionalFormatting) X() *wml.CT_TblStylePr + type TableLook struct + func (t TableLook) SetFirstColumn(on bool) + func (t TableLook) SetFirstRow(on bool) + func (t TableLook) SetHorizontalBanding(on bool) + func (t TableLook) SetLastColumn(on bool) + func (t TableLook) SetLastRow(on bool) + func (t TableLook) SetVerticalBanding(on bool) + func (t TableLook) X() *wml.CT_TblLook + type TableProperties struct + func (t TableProperties) Borders() TableBorders + func (t TableProperties) SetAlignment(align wml.ST_JcTable) + func (t TableProperties) SetCellSpacing(m measurement.Distance) + func (t TableProperties) SetCellSpacingAuto() + func (t TableProperties) SetCellSpacingPercent(pct float64) + func (t TableProperties) SetLayout(l wml.ST_TblLayoutType) + func (t TableProperties) SetStyle(name string) + func (t TableProperties) SetWidth(d measurement.Distance) + func (t TableProperties) SetWidthAuto() + func (t TableProperties) SetWidthPercent(pct float64) + func (t TableProperties) TableLook() TableLook + func (t TableProperties) X() *wml.CT_TblPr + type TableStyleProperties struct + func (t TableStyleProperties) Borders() TableBorders + func (t TableStyleProperties) SetCellSpacingAuto() + func (t TableStyleProperties) SetCellSpacingPercent(pct float64) + func (t TableStyleProperties) SetColumnBandSize(cols int64) + func (t TableStyleProperties) SetRowBandSize(rows int64) + func (t TableStyleProperties) SetTableIndent(ind measurement.Distance) + func (t TableStyleProperties) X() *wml.CT_TblPrBase + type TableWidth struct + func NewTableWidth() TableWidth + func (s TableWidth) SetValue(m measurement.Distance) + func (s TableWidth) X() *wml.CT_TblWidth