Documentation
¶
Overview ¶
Package document provides creation, reading, and writing of ECMA 376 Open Office XML documents.
Example:
doc := document.New()
para := doc.AddParagraph()
run := para.AddRun()
run.SetText("foo")
doc.SaveToFile("foo.docx")
Index ¶
- Constants
- Variables
- type AnchorDrawWrapOptions
- func (_dbd AnchorDrawWrapOptions) GetWrapPathLineTo() []*_ff.CT_Point2D
- func (_cgac AnchorDrawWrapOptions) GetWrapPathStart() *_ff.CT_Point2D
- func (_agbg AnchorDrawWrapOptions) SetFollowImageShape(val bool)
- func (_dfb AnchorDrawWrapOptions) SetWrapPathLineTo(coordinates []*_ff.CT_Point2D)
- func (_dbb AnchorDrawWrapOptions) SetWrapPathStart(coordinate *_ff.CT_Point2D)
- type AnchoredDrawing
- func (_fbc AnchoredDrawing) GetImage() (_aff.ImageRef, bool)
- func (_abb AnchoredDrawing) GetSize() (_df, _aea int64)
- func (_ecc AnchoredDrawing) Set3DRotationImageEffect()
- func (_egg AnchoredDrawing) SetAlignment(h _afb.WdST_AlignH, v _afb.WdST_AlignV)
- func (_gfg AnchoredDrawing) SetAllowOverlapAttr(val bool)
- func (_bd AnchoredDrawing) SetBehindDoc(val bool)
- func (_bge AnchoredDrawing) SetBevelImageEffect()
- func (_dgb AnchoredDrawing) SetBorder(borderType _ff.ST_PresetLineDashVal, c _aa.Color, thickness _gf.Distance)
- func (_aeg AnchoredDrawing) SetGlowImageEffect(radius _gf.Distance, c _aa.Color)
- func (_agb AnchoredDrawing) SetHAlignment(h _afb.WdST_AlignH)
- func (_db AnchoredDrawing) SetId(id uint32)
- func (_fg AnchoredDrawing) SetInnerShadowImageEffect(radius, offset _gf.Distance, c _aa.Color, degrees float64)
- func (_aba AnchoredDrawing) SetLayoutInCell(val bool)
- func (_be AnchoredDrawing) SetName(name string)
- func (_bgd AnchoredDrawing) SetOffset(x, y _gf.Distance)
- func (_ee AnchoredDrawing) SetOrigin(h _afb.WdST_RelFromH, v _afb.WdST_RelFromV)
- func (_fa AnchoredDrawing) SetOuterShadowImageEffect(radius, offset _gf.Distance, c _aa.Color, degrees float64)
- func (_dba AnchoredDrawing) SetReflectionImageEffect(radius _gf.Distance, opacity, size float64)
- func (_ddd AnchoredDrawing) SetSize(w, h _gf.Distance)
- func (_ede AnchoredDrawing) SetSoftEdgeImageEffect(radius _gf.Distance)
- func (_gbf AnchoredDrawing) SetTextWrapBehindText()
- func (_dfe AnchoredDrawing) SetTextWrapInFrontOfText()
- func (_gg AnchoredDrawing) SetTextWrapNone()
- func (_afa AnchoredDrawing) SetTextWrapSquare(t _afb.WdST_WrapText)
- func (_ea AnchoredDrawing) SetTextWrapThrough(option *AnchorDrawWrapOptions)
- func (_gd AnchoredDrawing) SetTextWrapTight(option *AnchorDrawWrapOptions)
- func (_ed AnchoredDrawing) SetTextWrapTopAndBottom()
- func (_fdg AnchoredDrawing) SetVAlignment(v _afb.WdST_AlignV)
- func (_bga AnchoredDrawing) SetXOffset(x _gf.Distance)
- func (_cg AnchoredDrawing) SetYOffset(y _gf.Distance)
- func (_cac AnchoredDrawing) X() *_afb.WdAnchor
- type Bookmark
- type Cell
- type CellBorders
- func (_adg CellBorders) SetAll(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_fae CellBorders) SetBottom(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_bgg CellBorders) SetInsideHorizontal(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_dbf CellBorders) SetInsideVertical(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_gdd CellBorders) SetLeft(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_dbbd CellBorders) SetRight(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_egb CellBorders) SetTop(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_eefd CellBorders) X() *_afb.CT_TcBorders
- type CellMargins
- func (_ddda CellMargins) SetBottom(d _gf.Distance)
- func (_caga CellMargins) SetBottomPct(pct float64)
- func (_fda CellMargins) SetLeft(d _gf.Distance)
- func (_gffa CellMargins) SetLeftPct(pct float64)
- func (_eeb CellMargins) SetRight(d _gf.Distance)
- func (_bbe CellMargins) SetRightPct(pct float64)
- func (_aecc CellMargins) SetStart(d _gf.Distance)
- func (_dab CellMargins) SetStartPct(pct float64)
- func (_fc CellMargins) SetTop(d _gf.Distance)
- func (_fgg CellMargins) SetTopPct(pct float64)
- type CellProperties
- func (_bgfa CellProperties) Borders() CellBorders
- func (_cbd CellProperties) Margins() CellMargins
- func (_egd CellProperties) SetColumnSpan(cols int)
- func (_ccg CellProperties) SetShading(shd _afb.ST_Shd, foreground, fill _aa.Color)
- func (_ddee CellProperties) SetVerticalAlignment(align _afb.ST_VerticalJc)
- func (_add CellProperties) SetVerticalMerge(mergeVal _afb.ST_Merge)
- func (_afc CellProperties) SetWidth(d _gf.Distance)
- func (_age CellProperties) SetWidthAuto()
- func (_efc CellProperties) SetWidthPercent(pct float64)
- func (_bgb CellProperties) X() *_afb.CT_TcPr
- type Color
- type Comment
- type DocText
- type Document
- func (_dege *Document) AddFooter() Footer
- func (_gbc *Document) AddHeader() Header
- func (_aadd Document) AddHyperlink(url string) _aff.Hyperlink
- func (_dcga *Document) AddImage(i _aff.Image) (_aff.ImageRef, error)
- func (_dda *Document) AddParagraph() Paragraph
- func (_aeca *Document) AddTable() Table
- func (_ffde *Document) AddWatermarkPicture(imageRef _aff.ImageRef) WatermarkPicture
- func (_bedg *Document) AddWatermarkText(text string) WatermarkText
- func (_aaad *Document) Append(d1orig *Document) error
- func (_deddd *Document) AppendNode(node Node)
- func (_bcdf *Document) BodySection() Section
- func (_abcf Document) Bookmarks() []Bookmark
- func (_cacg *Document) Close() error
- func (_bdfe *Document) Comment(id int64) Comment
- func (_cebe *Document) Comments() []Comment
- func (_abgg *Document) Copy() (*Document, error)
- func (_eabaa *Document) DocRels() _aff.Relationships
- func (_fffc *Document) Endnote(id int64) Endnote
- func (_eeeb *Document) Endnotes() []Endnote
- func (_caffe *Document) ExtractText() *DocText
- func (_daed *Document) FontTable() *_afb.Fonts
- func (_beb *Document) Footers() []Footer
- func (_cgeda *Document) Footnote(id int64) Footnote
- func (_egdbc *Document) Footnotes() []Footnote
- func (_cebfb *Document) FormFields() []FormField
- func (_bcdc *Document) GetChartSpaceByRelId(relId string) *_ba.ChartSpace
- func (_cegbf *Document) GetDocRelTargetByID(idAttr string) string
- func (_bbfc *Document) GetFontBytesByRelId(relID string) ([]byte, error)
- func (_fgda *Document) GetHeaderFooterImageObjByRelId(relId string, isHeader, isFooter bool) (_aff.Image, error)
- func (_dgfc *Document) GetImageByRelID(relID string) (_aff.ImageRef, bool)
- func (_cccc *Document) GetImageObjByRelId(relId string) (_aff.Image, error)
- func (_agfa *Document) GetNumberingLevelByIds(numId, levelId int64) NumberingLevel
- func (_cbefa *Document) GetStyleByID(id string) Style
- func (_ebdeb *Document) GetTargetByRelId(idAttr string) string
- func (_ffdg *Document) HasComments() bool
- func (_gfcb *Document) HasEndnotes() bool
- func (_aedd *Document) HasFootnotes() bool
- func (_daa *Document) Headers() []Header
- func (_faed *Document) InsertParagraphAfter(relativeTo Paragraph) Paragraph
- func (_bedc *Document) InsertParagraphBefore(relativeTo Paragraph) Paragraph
- func (_edg *Document) InsertTableAfter(relativeTo Paragraph) Table
- func (_ecb *Document) InsertTableBefore(relativeTo Paragraph) Table
- func (_dbcb *Document) MailMerge(mergeContent map[string]string)
- func (_bcff Document) MergeFields() []string
- func (_cgfbe *Document) Nodes() Nodes
- func (_ggga *Document) Paragraphs() []Paragraph
- func (_cdca *Document) PutNodeAfter(relativeTo, node Node)
- func (_fdag *Document) PutNodeBefore(relativeTo, node Node)
- func (_ecbf *Document) RemoveComment(id int64) bool
- func (_beba *Document) RemoveParagraph(p Paragraph)
- func (_faa *Document) RemoveTable(tbl Table)
- func (_afd *Document) Save(w _af.Writer) error
- func (_gffae *Document) SaveToFile(path string) error
- func (_gbbg Document) SetConformance(conformanceAttr _dg.ST_ConformanceClass)
- func (_dbce Document) SetStrict(strict bool)
- func (_debf *Document) StructuredDocumentTags() []StructuredDocumentTag
- func (_dbe *Document) Tables() []Table
- func (_edaa *Document) Themes() []*_ff.Theme
- func (_aaea *Document) Validate() error
- func (_cgfg *Document) X() *_afb.Document
- type DrawingInfo
- type Endnote
- type ExtractTextOptions
- type Fonts
- type Footer
- func (_ccdc Footer) AddImage(i _aff.Image) (_aff.ImageRef, error)
- func (_bbad Footer) AddParagraph() Paragraph
- func (_afcggf Footer) AddTable() Table
- func (_dfbe Footer) Clear()
- func (_fgecg Footer) Index() int
- func (_fcbdg Footer) Paragraphs() []Paragraph
- func (_gbcc Footer) RemoveParagraph(p Paragraph)
- func (_aeba Footer) Tables() []Table
- func (_abfaa Footer) X() *_afb.Ftr
- type Footnote
- type FormField
- func (_abee FormField) IsChecked() bool
- func (_dfge FormField) Name() string
- func (_afaa FormField) PossibleValues() []string
- func (_bcabc FormField) SetCalcOnExit(calcOnExit bool)
- func (_dcgag FormField) SetChecked(b bool)
- func (_bfgfd FormField) SetDefaultValue(v string)
- func (_agafa FormField) SetEnabled(enabled bool)
- func (_afffc FormField) SetName(name string)
- func (_ebfe FormField) SetPossibleValues(values []string)
- func (_ccfed FormField) SetSize(size uint64)
- func (_bgbe FormField) SetValue(v string)
- func (_deeff FormField) Type() FormFieldType
- func (_cebb FormField) Value() string
- type FormFieldType
- type Header
- func (_bgad Header) AddImage(i _aff.Image) (_aff.ImageRef, error)
- func (_bcacd Header) AddImageRef(r _aff.ImageRef) (_aff.ImageRef, error)
- func (_bfdaa Header) AddParagraph() Paragraph
- func (_fede Header) AddTable() Table
- func (_gba Header) Clear()
- func (_fggaa Header) Index() int
- func (_daeag Header) Paragraphs() []Paragraph
- func (_agbf Header) RemoveParagraph(p Paragraph)
- func (_ggaeb Header) Tables() []Table
- func (_fgbf Header) X() *_afb.Hdr
- type HyperLink
- type InlineDrawing
- type Node
- type Nodes
- func (_cfabc *Nodes) FindNodeByCondition(f func(_fbcd *Node) bool, wholeElements bool) []Node
- func (_cbge *Nodes) FindNodeByRegexp(r *_d.Regexp) []Node
- func (_dgde *Nodes) FindNodeByStyleId(styleId string) []Node
- func (_fddf *Nodes) FindNodeByStyleName(styleName string) []Node
- func (_gdbab *Nodes) FindNodeByText(text string) []Node
- func (_bagae *Nodes) ReplaceText(oldText, newText string)
- func (_gafe *Nodes) ReplaceTextByRegexp(expr *_d.Regexp, newText string)
- func (_ebff *Nodes) X() []Node
- type Numbering
- type NumberingDefinition
- func (_gfbgd NumberingDefinition) AbstractNumberID() int64
- func (_acfae NumberingDefinition) AddLevel() NumberingLevel
- func (_acdcf NumberingDefinition) Levels() []NumberingLevel
- func (_gfad NumberingDefinition) MultiLevelType() _afb.ST_MultiLevelType
- func (_daffd NumberingDefinition) SetMultiLevelType(t _afb.ST_MultiLevelType)
- func (_cfcbb NumberingDefinition) X() *_afb.CT_AbstractNum
- type NumberingLevel
- func (_cddff NumberingLevel) Properties() ParagraphStyleProperties
- func (_fdbd NumberingLevel) RunProperties() RunProperties
- func (_dddgg NumberingLevel) SetAlignment(j _afb.ST_Jc)
- func (_cgef NumberingLevel) SetFormat(f _afb.ST_NumberFormat)
- func (_gadab NumberingLevel) SetText(t string)
- func (_acba NumberingLevel) X() *_afb.CT_Lvl
- type OnOffValue
- type Paragraph
- func (_aaabc Paragraph) AddBookmark(name string) Bookmark
- func (_deabf Paragraph) AddCheckBox(name string) FormField
- func (_bgbf Paragraph) AddComment(author, commentText string) int64
- func (_gcab Paragraph) AddDeletedText(oldVal, revNum, author string, t _c.Time, id int64)
- func (_bebgd Paragraph) AddDropdownList(name string) FormField
- func (_ebaac Paragraph) AddEndnote(text string) Endnote
- func (_aecad Paragraph) AddFootnote(text string) Footnote
- func (_gcfb Paragraph) AddHTML(s string)
- func (_bdfef Paragraph) AddHyperLink() HyperLink
- func (_ggfec Paragraph) AddInsertedText(newVal, revNum, author string, t _c.Time, id int64)
- func (_cecd Paragraph) AddRun() Run
- func (_addd Paragraph) AddTextInput(name string) FormField
- func (_degdf Paragraph) Borders() ParagraphBorders
- func (_cfdb Paragraph) CloseComment(commentId int64)
- func (_caeb Paragraph) IgnoreSpaceBetweenParagraphOfSameStyle()
- func (_deffac Paragraph) InsertRunAfter(relativeTo Run) Run
- func (_cfda Paragraph) InsertRunBefore(relativeTo Run) Run
- func (_aaaa Paragraph) Numbering() Numbering
- func (_abfaf Paragraph) Properties() ParagraphProperties
- func (_acacc Paragraph) RemoveEndnote(id int64)
- func (_gbffg Paragraph) RemoveFootnote(id int64)
- func (_aabe Paragraph) RemoveRun(r Run)
- func (_bedd Paragraph) Runs() []Run
- func (_gadcg Paragraph) SetAfterLineSpacing(d _gf.Distance)
- func (_ddcd Paragraph) SetAfterSpacing(d _gf.Distance)
- func (_faaee Paragraph) SetAlignment(alignment _afb.ST_Jc)
- func (_aeddd Paragraph) SetBeforeLineSpacing(d _gf.Distance)
- func (_bgdd Paragraph) SetBeforeSpacing(d _gf.Distance)
- func (_bebga Paragraph) SetFirstLineIndent(m _gf.Distance)
- func (_gbegg Paragraph) SetHangingIndent(m _gf.Distance)
- func (_gbffa Paragraph) SetLeftIndent(m _gf.Distance)
- func (_bgecg Paragraph) SetLineSpacing(d _gf.Distance, rule _afb.ST_LineSpacingRule)
- func (_cbcd Paragraph) SetNumberingDefinition(nd NumberingDefinition)
- func (_dffaa Paragraph) SetNumberingDefinitionByID(abstractNumberID int64)
- func (_cbbb Paragraph) SetNumberingLevel(listLevel int)
- func (_dgcbc Paragraph) SetOutlineLvl(lvl int64)
- func (_bgae Paragraph) SetRightIndent(m _gf.Distance)
- func (_aaeg Paragraph) SetStyle(s string)
- func (_gcbc Paragraph) Style() string
- func (_aggea Paragraph) X() *_afb.CT_P
- type ParagraphBorders
- func (_egdbab ParagraphBorders) SetAll(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_gfgd ParagraphBorders) SetBetween(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_afbaa ParagraphBorders) SetBottom(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_fceea ParagraphBorders) SetLeft(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_cegbb ParagraphBorders) SetRight(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_baaab ParagraphBorders) SetTop(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_gadb ParagraphBorders) X() *_afb.CT_PBdr
- type ParagraphProperties
- func (_ddgc ParagraphProperties) AddSection(t _afb.ST_SectionMark) Section
- func (_ffbe ParagraphProperties) AddTabStop(position _gf.Distance, justificaton _afb.ST_TabJc, leader _afb.ST_TabTlc)
- func (_cfedb ParagraphProperties) Bold() bool
- func (_caagd ParagraphProperties) Caps() bool
- func (_bbcfg ParagraphProperties) CharacterSpacingMeasure() string
- func (_dgab ParagraphProperties) CharacterSpacingValue() int64
- func (_ebga ParagraphProperties) ComplexSizeMeasure() string
- func (_affgd ParagraphProperties) ComplexSizeValue() float64
- func (_bgefd ParagraphProperties) DoubleStrike() bool
- func (_dgad ParagraphProperties) EastAsiaFont() string
- func (_agbc ParagraphProperties) Emboss() bool
- func (_bgbd ParagraphProperties) Font() string
- func (_aaac ParagraphProperties) GetColor() _aa.Color
- func (_cbedc ParagraphProperties) Italic() bool
- func (_gdfg ParagraphProperties) Outline() bool
- func (_bbegd ParagraphProperties) RStyle() string
- func (_cefbd ParagraphProperties) RightToLeft() bool
- func (_egddf ParagraphProperties) Section() (Section, bool)
- func (_gbbbe ParagraphProperties) SetAlignment(align _afb.ST_Jc)
- func (_fefd ParagraphProperties) SetEndIndent(m _gf.Distance)
- func (_efbfc ParagraphProperties) SetFirstLineIndent(m _gf.Distance)
- func (_ccef ParagraphProperties) SetHangingIndent(m _gf.Distance)
- func (_adac ParagraphProperties) SetHeadingLevel(idx int)
- func (_babb ParagraphProperties) SetKeepOnOnePage(b bool)
- func (_abcadf ParagraphProperties) SetKeepWithNext(b bool)
- func (_agbd ParagraphProperties) SetPageBreakBefore(b bool)
- func (_bdad ParagraphProperties) SetSpacing(before, after _gf.Distance)
- func (_ggagc ParagraphProperties) SetStartIndent(m _gf.Distance)
- func (_bddd ParagraphProperties) SetStyle(s string)
- func (_ggcde ParagraphProperties) SetWindowControl(b bool)
- func (_gecca ParagraphProperties) Shadow() bool
- func (_fcag ParagraphProperties) SizeMeasure() string
- func (_acdfb ParagraphProperties) SizeValue() float64
- func (_ebcc ParagraphProperties) Spacing() ParagraphSpacing
- func (_afaag ParagraphProperties) Strike() bool
- func (_geddd ParagraphProperties) Style() string
- func (_gdbc ParagraphProperties) Underline() _afb.ST_Underline
- func (_cdbcb ParagraphProperties) UnderlineColor() string
- func (_gabbf ParagraphProperties) VerticalAlignment() _dg.ST_VerticalAlignRun
- func (_degcc ParagraphProperties) X() *_afb.CT_PPr
- type ParagraphSpacing
- func (_cdggf ParagraphSpacing) SetAfter(after _gf.Distance)
- func (_baggb ParagraphSpacing) SetAfterAuto(b bool)
- func (_cfff ParagraphSpacing) SetBefore(before _gf.Distance)
- func (_egbd ParagraphSpacing) SetBeforeAuto(b bool)
- func (_ddga ParagraphSpacing) SetLineSpacing(d _gf.Distance, rule _afb.ST_LineSpacingRule)
- type ParagraphStyleProperties
- func (_baffb ParagraphStyleProperties) AddTabStop(position _gf.Distance, justificaton _afb.ST_TabJc, leader _afb.ST_TabTlc)
- func (_cgggf ParagraphStyleProperties) NumId() int64
- func (_fcdge ParagraphStyleProperties) SetAlignment(align _afb.ST_Jc)
- func (_ddddg ParagraphStyleProperties) SetContextualSpacing(b bool)
- func (_ddbc ParagraphStyleProperties) SetFirstLineIndent(m _gf.Distance)
- func (_aedf ParagraphStyleProperties) SetHangingIndent(m _gf.Distance)
- func (_bcafe ParagraphStyleProperties) SetKeepNext(b bool)
- func (_baaac ParagraphStyleProperties) SetKeepOnOnePage(b bool)
- func (_bfdf ParagraphStyleProperties) SetLeftIndent(m _gf.Distance)
- func (_cafb ParagraphStyleProperties) SetLineSpacing(m _gf.Distance, rule _afb.ST_LineSpacingRule)
- func (_eadg ParagraphStyleProperties) SetOutlineLevel(lvl int)
- func (_dbecf ParagraphStyleProperties) SetSpacing(before, after _gf.Distance)
- func (_ccge ParagraphStyleProperties) SetStartIndent(m _gf.Distance)
- func (_cfgbb ParagraphStyleProperties) X() *_afb.CT_PPrGeneral
- type Row
- type RowProperties
- type Run
- func (_dacb Run) AddAnnotationReference()
- func (_gadcgd Run) AddBreak()
- func (_bdfg Run) AddCommentReference(id int64)
- func (_gfefc Run) AddDrawingAnchored(img _aff.ImageRef) (AnchoredDrawing, error)
- func (_ggbg Run) AddDrawingInline(img _aff.ImageRef) (InlineDrawing, error)
- func (_bfbd Run) AddEndnoteReference()
- func (_cbcfa Run) AddField(code string)
- func (_bfee Run) AddFieldWithFormatting(code string, fmt string, isDirty bool)
- func (_fdgbe Run) AddFootnoteReference()
- func (_edeed Run) AddHTML(s string)
- func (_bdfcf Run) AddPageBreak()
- func (_fagg Run) AddTOC(options *TOCOptions)
- func (_cbedbg Run) AddTab()
- func (_eeec Run) AddText(s string)
- func (_agfgg Run) Clear()
- func (_bdbg Run) ClearContent()
- func (_acfg Run) Control() *_ag.Control
- func (_aegc Run) Copy() Run
- func (_ebdee Run) DrawingAnchored() []AnchoredDrawing
- func (_edbd Run) DrawingInline() []InlineDrawing
- func (_cbcg Run) IsEndnote() (bool, int64)
- func (_bggd Run) IsFootnote() (bool, int64)
- func (_adgbe Run) Properties() RunProperties
- func (_aadba Run) SetProperties(rp RunProperties)
- func (_ededg Run) Text() string
- func (_babad Run) X() *_afb.CT_R
- type RunProperties
- func (_dfdcc RunProperties) Bold() bool
- func (_fefad RunProperties) BoldValue() OnOffValue
- func (_addad RunProperties) Caps() bool
- func (_baceg RunProperties) CharacterSpacingMeasure() string
- func (_aeafd RunProperties) CharacterSpacingValue() int64
- func (_eafeb RunProperties) ClearColor()
- func (_fefbf RunProperties) Color() Color
- func (_gdeg RunProperties) ComplexSizeMeasure() string
- func (_gaga RunProperties) ComplexSizeValue() float64
- func (_facdg RunProperties) DoubleStrike() bool
- func (_aegd RunProperties) EastAsiaFont() string
- func (_fegd RunProperties) Emboss() bool
- func (_aegagc RunProperties) Font() string
- func (_ceeec RunProperties) Fonts() Fonts
- func (_dfffg RunProperties) GetColor() _aa.Color
- func (_dcagc RunProperties) GetEffect() _afb.ST_TextEffect
- func (_egbabg RunProperties) GetHighlight() _afb.ST_HighlightColor
- func (_bgaed RunProperties) GetKerning() _gf.Distance
- func (_gebfd RunProperties) GetRightToLeft() bool
- func (_egae RunProperties) Imprint() bool
- func (_feded RunProperties) IsBold() bool
- func (_ccbf RunProperties) IsItalic() bool
- func (_fgged RunProperties) Italic() bool
- func (_fbfg RunProperties) ItalicValue() OnOffValue
- func (_acafa RunProperties) Outline() bool
- func (_aaccg RunProperties) RStyle() string
- func (_fbdge RunProperties) RightToLeft() bool
- func (_dbbg RunProperties) SetAllCaps(b bool)
- func (_cbfgg RunProperties) SetBold(b bool)
- func (_aabb RunProperties) SetCharacterSpacing(size _gf.Distance)
- func (_dbbe RunProperties) SetColor(c _aa.Color)
- func (_gedf RunProperties) SetDoubleStrikeThrough(b bool)
- func (_bgeg RunProperties) SetEffect(e _afb.ST_TextEffect)
- func (_bcgcd RunProperties) SetEmboss(b bool)
- func (_cafbe RunProperties) SetFontFamily(family string)
- func (_acfbc RunProperties) SetHighlight(c _afb.ST_HighlightColor)
- func (_bcgddb RunProperties) SetImprint(b bool)
- func (_dcea RunProperties) SetItalic(b bool)
- func (_bedaa RunProperties) SetKerning(size _gf.Distance)
- func (_gacba RunProperties) SetOutline(b bool)
- func (_ccgf RunProperties) SetRightToLeft(b bool)
- func (_bggegd RunProperties) SetShadow(b bool)
- func (_bedcg RunProperties) SetSize(size _gf.Distance)
- func (_eeafb RunProperties) SetSmallCaps(b bool)
- func (_bccbf RunProperties) SetStrikeThrough(b bool)
- func (_edgg RunProperties) SetStyle(style string)
- func (_eaeg RunProperties) SetUnderline(style _afb.ST_Underline, c _aa.Color)
- func (_dacc RunProperties) SetVerticalAlignment(v _dg.ST_VerticalAlignRun)
- func (_aefd RunProperties) Shadow() bool
- func (_gabefc RunProperties) SizeMeasure() string
- func (_cedef RunProperties) SizeValue() float64
- func (_egafb RunProperties) Strike() bool
- func (_ddea RunProperties) Underline() _afb.ST_Underline
- func (_dgdg RunProperties) UnderlineColor() string
- func (_ccfb RunProperties) VerticalAlignment() _dg.ST_VerticalAlignRun
- func (_bceg RunProperties) X() *_afb.CT_RPr
- type Section
- func (_dbfb Section) GetFooter(t _afb.ST_HdrFtr) (Footer, bool)
- func (_cbadb Section) GetHeader(t _afb.ST_HdrFtr) (Header, bool)
- func (_adeef Section) SetFooter(f Footer, t _afb.ST_HdrFtr)
- func (_cdef Section) SetHeader(h Header, t _afb.ST_HdrFtr)
- func (_bcgdc Section) SetPageMargins(top, right, bottom, left, header, footer, gutter _gf.Distance)
- func (_edbag Section) SetPageSizeAndOrientation(w, h _gf.Distance, orientation _afb.ST_PageOrientation)
- func (_cbgg Section) X() *_afb.CT_SectPr
- type Settings
- type StructuredDocumentTag
- type Style
- func (_gdedg Style) Name() string
- func (_acdbg Style) ParagraphProperties() ParagraphStyleProperties
- func (_efae Style) RunProperties() RunProperties
- func (_egefc Style) SetBasedOn(name string)
- func (_adcfd Style) SetLinkedStyle(name string)
- func (_fefeb Style) SetName(name string)
- func (_gagbd Style) SetNextStyle(name string)
- func (_dfabf Style) SetPrimaryStyle(b bool)
- func (_bfbfc Style) SetSemiHidden(b bool)
- func (_gedba Style) SetUISortOrder(order int)
- func (_fdcga Style) SetUnhideWhenUsed(b bool)
- func (_gdbde Style) StyleID() string
- func (_bcdba Style) TableConditionalFormatting(typ _afb.ST_TblStyleOverrideType) TableConditionalFormatting
- func (_gbdcd Style) TableProperties() TableStyleProperties
- func (_cdcb Style) Type() _afb.ST_StyleType
- func (_fbbb Style) X() *_afb.CT_Style
- type Styles
- func (_bfdfb Styles) AddStyle(styleID string, t _afb.ST_StyleType, isDefault bool) Style
- func (_aabga Styles) Clear()
- func (_fefc Styles) InitializeDefault()
- func (_agdg Styles) InsertStyle(ss Style)
- func (_dggbd Styles) ParagraphStyles() []Style
- func (_cfffe Styles) SearchStyleById(id string) (Style, bool)
- func (_gaae Styles) SearchStyleByName(name string) (Style, bool)
- func (_feaed Styles) Styles() []Style
- func (_dcedf Styles) X() *_afb.Styles
- type TOCOptions
- type Table
- func (_fcdbf Table) AddRow() Row
- func (_bbdg Table) EnsureGridColumns()
- func (_ccdgf Table) InsertRowAfter(r Row) Row
- func (_debfe Table) InsertRowBefore(r Row) Row
- func (_ecab Table) Properties() TableProperties
- func (_dfad Table) Rows() []Row
- func (_fgcdef Table) Style() string
- func (_dcgab Table) X() *_afb.CT_Tbl
- type TableBorders
- func (_bgbca TableBorders) SetAll(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_cabg TableBorders) SetBottom(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_acca TableBorders) SetInsideHorizontal(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_ebgca TableBorders) SetInsideVertical(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_dfgfa TableBorders) SetLeft(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_gggb TableBorders) SetRight(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_debad TableBorders) SetTop(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
- func (_aaeag TableBorders) X() *_afb.CT_TblBorders
- type TableConditionalFormatting
- type TableInfo
- type TableLook
- func (_bdegd TableLook) SetFirstColumn(on bool)
- func (_ddbb TableLook) SetFirstRow(on bool)
- func (_gbad TableLook) SetHorizontalBanding(on bool)
- func (_gggee TableLook) SetLastColumn(on bool)
- func (_cbcbc TableLook) SetLastRow(on bool)
- func (_bfgd TableLook) SetVerticalBanding(on bool)
- func (_aaegf TableLook) X() *_afb.CT_TblLook
- type TableProperties
- func (_ddbe TableProperties) Borders() TableBorders
- func (_adea TableProperties) SetAlignment(align _afb.ST_JcTable)
- func (_fcdc TableProperties) SetCellSpacing(m _gf.Distance)
- func (_eeeaf TableProperties) SetCellSpacingAuto()
- func (_gcfab TableProperties) SetCellSpacingPercent(pct float64)
- func (_baadb TableProperties) SetLayout(l _afb.ST_TblLayoutType)
- func (_ggbc TableProperties) SetStyle(name string)
- func (_dfdaa TableProperties) SetWidth(d _gf.Distance)
- func (_edddg TableProperties) SetWidthAuto()
- func (_aadbf TableProperties) SetWidthPercent(pct float64)
- func (_bdeeg TableProperties) TableLook() TableLook
- func (_ggad TableProperties) X() *_afb.CT_TblPr
- type TableStyleProperties
- func (_ecbce TableStyleProperties) Borders() TableBorders
- func (_gcabe TableStyleProperties) SetCellSpacingAuto()
- func (_gbae TableStyleProperties) SetCellSpacingPercent(pct float64)
- func (_edfd TableStyleProperties) SetColumnBandSize(cols int64)
- func (_gfggb TableStyleProperties) SetRowBandSize(rows int64)
- func (_gedga TableStyleProperties) SetTableIndent(ind _gf.Distance)
- func (_adgfa TableStyleProperties) X() *_afb.CT_TblPrBase
- type TableWidth
- type TextItem
- type WatermarkPicture
- func (_dfeg *WatermarkPicture) GetShapeStyle() _de.ShapeStyle
- func (_efdce *WatermarkPicture) Pict() *_afb.CT_Picture
- func (_aabgg *WatermarkPicture) SetPicture(imageRef _aff.ImageRef)
- func (_gdag *WatermarkPicture) SetPictureSize(width, height int64)
- func (_dgeb *WatermarkPicture) SetPictureWashout(isWashout bool)
- func (_gdbce *WatermarkPicture) SetShapeStyle(shapeStyle _de.ShapeStyle)
- type WatermarkText
- func (_bgadc *WatermarkText) EnableDiagonalLayout(value bool)
- func (_badec *WatermarkText) GetStyle() _de.TextpathStyle
- func (_afgfa *WatermarkText) GetText() string
- func (_acgg *WatermarkText) Pict() *_afb.CT_Picture
- func (_afggb *WatermarkText) SetColor(value string)
- func (_befd *WatermarkText) SetFontFamily(value string)
- func (_gbcfd *WatermarkText) SetFontSize(value int64)
- func (_egfbd *WatermarkText) SetOpacity(value float64)
- func (_faeeb *WatermarkText) SetStyle(style _de.TextpathStyle)
- func (_aacga *WatermarkText) SetText(text string)
- func (_fafe *WatermarkText) SetTextStyleBold(value bool)
- func (_egbda *WatermarkText) SetTextStyleItalic(value bool)
Constants ¶
const ( FieldCurrentPage = "\u0050\u0041\u0047\u0045" FieldNumberOfPages = "\u004e\u0055\u004d\u0050\u0041\u0047\u0045\u0053" FieldDate = "\u0044\u0041\u0054\u0045" FieldCreateDate = "\u0043\u0052\u0045\u0041\u0054\u0045\u0044\u0041\u0054\u0045" FieldEditTime = "\u0045\u0044\u0049\u0054\u0054\u0049\u004d\u0045" FieldPrintDate = "\u0050R\u0049\u004e\u0054\u0044\u0041\u0054E" FieldSaveDate = "\u0053\u0041\u0056\u0045\u0044\u0041\u0054\u0045" FieldTIme = "\u0054\u0049\u004d\u0045" FieldTOC = "\u0054\u004f\u0043" )
Variables ¶
var ( FootnoteTextStyleId = "\u0046\u006f\u006ft\u006e\u006f\u0074\u0065\u0054\u0065\u0078\u0074" EndnoteTextStyleId = "E\u006e\u0064\u006e\u006f\u0074\u0065\u0054\u0065\u0078\u0074" )
Functions ¶
This section is empty.
Types ¶
type AnchorDrawWrapOptions ¶
type AnchorDrawWrapOptions struct {
// contains filtered or unexported fields
}
AnchorDrawWrapOptions is options to set wrapPolygon for wrap text through and tight.
func NewAnchorDrawWrapOptions ¶
func NewAnchorDrawWrapOptions() *AnchorDrawWrapOptions
NewAnchorDrawWrapOptions return anchor drawing options property.
func (AnchorDrawWrapOptions) GetWrapPathLineTo ¶
func (_dbd AnchorDrawWrapOptions) GetWrapPathLineTo() []*_ff.CT_Point2D
GetWrapPathLineTo return wrapPath lineTo value.
func (AnchorDrawWrapOptions) GetWrapPathStart ¶
func (_cgac AnchorDrawWrapOptions) GetWrapPathStart() *_ff.CT_Point2D
GetWrapPathStart return wrapPath start value.
func (AnchorDrawWrapOptions) SetFollowImageShape ¶
func (_agbg AnchorDrawWrapOptions) SetFollowImageShape(val bool)
SetFollowImageShape sets wrapPath to follow image shape, if nil return wrapPath that follow image size.
func (AnchorDrawWrapOptions) SetWrapPathLineTo ¶
func (_dfb AnchorDrawWrapOptions) SetWrapPathLineTo(coordinates []*_ff.CT_Point2D)
SetWrapPathLineTo sets wrapPath lineTo value.
func (AnchorDrawWrapOptions) SetWrapPathStart ¶
func (_dbb AnchorDrawWrapOptions) SetWrapPathStart(coordinate *_ff.CT_Point2D)
SetWrapPathStart sets wrapPath start value.
type AnchoredDrawing ¶
type AnchoredDrawing struct {
// contains filtered or unexported fields
}
AnchoredDrawing is an absolutely positioned image within a document page.
func (AnchoredDrawing) GetImage ¶
func (_fbc AnchoredDrawing) GetImage() (_aff.ImageRef, bool)
GetImage returns the ImageRef associated with an AnchoredDrawing.
func (AnchoredDrawing) GetSize ¶
func (_abb AnchoredDrawing) GetSize() (_df, _aea int64)
GetSize return the size of anchor on the page.
func (AnchoredDrawing) Set3DRotationImageEffect ¶
func (_ecc AnchoredDrawing) Set3DRotationImageEffect()
Set3DRotationImageEffect sets the 3D rotation image effect.
func (AnchoredDrawing) SetAlignment ¶
func (_egg AnchoredDrawing) SetAlignment(h _afb.WdST_AlignH, v _afb.WdST_AlignV)
SetAlignment positions an anchored image via alignment. Offset is incompatible with SetOffset, whichever is called last is applied.
func (AnchoredDrawing) SetAllowOverlapAttr ¶
func (_gfg AnchoredDrawing) SetAllowOverlapAttr(val bool)
SetAllowOverlapAttr sets the allowOverlap attribute of anchor.
func (AnchoredDrawing) SetBehindDoc ¶
func (_bd AnchoredDrawing) SetBehindDoc(val bool)
SetBehindDoc sets the behindDoc attribute of anchor.
func (AnchoredDrawing) SetBevelImageEffect ¶
func (_bge AnchoredDrawing) SetBevelImageEffect()
SetBevelImageEffect sets the glow image effect.
func (AnchoredDrawing) SetBorder ¶
func (_dgb AnchoredDrawing) SetBorder(borderType _ff.ST_PresetLineDashVal, c _aa.Color, thickness _gf.Distance)
SetBorder sets the border of anchor.
func (AnchoredDrawing) SetGlowImageEffect ¶
func (_aeg AnchoredDrawing) SetGlowImageEffect(radius _gf.Distance, c _aa.Color)
SetGlowImageEffect sets the glow image effect.
func (AnchoredDrawing) SetHAlignment ¶
func (_agb AnchoredDrawing) SetHAlignment(h _afb.WdST_AlignH)
SetHAlignment sets the horizontal alignment for an anchored image.
func (AnchoredDrawing) SetId ¶
func (_db AnchoredDrawing) SetId(id uint32)
SetId sets the id of the image.
func (AnchoredDrawing) SetInnerShadowImageEffect ¶
func (_fg AnchoredDrawing) SetInnerShadowImageEffect(radius, offset _gf.Distance, c _aa.Color, degrees float64)
SetInnerShadowImageEffect sets the inner shadow image effect.
func (AnchoredDrawing) SetLayoutInCell ¶
func (_aba AnchoredDrawing) SetLayoutInCell(val bool)
SetLayoutInCell sets the layoutInCell attribute of anchor.
func (AnchoredDrawing) SetName ¶
func (_be AnchoredDrawing) SetName(name string)
SetName sets the name of the image, visible in the properties of the image within Word.
func (AnchoredDrawing) SetOffset ¶
func (_bgd AnchoredDrawing) SetOffset(x, y _gf.Distance)
SetOffset sets the offset of the image relative to the origin, which by default this is the top-left corner of the page. Offset is incompatible with SetAlignment, whichever is called last is applied.
func (AnchoredDrawing) SetOrigin ¶
func (_ee AnchoredDrawing) SetOrigin(h _afb.WdST_RelFromH, v _afb.WdST_RelFromV)
SetOrigin sets the origin of the image. It defaults to ST_RelFromHPage and ST_RelFromVPage
func (AnchoredDrawing) SetOuterShadowImageEffect ¶
func (_fa AnchoredDrawing) SetOuterShadowImageEffect(radius, offset _gf.Distance, c _aa.Color, degrees float64)
SetOuterShadowImageEffect sets the outer shadow image effect.
func (AnchoredDrawing) SetReflectionImageEffect ¶
func (_dba AnchoredDrawing) SetReflectionImageEffect(radius _gf.Distance, opacity, size float64)
SetReflectionImageEffect sets the reflection image effect.
func (AnchoredDrawing) SetSize ¶
func (_ddd AnchoredDrawing) SetSize(w, h _gf.Distance)
SetSize sets the size of the displayed image on the page.
func (AnchoredDrawing) SetSoftEdgeImageEffect ¶
func (_ede AnchoredDrawing) SetSoftEdgeImageEffect(radius _gf.Distance)
SetSoftEdgeImageEffect sets the soft edge image effect.
func (AnchoredDrawing) SetTextWrapBehindText ¶
func (_gbf AnchoredDrawing) SetTextWrapBehindText()
SetTextWrapBehindText sets the text wrap to behind text.
func (AnchoredDrawing) SetTextWrapInFrontOfText ¶
func (_dfe AnchoredDrawing) SetTextWrapInFrontOfText()
SetTextWrapInFrontOfText sets the text wrap to in front of text.
func (AnchoredDrawing) SetTextWrapNone ¶
func (_gg AnchoredDrawing) SetTextWrapNone()
SetTextWrapNone unsets text wrapping so the image can float on top of the text. When used in conjunction with X/Y Offset relative to the page it can be used to place a logo at the top of a page at an absolute position that doesn't interfere with text.
func (AnchoredDrawing) SetTextWrapSquare ¶
func (_afa AnchoredDrawing) SetTextWrapSquare(t _afb.WdST_WrapText)
SetTextWrapSquare sets the text wrap to square with a given wrap type.
func (AnchoredDrawing) SetTextWrapThrough ¶
func (_ea AnchoredDrawing) SetTextWrapThrough(option *AnchorDrawWrapOptions)
SetTextWrapThrough sets the text wrap to through with a give wrap type.
func (AnchoredDrawing) SetTextWrapTight ¶
func (_gd AnchoredDrawing) SetTextWrapTight(option *AnchorDrawWrapOptions)
SetTextWrapTight sets the text wrap to tight with a give wrap type.
func (AnchoredDrawing) SetTextWrapTopAndBottom ¶
func (_ed AnchoredDrawing) SetTextWrapTopAndBottom()
SetTextWrapTopAndBottom sets the text wrap to top and bottom.
func (AnchoredDrawing) SetVAlignment ¶
func (_fdg AnchoredDrawing) SetVAlignment(v _afb.WdST_AlignV)
SetVAlignment sets the vertical alignment for an anchored image.
func (AnchoredDrawing) SetXOffset ¶
func (_bga AnchoredDrawing) SetXOffset(x _gf.Distance)
SetXOffset sets the X offset for an image relative to the origin.
func (AnchoredDrawing) SetYOffset ¶
func (_cg AnchoredDrawing) SetYOffset(y _gf.Distance)
SetYOffset sets the Y offset for an image relative to the origin.
func (AnchoredDrawing) X ¶
func (_cac AnchoredDrawing) X() *_afb.WdAnchor
X returns the inner wrapped XML type.
type Bookmark ¶
type Bookmark struct {
// contains filtered or unexported fields
}
Bookmark is a bookmarked location within a document that can be referenced with a hyperlink.
func (Bookmark) Name ¶
Name returns the name of the bookmark whcih is the document unique ID that identifies the bookmark.
func (Bookmark) SetName ¶
SetName sets the name of the bookmark. This is the name that is used to reference the bookmark from hyperlinks.
func (Bookmark) X ¶
func (_afge Bookmark) X() *_afb.CT_Bookmark
X returns the inner wrapped XML type.
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
Cell is a table cell within a document (not a spreadsheet)
func (Cell) AddParagraph ¶
AddParagraph adds a paragraph to the table cell.
func (Cell) Paragraphs ¶
Paragraphs returns the paragraphs defined in the cell.
func (Cell) Properties ¶
func (_ebb Cell) Properties() CellProperties
Properties returns the cell properties.
type CellBorders ¶
type CellBorders struct {
// contains filtered or unexported fields
}
CellBorders are the borders for an individual
func (CellBorders) SetBottom ¶
SetBottom sets the bottom border to a specified type, color and thickness.
func (CellBorders) SetInsideHorizontal ¶
SetInsideHorizontal sets the interior horizontal borders to a specified type, color and thickness.
func (CellBorders) SetInsideVertical ¶
SetInsideVertical sets the interior vertical borders to a specified type, color and thickness.
func (CellBorders) SetRight ¶
SetRight sets the right border to a specified type, color and thickness.
func (CellBorders) X ¶
func (_eefd CellBorders) X() *_afb.CT_TcBorders
X returns the inner wrapped type
type CellMargins ¶
type CellMargins struct {
// contains filtered or unexported fields
}
CellMargins are the margins for an individual cell.
func (CellMargins) SetBottom ¶
func (_ddda CellMargins) SetBottom(d _gf.Distance)
SetBottom sets the cell bottom margin
func (CellMargins) SetBottomPct ¶
func (_caga CellMargins) SetBottomPct(pct float64)
SetBottomPct sets the cell bottom margin
func (CellMargins) SetLeft ¶
func (_fda CellMargins) SetLeft(d _gf.Distance)
SetLeft sets the cell left margin
func (CellMargins) SetLeftPct ¶
func (_gffa CellMargins) SetLeftPct(pct float64)
SetLeftPct sets the cell left margin
func (CellMargins) SetRight ¶
func (_eeb CellMargins) SetRight(d _gf.Distance)
SetRight sets the cell right margin
func (CellMargins) SetRightPct ¶
func (_bbe CellMargins) SetRightPct(pct float64)
SetRightPct sets the cell right margin
func (CellMargins) SetStart ¶
func (_aecc CellMargins) SetStart(d _gf.Distance)
SetStart sets the cell start margin
func (CellMargins) SetStartPct ¶
func (_dab CellMargins) SetStartPct(pct float64)
SetStartPct sets the cell start margin
func (CellMargins) SetTop ¶
func (_fc CellMargins) SetTop(d _gf.Distance)
SetTop sets the cell top margin
func (CellMargins) SetTopPct ¶
func (_fgg CellMargins) SetTopPct(pct float64)
SetTopPct sets the cell top margin
type CellProperties ¶
type CellProperties struct {
// contains filtered or unexported fields
}
CellProperties are a table cells properties within a document.
func (CellProperties) Borders ¶
func (_bgfa CellProperties) Borders() CellBorders
Borders allows controlling individual cell borders.
func (CellProperties) Margins ¶
func (_cbd CellProperties) Margins() CellMargins
Margins allows controlling individual cell margins.
func (CellProperties) SetColumnSpan ¶
func (_egd CellProperties) SetColumnSpan(cols int)
SetColumnSpan sets the number of Grid Columns Spanned by the Cell. This is used to give the appearance of merged cells.
func (CellProperties) SetShading ¶
func (_ccg CellProperties) SetShading(shd _afb.ST_Shd, foreground, fill _aa.Color)
SetShading controls the cell shading.
func (CellProperties) SetVerticalAlignment ¶
func (_ddee CellProperties) SetVerticalAlignment(align _afb.ST_VerticalJc)
SetVerticalAlignment sets the vertical alignment of content within a table cell.
func (CellProperties) SetVerticalMerge ¶
func (_add CellProperties) SetVerticalMerge(mergeVal _afb.ST_Merge)
SetVerticalMerge controls the vertical merging of cells.
func (CellProperties) SetWidth ¶
func (_afc CellProperties) SetWidth(d _gf.Distance)
SetWidth sets the cell width to a specified width.
func (CellProperties) SetWidthAuto ¶
func (_age CellProperties) SetWidthAuto()
SetWidthAuto sets the the cell width to automatic.
func (CellProperties) SetWidthPercent ¶
func (_efc CellProperties) SetWidthPercent(pct float64)
SetWidthPercent sets the cell to a width percentage.
func (CellProperties) X ¶
func (_bgb CellProperties) X() *_afb.CT_TcPr
X returns the inner wrapped XML type.
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
Color controls the run or styles color.
func (Color) SetThemeColor ¶
func (_dfa Color) SetThemeColor(t _afb.ST_ThemeColor)
SetThemeColor sets the color from the theme.
func (Color) SetThemeShade ¶
SetThemeShade sets the shade based off the theme color.
type Comment ¶
type Comment struct {
// contains filtered or unexported fields
}
Comment is run's comment component.
func (Comment) AddParagraph ¶
AddParagraph adds a paragraph to the comment.
type DocText ¶
type DocText struct {
Items []TextItem
// contains filtered or unexported fields
}
DocText is an array of extracted text items which has some methods for representing extracted text.
func (*DocText) Text ¶
Text returns text from the document as one string separated with line breaks.
func (*DocText) TextWithOptions ¶
func (_dfdc *DocText) TextWithOptions(options ExtractTextOptions) string
TextWithOptions extract text with options.
type Document ¶
type Document struct {
_aff.DocBase
Settings Settings
Numbering Numbering
Styles Styles
// contains filtered or unexported fields
}
Document is a text document that can be written out in the OOXML .docx format. It can be opened from a file on disk and modified, or created from scratch.
func OpenTemplate ¶
OpenTemplate opens a document, removing all content so it can be used as a template. Since Word removes unused styles from a document upon save, to create a template in Word add a paragraph with every style of interest. When opened with OpenTemplate the document's styles will be available but the content will be gone.
func (*Document) AddFooter ¶
AddFooter creates a Footer associated with the document, but doesn't add it to the document for display.
func (*Document) AddHeader ¶
AddHeader creates a header associated with the document, but doesn't add it to the document for display.
func (Document) AddHyperlink ¶
AddHyperlink adds a hyperlink to a document. Adding the hyperlink to a document and setting it on a cell is more efficient than setting hyperlinks directly on a cell.
func (*Document) AddImage ¶
AddImage adds an image to the document package, returning a reference that can be used to add the image to a run and place it in the document contents.
func (*Document) AddParagraph ¶
AddParagraph adds a new paragraph to the document body.
func (*Document) AddWatermarkPicture ¶
func (_ffde *Document) AddWatermarkPicture(imageRef _aff.ImageRef) WatermarkPicture
AddWatermarkPicture adds new watermark picture to document.
func (*Document) AddWatermarkText ¶
func (_bedg *Document) AddWatermarkText(text string) WatermarkText
AddWatermarkText adds new watermark text to the document.
func (*Document) Append ¶
Append appends a document d0 to a document d1. All settings, headers and footers remain the same as in the document d0 if they exist there, otherwise they are taken from the d1.
func (*Document) AppendNode ¶
AppendNode append node to document element.
func (*Document) BodySection ¶
BodySection returns the default body section used for all preceding paragraphs until the previous Section. If there is no previous sections, the body section applies to the entire document.
func (*Document) Close ¶
Close closes the document, removing any temporary files that might have been created when opening a document.
func (*Document) Copy ¶
Copy makes a deep copy of the document by saving and reading it back. It can be useful to avoid sharing common data between two documents.
func (*Document) DocRels ¶
func (_eabaa *Document) DocRels() _aff.Relationships
DocRels returns document relationship.
func (*Document) Endnote ¶
Endnote returns the endnote based on the ID; this can be used nicely with the run.IsEndnote() functionality.
func (*Document) ExtractText ¶
ExtractText returns text from the document as a DocText object.
func (*Document) Footnote ¶
Footnote returns the footnote based on the ID; this can be used nicely with the run.IsFootnote() functionality.
func (*Document) FormFields ¶
FormFields extracts all the fields from a document. They can then be manipulated via the methods on the field and the document saved.
func (*Document) GetChartSpaceByRelId ¶
func (_bcdc *Document) GetChartSpaceByRelId(relId string) *_ba.ChartSpace
GetChartSpaceByRelId returns a *crt.ChartSpace with the associated relation ID in the document.
func (*Document) GetDocRelTargetByID ¶
GetDocRelTargetByID returns TargetAttr of document relationship given its IdAttr.
func (*Document) GetFontBytesByRelId ¶
func (*Document) GetHeaderFooterImageObjByRelId ¶
func (_fgda *Document) GetHeaderFooterImageObjByRelId(relId string, isHeader, isFooter bool) (_aff.Image, error)
GetHeaderFooterImageObjByRelId returns a common.Image with the associated relation ID in the document, its header or footer.
func (*Document) GetImageByRelID ¶
GetImageByRelID returns an ImageRef with the associated relation ID in the document.
func (*Document) GetImageObjByRelId ¶
GetImageObjByRelId returns a common.Image with the associated relation ID in the document.
func (*Document) GetNumberingLevelByIds ¶
func (_agfa *Document) GetNumberingLevelByIds(numId, levelId int64) NumberingLevel
GetNumberingLevelByIds returns a NumberingLevel by its NumId and LevelId attributes or an empty one if not found.
func (*Document) GetStyleByID ¶
GetStyleByID returns Style by it is IdAttr.
func (*Document) GetTargetByRelId ¶
GetTargetByRelId returns a target path with the associated relation ID in the document.
func (*Document) HasComments ¶
HasComments checks if the document contains comments.
func (*Document) HasEndnotes ¶
HasEndnotes returns a bool based on the presence or abscence of endnotes within the document.
func (*Document) HasFootnotes ¶
HasFootnotes returns a bool based on the presence or abscence of footnotes within the document.
func (*Document) InsertParagraphAfter ¶
InsertParagraphAfter adds a new empty paragraph after the relativeTo paragraph.
func (*Document) InsertParagraphBefore ¶
InsertParagraphBefore adds a new empty paragraph before the relativeTo paragraph.
func (*Document) InsertTableAfter ¶
func (*Document) InsertTableBefore ¶
func (*Document) MailMerge ¶
MailMerge finds mail merge fields and replaces them with the text provided. It also removes the mail merge source info from the document settings.
func (Document) MergeFields ¶
MergeFields returns the list of all mail merge fields found in the document.
func (*Document) Paragraphs ¶
Paragraphs returns all the paragraphs in the document body including tables.
func (*Document) PutNodeAfter ¶
PutNodeAfter put node to position after relativeTo.
func (*Document) PutNodeBefore ¶
PutNodeBefore put node to position before relativeTo.
func (*Document) RemoveComment ¶
RemoveComment will remove comment with a given id from the document.
func (*Document) RemoveParagraph ¶
RemoveParagraph removes a paragraph from a document.
func (*Document) RemoveTable ¶
RemoveTable remove table element from document.
func (*Document) SaveToFile ¶
SaveToFile writes the document out to a file.
func (Document) SetConformance ¶
func (_gbbg Document) SetConformance(conformanceAttr _dg.ST_ConformanceClass)
SetConformance sets conformance attribute of the document as one of these values from github.com/golgys0621/gooffice/schema/soo/ofc/sharedTypes: ST_ConformanceClassUnset, ST_ConformanceClassStrict or ST_ConformanceClassTransitional.
func (Document) SetStrict ¶
SetStrict is a shortcut for document.SetConformance, as one of these values from github.com/golgys0621/gooffice/schema/soo/ofc/sharedTypes: ST_ConformanceClassUnset, ST_ConformanceClassStrict or ST_ConformanceClassTransitional.
func (*Document) StructuredDocumentTags ¶
func (_debf *Document) StructuredDocumentTags() []StructuredDocumentTag
StructuredDocumentTags returns the structured document tags in the document which are commonly used in document templates.
type DrawingInfo ¶
type DrawingInfo struct {
Drawing *_afb.CT_Drawing
Width int64
Height int64
}
DrawingInfo is used for keep information about a drawing wrapping a textbox where the text is located.
type Endnote ¶
type Endnote struct {
// contains filtered or unexported fields
}
Endnote is an individual endnote reference within the document.
func (Endnote) AddParagraph ¶
AddParagraph adds a paragraph to the endnote.
func (Endnote) Paragraphs ¶
Paragraphs returns the paragraphs defined in an endnote.
func (Endnote) RemoveParagraph ¶
RemoveParagraph removes a paragraph from the endnote.
type ExtractTextOptions ¶
type ExtractTextOptions struct {
// WithNumbering extract numbering elements if set to `true`.
WithNumbering bool
// NumberingIndent default value of numbering indent.
NumberingIndent string
// RunsOnNewLine write each of runs text on new line if set to `true`.
RunsOnNewLine bool
}
ExtractTextOptions extraction text options.
type Fonts ¶
type Fonts struct {
// contains filtered or unexported fields
}
Fonts allows manipulating a style or run's fonts.
func (Fonts) SetASCIITheme ¶
SetASCIITheme sets the font ASCII Theme.
func (Fonts) SetCSTheme ¶
SetCSTheme sets the font complex script theme.
func (Fonts) SetEastAsiaTheme ¶
SetEastAsiaTheme sets the font East Asia Theme.
func (Fonts) SetHANSITheme ¶
SetHANSITheme sets the font H ANSI Theme.
type Footer ¶
type Footer struct {
// contains filtered or unexported fields
}
Footer is a footer for a document section.
func (Footer) AddImage ¶
AddImage adds an image to the document package, returning a reference that can be used to add the image to a run and place it in the document contents.
func (Footer) AddParagraph ¶
AddParagraph adds a paragraph to the footer.
func (Footer) Index ¶
Index returns the index of the footer within the document. This is used to form its zip packaged filename as well as to match it with its relationship ID.
func (Footer) Paragraphs ¶
Paragraphs returns the paragraphs defined in a footer.
func (Footer) RemoveParagraph ¶
RemoveParagraph removes a paragraph from a footer.
type Footnote ¶
type Footnote struct {
// contains filtered or unexported fields
}
Footnote is an individual footnote reference within the document.
func (Footnote) AddParagraph ¶
AddParagraph adds a paragraph to the footnote.
func (Footnote) Paragraphs ¶
Paragraphs returns the paragraphs defined in a footnote.
func (Footnote) RemoveParagraph ¶
RemoveParagraph removes a paragraph from the footnote.
type FormField ¶
type FormField struct {
// contains filtered or unexported fields
}
FormField is a form within a document. It references the document, so changes to the form field wil be reflected in the document if it is saved.
func (FormField) PossibleValues ¶
PossibleValues returns the possible values for a FormFieldTypeDropDown.
func (FormField) SetCalcOnExit ¶
SetCalcOnExit marks if a FormField should be CalcOnExit or not.
func (FormField) SetChecked ¶
SetChecked marks a FormFieldTypeCheckBox as checked or unchecked.
func (FormField) SetDefaultValue ¶
SetDefaultValue sets the default value of a FormFieldTypeDropDown. For FormFieldTypeDropDown, the value must be one of the fields possible values.
func (FormField) SetEnabled ¶
SetEnabled marks a FormField as enabled or disabled.
func (FormField) SetPossibleValues ¶
SetPossibleValues sets possible values for a FormFieldTypeDropDown.
func (FormField) SetValue ¶
SetValue sets the value of a FormFieldTypeText or FormFieldTypeDropDown. For FormFieldTypeDropDown, the value must be one of the fields possible values.
func (FormField) Type ¶
func (_deeff FormField) Type() FormFieldType
Type returns the type of the field.
type FormFieldType ¶
type FormFieldType byte
FormFieldType is the type of the form field.
const ( FormFieldTypeUnknown FormFieldType = iota FormFieldTypeText FormFieldTypeCheckBox FormFieldTypeDropDown )
func (FormFieldType) String ¶
func (_edegf FormFieldType) String() string
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header is a header for a document section.
func (Header) AddImage ¶
AddImage adds an image to the document package, returning a reference that can be used to add the image to a run and place it in the document contents.
func (Header) AddImageRef ¶
AddImageRef add ImageRef to header as relationship, returning ImageRef that can be used to be placed as header content.
func (Header) AddParagraph ¶
AddParagraph adds a paragraph to the header.
func (Header) Index ¶
Index returns the index of the header within the document. This is used to form its zip packaged filename as well as to match it with its relationship ID.
func (Header) Paragraphs ¶
Paragraphs returns the paragraphs defined in a header.
func (Header) RemoveParagraph ¶
RemoveParagraph removes a paragraph from a footer.
type HyperLink ¶
type HyperLink struct {
// contains filtered or unexported fields
}
HyperLink is a link within a document.
func (HyperLink) AddRun ¶
AddRun adds a run of text to a hyperlink. This is the text that will be linked.
func (HyperLink) SetTargetBookmark ¶
SetTargetBookmark sets the bookmark target of the hyperlink.
func (HyperLink) SetTargetByRef ¶
SetTargetByRef sets the URL target of the hyperlink and is more efficient if a link destination will be used many times.
func (HyperLink) SetToolTip ¶
SetToolTip sets the tooltip text for a hyperlink.
func (HyperLink) X ¶
func (_cdfa HyperLink) X() *_afb.CT_Hyperlink
X returns the inner wrapped XML type.
type InlineDrawing ¶
type InlineDrawing struct {
// contains filtered or unexported fields
}
InlineDrawing is an inlined image within a run.
func (InlineDrawing) GetImage ¶
func (_ebef InlineDrawing) GetImage() (_aff.ImageRef, bool)
GetImage returns the ImageRef associated with an InlineDrawing.
func (InlineDrawing) SetSize ¶
func (_degg InlineDrawing) SetSize(w, h _gf.Distance)
SetSize sets the size of the displayed image on the page.
func (InlineDrawing) X ¶
func (_eefg InlineDrawing) X() *_afb.WdInline
X returns the inner wrapped XML type.
type Node ¶
type Node struct {
Style Style
AnchoredDrawings []AnchoredDrawing
InlineDrawings []InlineDrawing
Children []Node
// contains filtered or unexported fields
}
Node is document element node, contains Paragraph or Table element.
func (*Node) ReplaceText ¶
ReplaceText replace the text inside node.
func (*Node) ReplaceTextByRegexp ¶
ReplaceTextByRegexp replace the text within node using regexp expression.
type Nodes ¶
type Nodes struct {
// contains filtered or unexported fields
}
Nodes contains slice of Node element.
func (*Nodes) FindNodeByCondition ¶
FindNodeByCondition return node based on condition function, if wholeElements is true, its will extract children as next node elements.
func (*Nodes) FindNodeByRegexp ¶
FindNodeByRegexp return node based on matched text and return a slice of node.
func (*Nodes) FindNodeByStyleId ¶
FindNodeByStyleId return slice of node base on style id.
func (*Nodes) FindNodeByStyleName ¶
FindNodeByStyleName return slice of node base on style name.
func (*Nodes) FindNodeByText ¶
FindNodeByText return node based on matched text and return a slice of node.
func (*Nodes) ReplaceText ¶
ReplaceText replace text inside node.
func (*Nodes) ReplaceTextByRegexp ¶
ReplaceTextByRegexp replace text inside node using regexp.
type Numbering ¶
type Numbering struct {
// contains filtered or unexported fields
}
Numbering is the document wide numbering styles contained in numbering.xml.
func (Numbering) AddDefinition ¶
func (_ggfce Numbering) AddDefinition() NumberingDefinition
AddDefinition adds a new numbering definition.
func (Numbering) Definitions ¶
func (_aafcc Numbering) Definitions() []NumberingDefinition
Definitions returns the defined numbering definitions.
func (Numbering) InitializeDefault ¶
func (_bccc Numbering) InitializeDefault()
InitializeDefault constructs a default numbering.
func (*Numbering) Restart ¶
func (_ccee *Numbering) Restart(nd *NumberingDefinition)
Restart restarts the numbering
type NumberingDefinition ¶
type NumberingDefinition struct {
// contains filtered or unexported fields
}
NumberingDefinition defines a numbering definition for a list of pragraphs.
func (NumberingDefinition) AbstractNumberID ¶
func (_gfbgd NumberingDefinition) AbstractNumberID() int64
AbstractNumberID returns the ID that is unique within all numbering definitions that is used to assign the definition to a paragraph.
func (NumberingDefinition) AddLevel ¶
func (_acfae NumberingDefinition) AddLevel() NumberingLevel
AddLevel adds a new numbering level to a NumberingDefinition.
func (NumberingDefinition) Levels ¶
func (_acdcf NumberingDefinition) Levels() []NumberingLevel
Levels returns all of the numbering levels defined in the definition.
func (NumberingDefinition) MultiLevelType ¶
func (_gfad NumberingDefinition) MultiLevelType() _afb.ST_MultiLevelType
MultiLevelType returns the multilevel type, or ST_MultiLevelTypeUnset if not set.
func (NumberingDefinition) SetMultiLevelType ¶
func (_daffd NumberingDefinition) SetMultiLevelType(t _afb.ST_MultiLevelType)
SetMultiLevelType sets the multilevel type.
func (NumberingDefinition) X ¶
func (_cfcbb NumberingDefinition) X() *_afb.CT_AbstractNum
X returns the inner wrapped XML type.
type NumberingLevel ¶
type NumberingLevel struct {
// contains filtered or unexported fields
}
NumberingLevel is the definition for numbering for a particular level within a NumberingDefinition.
func (NumberingLevel) Properties ¶
func (_cddff NumberingLevel) Properties() ParagraphStyleProperties
Properties returns the numbering level paragraph properties.
func (NumberingLevel) RunProperties ¶
func (_fdbd NumberingLevel) RunProperties() RunProperties
RunProperties returns the RunProperties controlling numbering level font, etc.
func (NumberingLevel) SetAlignment ¶
func (_dddgg NumberingLevel) SetAlignment(j _afb.ST_Jc)
SetAlignment sets the paragraph alignment
func (NumberingLevel) SetFormat ¶
func (_cgef NumberingLevel) SetFormat(f _afb.ST_NumberFormat)
SetFormat sets the numbering format.
func (NumberingLevel) SetText ¶
func (_gadab NumberingLevel) SetText(t string)
SetText sets the text to be used in bullet mode.
func (NumberingLevel) X ¶
func (_acba NumberingLevel) X() *_afb.CT_Lvl
X returns the inner wrapped XML type.
type OnOffValue ¶
type OnOffValue byte
OnOffValue represents an on/off value that can also be unset
const ( OnOffValueUnset OnOffValue = iota OnOffValueOff OnOffValueOn )
type Paragraph ¶
type Paragraph struct {
// contains filtered or unexported fields
}
Paragraph is a paragraph within a document.
func (Paragraph) AddBookmark ¶
AddBookmark adds a bookmark to a document that can then be used from a hyperlink. Name is a document unique name that identifies the bookmark so it can be referenced from hyperlinks.
func (Paragraph) AddCheckBox ¶
AddCheckBox adds checkbox form field to the paragraph and returns it.
func (Paragraph) AddComment ¶
AddComment add comment to the paragraph.
func (Paragraph) AddDeletedText ¶
AddDeletedText add a text deletion to the paragraph specifying its revision number, author and id.
func (Paragraph) AddDropdownList ¶
AddDropdownList adds dropdown list form field to the paragraph and returns it.
func (Paragraph) AddEndnote ¶
AddEndnote will create a new endnote and attach it to the Paragraph in the location at the end of the previous run (endnotes create their own run within the paragraph. The text given to the function is simply a convenience helper, paragraphs and runs can always be added to the text of the endnote later.
func (Paragraph) AddFootnote ¶
AddFootnote will create a new footnote and attach it to the Paragraph in the location at the end of the previous run (footnotes create their own run within the paragraph). The text given to the function is simply a convenience helper, paragraphs and runs can always be added to the text of the footnote later.
func (Paragraph) AddHTML ¶
AddHTML adds a text that contains HTML tags to a paragraph.
The following tags are supported:
- <b> or <strong> for bold text
- <i> or <em> for italic text
- <u> for underlined text
- <strike> for strikethrough text
- <mark> for highlighted text
- <sub> for subscript text
- <sup> for superscript text
func (Paragraph) AddHyperLink ¶
AddHyperLink adds a new hyperlink to a parapgraph.
func (Paragraph) AddInsertedText ¶
AddInsertedText add a text insertion to the paragraph specifying its revision number, author and id.
func (Paragraph) AddTextInput ¶
AddTextInput adds text input form field to the paragraph and returns it.
func (Paragraph) Borders ¶
func (_degdf Paragraph) Borders() ParagraphBorders
Borders returns the ParagraphBorders for setting-up border on paragraph.
func (Paragraph) CloseComment ¶
CloseComment will close the comment.
func (Paragraph) IgnoreSpaceBetweenParagraphOfSameStyle ¶
func (_caeb Paragraph) IgnoreSpaceBetweenParagraphOfSameStyle()
IgnoreSpaceBetweenParagraphOfSameStyle sets contextual spacing.
func (Paragraph) InsertRunAfter ¶
InsertRunAfter inserts a run in the paragraph after the relative run.
func (Paragraph) InsertRunBefore ¶
InsertRunBefore inserts a run in the paragraph before the relative run.
func (Paragraph) Properties ¶
func (_abfaf Paragraph) Properties() ParagraphProperties
Properties returns the paragraph properties.
func (Paragraph) RemoveEndnote ¶
RemoveEndnote removes a endnote from both the paragraph and the document the requested endnote must be anchored on the paragraph being referenced.
After each removal, the rest of the endnote ids would be reordered.
func (Paragraph) RemoveFootnote ¶
RemoveFootnote removes a footnote from both the paragraph and the document the requested footnote must be anchored on the paragraph being referenced.
After each removal, the rest of the footnote ids would be reordered.
func (Paragraph) SetAfterLineSpacing ¶
SetAfterLineSpacing sets spacing below paragraph in line units.
func (Paragraph) SetAfterSpacing ¶
SetAfterSpacing sets spacing below paragraph.
func (Paragraph) SetAlignment ¶
SetAlignment set alignment of paragraph.
func (Paragraph) SetBeforeLineSpacing ¶
// SetBeforeLineSpacing sets spacing above paragraph in line units.
func (Paragraph) SetBeforeSpacing ¶
SetBeforeSpacing sets spacing above paragraph.
func (Paragraph) SetFirstLineIndent ¶
SetFirstLineIndent controls the indentation of the first line in a paragraph.
func (Paragraph) SetHangingIndent ¶
SetHangingIndent controls special indent of paragraph.
func (Paragraph) SetLeftIndent ¶
SetLeftIndent controls left indent of paragraph.
func (Paragraph) SetLineSpacing ¶
func (_bgecg Paragraph) SetLineSpacing(d _gf.Distance, rule _afb.ST_LineSpacingRule)
SetLineSpacing sets the spacing between lines in a paragraph.
func (Paragraph) SetNumberingDefinition ¶
func (_cbcd Paragraph) SetNumberingDefinition(nd NumberingDefinition)
SetNumberingDefinition sets the numbering definition ID via a NumberingDefinition defined in numbering.xml
func (Paragraph) SetNumberingDefinitionByID ¶
SetNumberingDefinitionByID sets the numbering definition ID directly, which must match an ID defined in numbering.xml
func (Paragraph) SetNumberingLevel ¶
SetNumberingLevel sets the numbering level of a paragraph. If used, then the NumberingDefinition must also be set via SetNumberingDefinition or SetNumberingDefinitionByID.
func (Paragraph) SetOutlineLvl ¶
SetOutlineLvl sets outline level of paragraph.
func (Paragraph) SetRightIndent ¶
SetRightIndent controls right indent of paragraph.
func (Paragraph) SetStyle ¶
SetStyle sets the style of a paragraph and is identical to setting it on the paragraph's Properties()
type ParagraphBorders ¶
type ParagraphBorders struct {
// contains filtered or unexported fields
}
ParagraphBorders allows manipulation of borders on a paragraph.
func (ParagraphBorders) SetBetween ¶
SetBetween sets the between border to a specified type, color and thickness between paragraph.
func (ParagraphBorders) SetBottom ¶
SetBottom sets the bottom border to a specified type, color and thickness.
func (ParagraphBorders) SetLeft ¶
SetLeft sets the left border to a specified type, color and thickness.
func (ParagraphBorders) SetRight ¶
SetRight sets the right border to a specified type, color and thickness.
func (ParagraphBorders) SetTop ¶
SetTop sets the top border to a specified type, color and thickness.
func (ParagraphBorders) X ¶
func (_gadb ParagraphBorders) X() *_afb.CT_PBdr
X returns the inner wml.CT_PBdr
type ParagraphProperties ¶
type ParagraphProperties struct {
// contains filtered or unexported fields
}
ParagraphProperties are the properties for a paragraph.
func (ParagraphProperties) AddSection ¶
func (_ddgc ParagraphProperties) AddSection(t _afb.ST_SectionMark) Section
AddSection adds a new document section with an optional section break. If t is ST_SectionMarkUnset, then no break will be inserted.
func (ParagraphProperties) AddTabStop ¶
func (_ffbe ParagraphProperties) AddTabStop(position _gf.Distance, justificaton _afb.ST_TabJc, leader _afb.ST_TabTlc)
AddTabStop adds a tab stop to the paragraph. It controls the position of text when using Run.AddTab()
func (ParagraphProperties) Bold ¶
func (_cfedb ParagraphProperties) Bold() bool
Bold returns true if paragraph font is bold.
func (ParagraphProperties) Caps ¶
func (_caagd ParagraphProperties) Caps() bool
Caps returns true if paragraph font is capitalized.
func (ParagraphProperties) CharacterSpacingMeasure ¶
func (_bbcfg ParagraphProperties) CharacterSpacingMeasure() string
CharacterSpacingMeasure returns paragraph characters spacing with its measure which can be mm, cm, in, pt, pc or pi.
func (ParagraphProperties) CharacterSpacingValue ¶
func (_dgab ParagraphProperties) CharacterSpacingValue() int64
CharacterSpacingValue returns the value of characters spacing in twips (1/20 of point).
func (ParagraphProperties) ComplexSizeMeasure ¶
func (_ebga ParagraphProperties) ComplexSizeMeasure() string
ComplexSizeMeasure returns font with its measure which can be mm, cm, in, pt, pc or pi.
func (ParagraphProperties) ComplexSizeValue ¶
func (_affgd ParagraphProperties) ComplexSizeValue() float64
ComplexSizeValue returns the value of paragraph font size for complex fonts in points.
func (ParagraphProperties) DoubleStrike ¶
func (_bgefd ParagraphProperties) DoubleStrike() bool
DoubleStrike returns true if paragraph is double striked.
func (ParagraphProperties) EastAsiaFont ¶
func (_dgad ParagraphProperties) EastAsiaFont() string
EastAsiaFont returns the name of paragraph font family for East Asia.
func (ParagraphProperties) Emboss ¶
func (_agbc ParagraphProperties) Emboss() bool
Emboss returns true if paragraph emboss is on.
func (ParagraphProperties) Font ¶
func (_bgbd ParagraphProperties) Font() string
Font returns the name of paragraph font family.
func (ParagraphProperties) GetColor ¶
func (_aaac ParagraphProperties) GetColor() _aa.Color
GetColor returns the color.Color object representing the run color.
func (ParagraphProperties) Italic ¶
func (_cbedc ParagraphProperties) Italic() bool
Italic returns true if paragraph font is italic.
func (ParagraphProperties) Outline ¶
func (_gdfg ParagraphProperties) Outline() bool
Outline returns true if paragraph outline is on.
func (ParagraphProperties) RStyle ¶
func (_bbegd ParagraphProperties) RStyle() string
RStyle returns the name of character style. It is defined here http://officeopenxml.com/WPstyleCharStyles.php
func (ParagraphProperties) RightToLeft ¶
func (_cefbd ParagraphProperties) RightToLeft() bool
RightToLeft returns true if paragraph text goes from right to left.
func (ParagraphProperties) Section ¶
func (_egddf ParagraphProperties) Section() (Section, bool)
Section return paragraph properties section value.
func (ParagraphProperties) SetAlignment ¶
func (_gbbbe ParagraphProperties) SetAlignment(align _afb.ST_Jc)
SetAlignment controls the paragraph alignment
func (ParagraphProperties) SetEndIndent ¶
func (_fefd ParagraphProperties) SetEndIndent(m _gf.Distance)
SetEndIndent controls the end indentation.
func (ParagraphProperties) SetFirstLineIndent ¶
func (_efbfc ParagraphProperties) SetFirstLineIndent(m _gf.Distance)
SetFirstLineIndent controls the indentation of the first line in a paragraph.
func (ParagraphProperties) SetHangingIndent ¶
func (_ccef ParagraphProperties) SetHangingIndent(m _gf.Distance)
SetHangingIndent controls the indentation of the non-first lines in a paragraph.
func (ParagraphProperties) SetHeadingLevel ¶
func (_adac ParagraphProperties) SetHeadingLevel(idx int)
SetHeadingLevel sets a heading level and style based on the level to a paragraph. The default styles for a new gooffice document support headings from level 1 to 8.
func (ParagraphProperties) SetKeepOnOnePage ¶
func (_babb ParagraphProperties) SetKeepOnOnePage(b bool)
SetKeepOnOnePage controls if all lines in a paragraph are kept on the same page.
func (ParagraphProperties) SetKeepWithNext ¶
func (_abcadf ParagraphProperties) SetKeepWithNext(b bool)
SetKeepWithNext controls if this paragraph should be kept with the next.
func (ParagraphProperties) SetPageBreakBefore ¶
func (_agbd ParagraphProperties) SetPageBreakBefore(b bool)
SetPageBreakBefore controls if there is a page break before this paragraph.
func (ParagraphProperties) SetSpacing ¶
func (_bdad ParagraphProperties) SetSpacing(before, after _gf.Distance)
SetSpacing sets the spacing that comes before and after the paragraph. Deprecated: See Spacing() instead which allows finer control.
func (ParagraphProperties) SetStartIndent ¶
func (_ggagc ParagraphProperties) SetStartIndent(m _gf.Distance)
SetStartIndent controls the start indentation.
func (ParagraphProperties) SetStyle ¶
func (_bddd ParagraphProperties) SetStyle(s string)
SetStyle sets the style of a paragraph.
func (ParagraphProperties) SetWindowControl ¶
func (_ggcde ParagraphProperties) SetWindowControl(b bool)
SetWindowControl controls if the first or last line of the paragraph is allowed to display on a separate page.
func (ParagraphProperties) Shadow ¶
func (_gecca ParagraphProperties) Shadow() bool
Shadow returns true if paragraph shadow is on.
func (ParagraphProperties) SizeMeasure ¶
func (_fcag ParagraphProperties) SizeMeasure() string
SizeMeasure returns font with its measure which can be mm, cm, in, pt, pc or pi.
func (ParagraphProperties) SizeValue ¶
func (_acdfb ParagraphProperties) SizeValue() float64
SizeValue returns the value of paragraph font size in points.
func (ParagraphProperties) Spacing ¶
func (_ebcc ParagraphProperties) Spacing() ParagraphSpacing
Spacing returns the paragraph spacing settings.
func (ParagraphProperties) Strike ¶
func (_afaag ParagraphProperties) Strike() bool
Strike returns true if paragraph is striked.
func (ParagraphProperties) Style ¶
func (_geddd ParagraphProperties) Style() string
Style returns the style for a paragraph, or an empty string if it is unset.
func (ParagraphProperties) Underline ¶
func (_gdbc ParagraphProperties) Underline() _afb.ST_Underline
Underline returns the type of paragraph underline.
func (ParagraphProperties) UnderlineColor ¶
func (_cdbcb ParagraphProperties) UnderlineColor() string
UnderlineColor returns the hex color value of paragraph underline.
func (ParagraphProperties) VerticalAlignment ¶
func (_gabbf ParagraphProperties) VerticalAlignment() _dg.ST_VerticalAlignRun
VerticalAlign returns the value of paragraph vertical align.
func (ParagraphProperties) X ¶
func (_degcc ParagraphProperties) X() *_afb.CT_PPr
X returns the inner wrapped XML type.
type ParagraphSpacing ¶
type ParagraphSpacing struct {
// contains filtered or unexported fields
}
ParagraphSpacing controls the spacing for a paragraph and its lines.
func (ParagraphSpacing) SetAfter ¶
func (_cdggf ParagraphSpacing) SetAfter(after _gf.Distance)
SetAfter sets the spacing that comes after the paragraph.
func (ParagraphSpacing) SetAfterAuto ¶
func (_baggb ParagraphSpacing) SetAfterAuto(b bool)
SetAfterAuto controls if spacing after a paragraph is automatically determined.
func (ParagraphSpacing) SetBefore ¶
func (_cfff ParagraphSpacing) SetBefore(before _gf.Distance)
SetBefore sets the spacing that comes before the paragraph.
func (ParagraphSpacing) SetBeforeAuto ¶
func (_egbd ParagraphSpacing) SetBeforeAuto(b bool)
SetBeforeAuto controls if spacing before a paragraph is automatically determined.
func (ParagraphSpacing) SetLineSpacing ¶
func (_ddga ParagraphSpacing) SetLineSpacing(d _gf.Distance, rule _afb.ST_LineSpacingRule)
SetLineSpacing sets the spacing between lines in a paragraph.
type ParagraphStyleProperties ¶
type ParagraphStyleProperties struct {
// contains filtered or unexported fields
}
ParagraphStyleProperties is the styling information for a paragraph.
func (ParagraphStyleProperties) AddTabStop ¶
func (_baffb ParagraphStyleProperties) AddTabStop(position _gf.Distance, justificaton _afb.ST_TabJc, leader _afb.ST_TabTlc)
AddTabStop adds a tab stop to the paragraph.
func (ParagraphStyleProperties) NumId ¶
func (_cgggf ParagraphStyleProperties) NumId() int64
NumId return numbering numId that being use by style properties.
func (ParagraphStyleProperties) SetAlignment ¶
func (_fcdge ParagraphStyleProperties) SetAlignment(align _afb.ST_Jc)
SetAlignment controls the paragraph alignment
func (ParagraphStyleProperties) SetContextualSpacing ¶
func (_ddddg ParagraphStyleProperties) SetContextualSpacing(b bool)
SetContextualSpacing controls whether to Ignore Spacing Above and Below When Using Identical Styles
func (ParagraphStyleProperties) SetFirstLineIndent ¶
func (_ddbc ParagraphStyleProperties) SetFirstLineIndent(m _gf.Distance)
SetFirstLineIndent controls the first line indent of the paragraph.
func (ParagraphStyleProperties) SetHangingIndent ¶
func (_aedf ParagraphStyleProperties) SetHangingIndent(m _gf.Distance)
SetHangingIndent controls the hanging indent of the paragraph.
func (ParagraphStyleProperties) SetKeepNext ¶
func (_bcafe ParagraphStyleProperties) SetKeepNext(b bool)
SetKeepNext controls if the paragraph is kept with the next paragraph.
func (ParagraphStyleProperties) SetKeepOnOnePage ¶
func (_baaac ParagraphStyleProperties) SetKeepOnOnePage(b bool)
SetKeepOnOnePage controls if all lines in a paragraph are kept on the same page.
func (ParagraphStyleProperties) SetLeftIndent ¶
func (_bfdf ParagraphStyleProperties) SetLeftIndent(m _gf.Distance)
SetLeftIndent controls the left indent of the paragraph.
func (ParagraphStyleProperties) SetLineSpacing ¶
func (_cafb ParagraphStyleProperties) SetLineSpacing(m _gf.Distance, rule _afb.ST_LineSpacingRule)
SetLineSpacing controls the line spacing of the paragraph.
func (ParagraphStyleProperties) SetOutlineLevel ¶
func (_eadg ParagraphStyleProperties) SetOutlineLevel(lvl int)
SetOutlineLevel sets the outline level of this style.
func (ParagraphStyleProperties) SetSpacing ¶
func (_dbecf ParagraphStyleProperties) SetSpacing(before, after _gf.Distance)
SetSpacing sets the spacing that comes before and after the paragraph.
func (ParagraphStyleProperties) SetStartIndent ¶
func (_ccge ParagraphStyleProperties) SetStartIndent(m _gf.Distance)
SetStartIndent controls the start indent of the paragraph.
func (ParagraphStyleProperties) X ¶
func (_cfgbb ParagraphStyleProperties) X() *_afb.CT_PPrGeneral
X returns the inner wrapped XML type.
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row is a row within a table within a document.
func (Row) Properties ¶
func (_cfag Row) Properties() RowProperties
Properties returns the row properties.
type RowProperties ¶
type RowProperties struct {
// contains filtered or unexported fields
}
RowProperties are the properties for a row within a table
func (RowProperties) SetCantSplit ¶
func (_aeac RowProperties) SetCantSplit(val bool)
SetCantSplit set row properties for Can't Split value.
func (RowProperties) SetHeight ¶
func (_cdfbe RowProperties) SetHeight(ht _gf.Distance, rule _afb.ST_HeightRule)
SetHeight allows controlling the height of a row within a table.
func (RowProperties) SetTblHeader ¶
func (_ggdec RowProperties) SetTblHeader(val bool)
SetTblHeader set row properties for repeat table row on every new page value.
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run is a run of text within a paragraph that shares the same formatting.
func (Run) AddAnnotationReference ¶
func (_dacb Run) AddAnnotationReference()
AddAnnotationReference adds annotation reference to a run.
func (Run) AddCommentReference ¶
AddCommentReference adds comment reference to a run.
func (Run) AddDrawingAnchored ¶
func (_gfefc Run) AddDrawingAnchored(img _aff.ImageRef) (AnchoredDrawing, error)
AddDrawingAnchored adds an anchored (floating) drawing from an ImageRef.
func (Run) AddDrawingInline ¶
func (_ggbg Run) AddDrawingInline(img _aff.ImageRef) (InlineDrawing, error)
AddDrawingInline adds an inline drawing from an ImageRef.
func (Run) AddEndnoteReference ¶
func (_bfbd Run) AddEndnoteReference()
AddEndnoteReference adds a footnote reference to a run.
func (Run) AddFieldWithFormatting ¶
AddFieldWithFormatting adds a field (automatically computed text) to the document with field specifc formatting.
func (Run) AddFootnoteReference ¶
func (_fdgbe Run) AddFootnoteReference()
AddFootnoteReference adds a footnote reference to a run.
func (Run) AddTOC ¶
func (_fagg Run) AddTOC(options *TOCOptions)
AddTOC adds a table of contents to the document and customize it according to TOCOptions if necessary.
func (Run) AddTab ¶
func (_cbedbg Run) AddTab()
AddTab adds tab to a run and can be used with the the Paragraph's tab stops.
func (Run) ClearContent ¶
func (_bdbg Run) ClearContent()
ClearContent clears any content in the run (text, tabs, breaks, etc.)
func (Run) Control ¶
Control returns an *axcontrol.Control object contained in the run or the nil value in case of no controls.
func (Run) DrawingAnchored ¶
func (_ebdee Run) DrawingAnchored() []AnchoredDrawing
DrawingAnchored returns a slice of AnchoredDrawings.
func (Run) DrawingInline ¶
func (_edbd Run) DrawingInline() []InlineDrawing
DrawingInline return a slice of InlineDrawings.
func (Run) IsEndnote ¶
IsEndnote returns a bool based on whether the run has a footnote or not. Returns both a bool as to whether it has a footnote as well as the ID of the footnote.
func (Run) IsFootnote ¶
IsFootnote returns a bool based on whether the run has a footnote or not. Returns both a bool as to whether it has a footnote as well as the ID of the footnote.
func (Run) Properties ¶
func (_adgbe Run) Properties() RunProperties
Properties returns the run properties.
func (Run) SetProperties ¶
func (_aadba Run) SetProperties(rp RunProperties)
SetProperties sets the `RunProperties` to the `Run` element
type RunProperties ¶
type RunProperties struct {
// contains filtered or unexported fields
}
RunProperties controls run styling properties.
func (RunProperties) Bold ¶
func (_dfdcc RunProperties) Bold() bool
Bold returns true if run font is bold.
func (RunProperties) BoldValue ¶
func (_fefad RunProperties) BoldValue() OnOffValue
BoldValue returns the precise nature of the bold setting (unset, off or on).
func (RunProperties) Caps ¶
func (_addad RunProperties) Caps() bool
Caps returns true if run font is capitalized.
func (RunProperties) CharacterSpacingMeasure ¶
func (_baceg RunProperties) CharacterSpacingMeasure() string
CharacterSpacingMeasure returns paragraph characters spacing with its measure which can be mm, cm, in, pt, pc or pi.
func (RunProperties) CharacterSpacingValue ¶
func (_aeafd RunProperties) CharacterSpacingValue() int64
CharacterSpacingValue returns the value of run's characters spacing in twips (1/20 of point).
func (RunProperties) ClearColor ¶
func (_eafeb RunProperties) ClearColor()
ClearColor clears the text color.
func (RunProperties) Color ¶
func (_fefbf RunProperties) Color() Color
Color returns the style's Color.
func (RunProperties) ComplexSizeMeasure ¶
func (_gdeg RunProperties) ComplexSizeMeasure() string
ComplexSizeMeasure returns font with its measure which can be mm, cm, in, pt, pc or pi.
func (RunProperties) ComplexSizeValue ¶
func (_gaga RunProperties) ComplexSizeValue() float64
ComplexSizeValue returns the value of run font size for complex fonts in points.
func (RunProperties) DoubleStrike ¶
func (_facdg RunProperties) DoubleStrike() bool
DoubleStrike returns true if run is double striked.
func (RunProperties) EastAsiaFont ¶
func (_aegd RunProperties) EastAsiaFont() string
EastAsiaFont returns the name of run font family for East Asia.
func (RunProperties) Emboss ¶
func (_fegd RunProperties) Emboss() bool
Emboss returns true if run emboss is on.
func (RunProperties) Font ¶
func (_aegagc RunProperties) Font() string
Font returns the name of run font family.
func (RunProperties) Fonts ¶
func (_ceeec RunProperties) Fonts() Fonts
Fonts returns the style's Fonts.
func (RunProperties) GetColor ¶
func (_dfffg RunProperties) GetColor() _aa.Color
GetColor returns the color.Color object representing the run color.
func (RunProperties) GetEffect ¶
func (_dcagc RunProperties) GetEffect() _afb.ST_TextEffect
GetEffect returns the effect of the run.
func (RunProperties) GetHighlight ¶
func (_egbabg RunProperties) GetHighlight() _afb.ST_HighlightColor
GetHighlight returns the HighlightColor.
func (RunProperties) GetKerning ¶
func (_bgaed RunProperties) GetKerning() _gf.Distance
GetKerning returns the kerning (character spacing) of a run
func (RunProperties) GetRightToLeft ¶
func (_gebfd RunProperties) GetRightToLeft() bool
GetRightToLeft returns true if the run text is displayed from right to left.
func (RunProperties) Imprint ¶
func (_egae RunProperties) Imprint() bool
Imprint returns true if run imprint is on.
func (RunProperties) IsBold ¶
func (_feded RunProperties) IsBold() bool
IsBold returns true if the run has been set to bold.
func (RunProperties) IsItalic ¶
func (_ccbf RunProperties) IsItalic() bool
IsItalic returns true if the run has been set to italics.
func (RunProperties) Italic ¶
func (_fgged RunProperties) Italic() bool
Italic returns true if run font is italic.
func (RunProperties) ItalicValue ¶
func (_fbfg RunProperties) ItalicValue() OnOffValue
ItalicValue returns the precise nature of the italic setting (unset, off or on).
func (RunProperties) Outline ¶
func (_acafa RunProperties) Outline() bool
Outline returns true if run outline is on.
func (RunProperties) RStyle ¶
func (_aaccg RunProperties) RStyle() string
RStyle returns the name of character style. It is defined here http://officeopenxml.com/WPstyleCharStyles.php
func (RunProperties) RightToLeft ¶
func (_fbdge RunProperties) RightToLeft() bool
RightToLeft returns true if run text goes from right to left.
func (RunProperties) SetAllCaps ¶
func (_dbbg RunProperties) SetAllCaps(b bool)
SetAllCaps sets the run to all caps.
func (RunProperties) SetBold ¶
func (_cbfgg RunProperties) SetBold(b bool)
SetBold sets the run to bold.
func (RunProperties) SetCharacterSpacing ¶
func (_aabb RunProperties) SetCharacterSpacing(size _gf.Distance)
SetCharacterSpacing sets the run's Character Spacing Adjustment.
func (RunProperties) SetColor ¶
func (_dbbe RunProperties) SetColor(c _aa.Color)
SetColor sets the text color.
func (RunProperties) SetDoubleStrikeThrough ¶
func (_gedf RunProperties) SetDoubleStrikeThrough(b bool)
SetDoubleStrikeThrough sets the run to double strike-through.
func (RunProperties) SetEffect ¶
func (_bgeg RunProperties) SetEffect(e _afb.ST_TextEffect)
SetEffect sets a text effect on the run.
func (RunProperties) SetEmboss ¶
func (_bcgcd RunProperties) SetEmboss(b bool)
SetEmboss sets the run to embossed text.
func (RunProperties) SetFontFamily ¶
func (_cafbe RunProperties) SetFontFamily(family string)
SetFontFamily sets the Ascii & HAnsi fonly family for a run.
func (RunProperties) SetHighlight ¶
func (_acfbc RunProperties) SetHighlight(c _afb.ST_HighlightColor)
SetHighlight highlights text in a specified color.
func (RunProperties) SetImprint ¶
func (_bcgddb RunProperties) SetImprint(b bool)
SetImprint sets the run to imprinted text.
func (RunProperties) SetItalic ¶
func (_dcea RunProperties) SetItalic(b bool)
SetItalic sets the run to italic.
func (RunProperties) SetKerning ¶
func (_bedaa RunProperties) SetKerning(size _gf.Distance)
SetKerning sets the run's font kerning.
func (RunProperties) SetOutline ¶
func (_gacba RunProperties) SetOutline(b bool)
SetOutline sets the run to outlined text.
func (RunProperties) SetRightToLeft ¶
func (_ccgf RunProperties) SetRightToLeft(b bool)
SetRightToLeft sets the run text goes from right to left.
func (RunProperties) SetShadow ¶
func (_bggegd RunProperties) SetShadow(b bool)
SetShadow sets the run to shadowed text.
func (RunProperties) SetSize ¶
func (_bedcg RunProperties) SetSize(size _gf.Distance)
SetSize sets the font size for a run.
func (RunProperties) SetSmallCaps ¶
func (_eeafb RunProperties) SetSmallCaps(b bool)
SetSmallCaps sets the run to small caps.
func (RunProperties) SetStrikeThrough ¶
func (_bccbf RunProperties) SetStrikeThrough(b bool)
SetStrikeThrough sets the run to strike-through.
func (RunProperties) SetStyle ¶
func (_edgg RunProperties) SetStyle(style string)
SetStyle sets the font size.
func (RunProperties) SetUnderline ¶
func (_eaeg RunProperties) SetUnderline(style _afb.ST_Underline, c _aa.Color)
SetUnderline controls underline for a run style.
func (RunProperties) SetVerticalAlignment ¶
func (_dacc RunProperties) SetVerticalAlignment(v _dg.ST_VerticalAlignRun)
SetVerticalAlignment controls the vertical alignment of the run, this is used to control if text is superscript/subscript.
func (RunProperties) Shadow ¶
func (_aefd RunProperties) Shadow() bool
Shadow returns true if run shadow is on.
func (RunProperties) SizeMeasure ¶
func (_gabefc RunProperties) SizeMeasure() string
SizeMeasure returns font with its measure which can be mm, cm, in, pt, pc or pi.
func (RunProperties) SizeValue ¶
func (_cedef RunProperties) SizeValue() float64
SizeValue returns the value of run font size in points.
func (RunProperties) Strike ¶
func (_egafb RunProperties) Strike() bool
Strike returns true if run is striked.
func (RunProperties) Underline ¶
func (_ddea RunProperties) Underline() _afb.ST_Underline
Underline returns the type of run underline.
func (RunProperties) UnderlineColor ¶
func (_dgdg RunProperties) UnderlineColor() string
UnderlineColor returns the hex color value of run underline.
func (RunProperties) VerticalAlignment ¶
func (_ccfb RunProperties) VerticalAlignment() _dg.ST_VerticalAlignRun
VerticalAlign returns the value of run vertical align.
func (RunProperties) X ¶
func (_bceg RunProperties) X() *_afb.CT_RPr
X returns the inner wrapped XML type.
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section is the beginning of a new section.
func (Section) GetHeader ¶
GetHeader gets a section Header for given type t [ST_HdrFtrDefault, ST_HdrFtrEven, ST_HdrFtrFirst]
func (Section) SetPageMargins ¶
SetPageMargins sets the page margins for a section
func (Section) SetPageSizeAndOrientation ¶
func (_edbag Section) SetPageSizeAndOrientation(w, h _gf.Distance, orientation _afb.ST_PageOrientation)
SetPageSizeAndOrientation sets the page size and orientation for a section.
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
Settings controls the document settings.
func (Settings) RemoveMailMerge ¶
func (_ccag Settings) RemoveMailMerge()
RemoveMailMerge removes any mail merge settings
func (Settings) SetUpdateFieldsOnOpen ¶
SetUpdateFieldsOnOpen controls if fields are recalculated upon opening the document. This is useful for things like a table of contents as the library only adds the field code and relies on Word/LibreOffice to actually compute the content.
type StructuredDocumentTag ¶
type StructuredDocumentTag struct {
// contains filtered or unexported fields
}
StructuredDocumentTag are a tagged bit of content in a document.
func (StructuredDocumentTag) Alias ¶
func (_gdded StructuredDocumentTag) Alias() string
Alias returns the alias (friendly name) of the structured document tag or empty string if not set.
func (StructuredDocumentTag) Paragraphs ¶
func (_bcdff StructuredDocumentTag) Paragraphs() []Paragraph
Paragraphs returns the paragraphs within a structured document tag.
func (StructuredDocumentTag) Tag ¶
func (_fdbg StructuredDocumentTag) Tag() string
Tag returns the tag (programmatic identifier) of the structured document tag or empty string if not set.
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
Style is a style within the styles.xml file.
func (Style) ParagraphProperties ¶
func (_acdbg Style) ParagraphProperties() ParagraphStyleProperties
ParagraphProperties returns the paragraph style properties.
func (Style) RunProperties ¶
func (_efae Style) RunProperties() RunProperties
RunProperties returns the run style properties.
func (Style) SetBasedOn ¶
SetBasedOn sets the style that this style is based on.
func (Style) SetLinkedStyle ¶
SetLinkedStyle sets the style that this style is linked to.
func (Style) SetNextStyle ¶
SetNextStyle sets the style that the next paragraph will use.
func (Style) SetPrimaryStyle ¶
SetPrimaryStyle marks the style as a primary style.
func (Style) SetSemiHidden ¶
SetSemiHidden controls if the style is hidden in the UI.
func (Style) SetUISortOrder ¶
SetUISortOrder controls the order the style is displayed in the UI.
func (Style) SetUnhideWhenUsed ¶
SetUnhideWhenUsed controls if a semi hidden style becomes visible when used.
func (Style) TableConditionalFormatting ¶
func (_bcdba Style) TableConditionalFormatting(typ _afb.ST_TblStyleOverrideType) TableConditionalFormatting
TableConditionalFormatting returns a conditional formatting object of a given type. Calling this method repeatedly will return the same object.
func (Style) TableProperties ¶
func (_gbdcd Style) TableProperties() TableStyleProperties
TableProperties returns the table style properties.
type Styles ¶
type Styles struct {
// contains filtered or unexported fields
}
Styles is the document wide styles contained in styles.xml.
func (Styles) AddStyle ¶
AddStyle adds a new empty style, if styleID is already exists, it will return the style.
func (Styles) InitializeDefault ¶
func (_fefc Styles) InitializeDefault()
InitializeDefault constructs the default styles.
func (Styles) InsertStyle ¶
InsertStyle insert style to styles.
func (Styles) ParagraphStyles ¶
ParagraphStyles returns only the paragraph styles.
func (Styles) SearchStyleById ¶
SearchStylesById returns style by its id.
func (Styles) SearchStyleByName ¶
SearchStyleByName return style by its name.
type TOCOptions ¶
type TOCOptions struct {
// UseHyperlinks makes the table of contents entries hyperlinks.
UseHyperlinks bool
// OmitPageNumbers allows omitting page numbers from the table of contents.
OmitPageNumbers bool
// HeadingLevel uses paragraphs formatted with all of the specified range of built-in heading styles.
// "3-3" is to show only third heading level, for instance.
HeadingLevel string
}
TOCOptions specify options for table of contents customization.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is a table within a document.
func (Table) EnsureGridColumns ¶
func (_bbdg Table) EnsureGridColumns()
EnsureGridColumns ensures that the table has proper TblGrid elements populated. This fixes corruption issues when cells use SetColumnSpan (gridSpan in OOXML). Word requires properly defined TblGrid when any cell uses gridSpan, especially when combined with nested tables. Without this, documents show "Styles 1" errors.
func (Table) InsertRowAfter ¶
InsertRowAfter inserts a row after another row
func (Table) InsertRowBefore ¶
InsertRowBefore inserts a row before another row
func (Table) Properties ¶
func (_ecab Table) Properties() TableProperties
Properties returns the table properties.
type TableBorders ¶
type TableBorders struct {
// contains filtered or unexported fields
}
TableBorders allows manipulation of borders on a table.
func (TableBorders) SetBottom ¶
SetBottom sets the bottom border to a specified type, color and thickness.
func (TableBorders) SetInsideHorizontal ¶
func (_acca TableBorders) SetInsideHorizontal(t _afb.ST_Border, c _aa.Color, thickness _gf.Distance)
SetInsideHorizontal sets the interior horizontal borders to a specified type, color and thickness.
func (TableBorders) SetInsideVertical ¶
SetInsideVertical sets the interior vertical borders to a specified type, color and thickness.
func (TableBorders) SetLeft ¶
SetLeft sets the left border to a specified type, color and thickness.
func (TableBorders) SetRight ¶
SetRight sets the right border to a specified type, color and thickness.
func (TableBorders) X ¶
func (_aaeag TableBorders) X() *_afb.CT_TblBorders
X returns the inner wml.CT_TblBorders
type TableConditionalFormatting ¶
type TableConditionalFormatting struct {
// contains filtered or unexported fields
}
TableConditionalFormatting controls the conditional formatting within a table style.
func (TableConditionalFormatting) CellProperties ¶
func (_bfbdg TableConditionalFormatting) CellProperties() CellProperties
CellProperties returns the cell properties.
func (TableConditionalFormatting) ParagraphProperties ¶
func (_bebda TableConditionalFormatting) ParagraphProperties() ParagraphStyleProperties
ParagraphProperties returns the paragraph properties controlling text formatting within the table.
func (TableConditionalFormatting) RunProperties ¶
func (_deac TableConditionalFormatting) RunProperties() RunProperties
RunProperties returns the run properties controlling text formatting within the table.
func (TableConditionalFormatting) X ¶
func (_bgcf TableConditionalFormatting) X() *_afb.CT_TblStylePr
X returns the inner wrapped XML type.
type TableInfo ¶
type TableInfo struct {
Table *_afb.CT_Tbl
Row *_afb.CT_Row
Cell *_afb.CT_Tc
RowIndex int
ColIndex int
}
TableInfo is used for keep information about a table, a row and a cell where the text is located.
type TableLook ¶
type TableLook struct {
// contains filtered or unexported fields
}
TableLook is the conditional formatting associated with a table style that has been assigned to a table.
func (TableLook) SetFirstColumn ¶
SetFirstColumn controls the conditional formatting for the first column in a table.
func (TableLook) SetFirstRow ¶
SetFirstRow controls the conditional formatting for the first row in a table.
func (TableLook) SetHorizontalBanding ¶
SetHorizontalBanding controls the conditional formatting for horizontal banding.
func (TableLook) SetLastColumn ¶
SetLastColumn controls the conditional formatting for the last column in a table.
func (TableLook) SetLastRow ¶
SetLastRow controls the conditional formatting for the last row in a table. This is called the 'Total' row within Word.
func (TableLook) SetVerticalBanding ¶
SetVerticalBanding controls the conditional formatting for vertical banding.
func (TableLook) X ¶
func (_aaegf TableLook) X() *_afb.CT_TblLook
X returns the inner wrapped XML type.
type TableProperties ¶
type TableProperties struct {
// contains filtered or unexported fields
}
TableProperties are the properties for a table within a document
func (TableProperties) Borders ¶
func (_ddbe TableProperties) Borders() TableBorders
Borders allows manipulation of the table borders.
func (TableProperties) SetAlignment ¶
func (_adea TableProperties) SetAlignment(align _afb.ST_JcTable)
SetAlignment sets the alignment of a table within the page.
func (TableProperties) SetCellSpacing ¶
func (_fcdc TableProperties) SetCellSpacing(m _gf.Distance)
SetCellSpacing sets the cell spacing within a table.
func (TableProperties) SetCellSpacingAuto ¶
func (_eeeaf TableProperties) SetCellSpacingAuto()
SetCellSpacingAuto sets the cell spacing within a table to automatic.
func (TableProperties) SetCellSpacingPercent ¶
func (_gcfab TableProperties) SetCellSpacingPercent(pct float64)
SetCellSpacingPercent sets the cell spacing within a table to a percent width.
func (TableProperties) SetLayout ¶
func (_baadb TableProperties) SetLayout(l _afb.ST_TblLayoutType)
SetLayout controls the table layout. wml.ST_TblLayoutTypeAutofit corresponds to "Automatically resize to fit contents" being checked, while wml.ST_TblLayoutTypeFixed corresponds to it being unchecked.
func (TableProperties) SetStyle ¶
func (_ggbc TableProperties) SetStyle(name string)
SetStyle sets the table style name.
func (TableProperties) SetWidth ¶
func (_dfdaa TableProperties) SetWidth(d _gf.Distance)
SetWidth sets the table with to a specified width.
func (TableProperties) SetWidthAuto ¶
func (_edddg TableProperties) SetWidthAuto()
SetWidthAuto sets the the table width to automatic.
func (TableProperties) SetWidthPercent ¶
func (_aadbf TableProperties) SetWidthPercent(pct float64)
SetWidthPercent sets the table to a width percentage.
func (TableProperties) TableLook ¶
func (_bdeeg TableProperties) TableLook() TableLook
TableLook returns the table look, or conditional formatting applied to a table style.
func (TableProperties) X ¶
func (_ggad TableProperties) X() *_afb.CT_TblPr
X returns the inner wrapped XML type.
type TableStyleProperties ¶
type TableStyleProperties struct {
// contains filtered or unexported fields
}
TableStyleProperties are table properties as defined in a style.
func (TableStyleProperties) Borders ¶
func (_ecbce TableStyleProperties) Borders() TableBorders
Borders allows manipulation of the table borders.
func (TableStyleProperties) SetCellSpacingAuto ¶
func (_gcabe TableStyleProperties) SetCellSpacingAuto()
SetCellSpacingAuto sets the cell spacing within a table to automatic.
func (TableStyleProperties) SetCellSpacingPercent ¶
func (_gbae TableStyleProperties) SetCellSpacingPercent(pct float64)
SetCellSpacingPercent sets the cell spacing within a table to a percent width.
func (TableStyleProperties) SetColumnBandSize ¶
func (_edfd TableStyleProperties) SetColumnBandSize(cols int64)
SetColumnBandSize sets the number of Columns in the column band
func (TableStyleProperties) SetRowBandSize ¶
func (_gfggb TableStyleProperties) SetRowBandSize(rows int64)
SetRowBandSize sets the number of Rows in the row band
func (TableStyleProperties) SetTableIndent ¶
func (_gedga TableStyleProperties) SetTableIndent(ind _gf.Distance)
SetTableIndent sets the Table Indent from the Leading Margin
func (TableStyleProperties) X ¶
func (_adgfa TableStyleProperties) X() *_afb.CT_TblPrBase
X returns the inner wrapped XML type.
type TableWidth ¶
type TableWidth struct {
// contains filtered or unexported fields
}
TableWidth controls width values in table settings.
func NewTableWidth ¶
func NewTableWidth() TableWidth
NewTableWidth returns a newly intialized TableWidth
func (TableWidth) SetValue ¶
func (_fcce TableWidth) SetValue(m _gf.Distance)
SetValue sets the width value.
func (TableWidth) X ¶
func (_gcadb TableWidth) X() *_afb.CT_TblWidth
X returns the inner wrapped XML type.
type TextItem ¶
type TextItem struct {
Text string
DrawingInfo *DrawingInfo
Paragraph *_afb.CT_P
Hyperlink *_afb.CT_Hyperlink
Run *_afb.CT_R
TableInfo *TableInfo
}
TextItem is used for keeping text with references to a paragraph and run or a table, a row and a cell where it is located.
func ExtractFromFooter ¶
ExtractFromFooter returns text from the document footer as an array of TextItems.
func ExtractFromHeader ¶
ExtractFromHeader returns text from the document header as an array of TextItems.
type WatermarkPicture ¶
type WatermarkPicture struct {
// contains filtered or unexported fields
}
WatermarkPicture is watermark picture within document.
func NewWatermarkPicture ¶
func NewWatermarkPicture() WatermarkPicture
NewWatermarkPicture generates new WatermarkPicture.
func (*WatermarkPicture) GetShapeStyle ¶
func (_dfeg *WatermarkPicture) GetShapeStyle() _de.ShapeStyle
GetShapeStyle returns string style of the shape in watermark and format it to ShapeStyle.
func (*WatermarkPicture) Pict ¶
func (_efdce *WatermarkPicture) Pict() *_afb.CT_Picture
Pict returns the pict object.
func (*WatermarkPicture) SetPicture ¶
func (_aabgg *WatermarkPicture) SetPicture(imageRef _aff.ImageRef)
SetPicture sets the watermark picture.
func (*WatermarkPicture) SetPictureSize ¶
func (_gdag *WatermarkPicture) SetPictureSize(width, height int64)
SetPictureSize set watermark picture size with given width and height.
func (*WatermarkPicture) SetPictureWashout ¶
func (_dgeb *WatermarkPicture) SetPictureWashout(isWashout bool)
SetPictureWashout set washout to watermark picture.
func (*WatermarkPicture) SetShapeStyle ¶
func (_gdbce *WatermarkPicture) SetShapeStyle(shapeStyle _de.ShapeStyle)
SetShapeStyle sets style to the element v:shape in watermark.
type WatermarkText ¶
type WatermarkText struct {
// contains filtered or unexported fields
}
WatermarkText is watermark text within the document.
func NewWatermarkText ¶
func NewWatermarkText() WatermarkText
NewWatermarkText generates a new WatermarkText.
func (*WatermarkText) EnableDiagonalLayout ¶
func (_bgadc *WatermarkText) EnableDiagonalLayout(value bool)
SetDiagonalLayout enables or disables diagonal layout. By default, diagonal layout is disabled and we have horizontal layout.
func (*WatermarkText) GetStyle ¶
func (_badec *WatermarkText) GetStyle() _de.TextpathStyle
GetStyle returns string style of the text in watermark and format it to TextpathStyle.
func (*WatermarkText) GetText ¶
func (_afgfa *WatermarkText) GetText() string
GetText returns text in the watermark.
func (*WatermarkText) Pict ¶
func (_acgg *WatermarkText) Pict() *_afb.CT_Picture
Pict returns the pict object.
func (*WatermarkText) SetColor ¶
func (_afggb *WatermarkText) SetColor(value string)
SetColor sets color of watermark text.
func (*WatermarkText) SetFontFamily ¶
func (_befd *WatermarkText) SetFontFamily(value string)
SetFontFamily sets font family of watermark text.
func (*WatermarkText) SetFontSize ¶
func (_gbcfd *WatermarkText) SetFontSize(value int64)
SetFontSize sets font size of watermark text.
func (*WatermarkText) SetOpacity ¶
func (_egfbd *WatermarkText) SetOpacity(value float64)
SetOpacity sets opacity of watermark text in range 0.0 - 1.0, where is 1.0 is the default value.
func (*WatermarkText) SetStyle ¶
func (_faeeb *WatermarkText) SetStyle(style _de.TextpathStyle)
SetStyle sets style to the text in watermark.
func (*WatermarkText) SetText ¶
func (_aacga *WatermarkText) SetText(text string)
SetText sets the watermark text.
func (*WatermarkText) SetTextStyleBold ¶
func (_fafe *WatermarkText) SetTextStyleBold(value bool)
SetTextStyleBold sets text style of watermark to bold.
func (*WatermarkText) SetTextStyleItalic ¶
func (_egbda *WatermarkText) SetTextStyleItalic(value bool)
SetTextStyleItalic sets text style of watermark to italic.