Documentation ¶
Index ¶
- Constants
- type Body
- type Bold
- type Cell
- type CellProperties
- type CellVerticalAlignment
- type Color
- type DocRelation
- type Document
- type File
- type Font
- type Hyperlink
- type Indentation
- type Justification
- type KeepLines
- type LineBreak
- type PageBreakBefore
- type PageMargin
- type Paragraph
- type ParagraphProperties
- type RelationShip
- type Row
- type RowProperties
- type Run
- type RunProperties
- type RunStyle
- type SectionProperties
- type Size
- type Spacing
- type Table
- type TableBorders
- type TableBordersAttributes
- type TableBordersBottom
- type TableBordersEnd
- type TableBordersInsideH
- type TableBordersInsideV
- type TableBordersStart
- type TableBordersTop
- type TableCellMargin
- type TableCellMarginAttributes
- type TableCellMarginBottom
- type TableCellMarginEnd
- type TableCellMarginStart
- type TableCellMarginTop
- type TableGrid
- type TableLayout
- type TableProperties
- type TableWidth
- type Text
Constants ¶
const ( XMLNS_W = `http://schemas.openxmlformats.org/wordprocessingml/2006/main` XMLNS_R = `http://schemas.openxmlformats.org/officeDocument/2006/relationships` )
const ( JUSTIFY_START = "start" JUSTIFY_END = "end" JUSTIFY_BOTH = "both" JUSTIFY_CENTER = "center" JUSTIFY_DISTRIBUTE = "distribute" CM = 567 INCH = 1440 )
const ( XMLNS = `http://schemas.openxmlformats.org/package/2006/relationships` REL_HYPERLINK = `http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink` REL_TARGETMODE = "External" )
const ( BLACK = "000000" TABLE_BORDER_VAL_SINGLE = "single" // a single line TABLE_BORDER_VAL_DASHDOTSTROKED = "dashDotStroked" // a line with a series of alternating thin and thick strokes TABLE_BORDER_VAL_DASHED = "dashed" // a dashed line TABLE_BORDER_VAL_DASHSMALLGAP = "dashSmallGap" // a dashed line with small gaps TABLE_BORDER_VAL_DOTDASH = "dotDash" // a line with alternating dots and dashes TABLE_BORDER_VAL_DOTDOTDASH = "dotDotDash" // a line with a repeating dot - dot - dash sequence TABLE_BORDER_VAL_DOTTED = "dotted" // a dotted line TABLE_BORDER_VAL_DOUBLE = "double" // a double line TABLE_BORDER_VAL_DOUBLEWAVE = "doubleWave" // a double wavy line TABLE_BORDER_VAL_INSET = "inset" // an inset set of lines TABLE_BORDER_VAL_NIL = "nil" // no border TABLE_BORDER_VAL_NONE = "none" // no border TABLE_BORDER_VAL_OUTSET = "outset" // an outset set of lines TABLE_BORDER_VAL_THICK = "thick" // a single line TABLE_BORDER_VAL_THICKTHINLARGEGAP = "thickThinLargeGap" // a thick line contained within a thin line with a large-sized intermediate gap TABLE_BORDER_VAL_THICKTHINMEDIUMGAP = "thickThinMediumGap" // a thick line contained within a thin line with a medium-sized intermediate gap TABLE_BORDER_VAL_THICKTHINSMALLGAP = "thickThinSmallGap" // a thick line contained within a thin line with a small-sized intermediate gap TABLE_BORDER_VAL_THINTHICKLARGEGAP = "thinThickLargeGap" // a thin line contained within a thick line with a large-sized intermediate gap TABLE_BORDER_VAL_THINTHICKMEDIUMGAP = "thinThickMediumGap" // a thin line contained within a thick line with a medium-sized intermediate gap TABLE_BORDER_VAL_THINTHICKSMALLGAP = "thinThickSmallGap" // a thin line contained within a thick line with a small-sized intermediate gap TABLE_BORDER_VAL_THINTHICKTHINLARGEGAP = "thinThickThinLargeGap" // a thin-thick-thin line with a large gap TABLE_BORDER_VAL_THINTHICKTHINMEDIUMGAP = "thinThickThinMediumGap" // a thin-thick-thin line with a medium gap TABLE_BORDER_VAL_THINTHICKTHINSMALLGAP = "thinThickThinSmallGap" // a thin-thick-thin line with a small gap TABLE_BORDER_VAL_THREEDEEMBOSS = "threeDEmboss" // a three-staged gradient line, getting darker towards the paragraph TABLE_BORDER_VAL_THREEDEENGRAVE = "threeDEngrave" // a three-staged gradient like, getting darker away from the paragraph TABLE_BORDER_VAL_TRIPLE = "triple" // a triple line TABLE_BORDER_VAL_WAVE = "wave" // a wavy line TABLE_LAYOUT_TYPE_FIXED = "fixed" // fixed cell width TABLE_LAYOUT_TYPE_AUTO = "auto" // auto cell width CELL_VERTICAL_ALIGN_TOP = "top" // align content to the top of cell vertically CELL_VERTICAL_ALIGN_BOTTOM = "bottom" // align content to the bottom of cell vertically CELL_VERTICAL_ALIGN_CENTER = "center" // align content to the center of cell vertically )
const ( TEMP_REL = `` /* 601-byte string literal not displayed */ TEMP_DOCPROPS_APP = `` /* 276-byte string literal not displayed */ TEMP_DOCPROPS_CORE = `` /* 363-byte string literal not displayed */ TEMP_CONTENT = `` /* 934-byte string literal not displayed */ TEMP_WORD_STYLE = `` /* 1743-byte string literal not displayed */ TEMP_WORD_THEME_THEME = `` /* 9765-byte string literal not displayed */ )
const (
HYPERLINK_STYLE = "a1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct { XMLName xml.Name `xml:"w:tc"` Data []interface{} Properties *CellProperties Paragraph *Paragraph // contains filtered or unexported fields }
type CellProperties ¶
func (*CellProperties) VerticalAlignment ¶
func (cp *CellProperties) VerticalAlignment(align string)
CELL_VERTICAL_ALIGN_TOP align content to the top of cell vertically CELL_VERTICAL_ALIGN_CENTER align content to the bottom of cell vertically CELL_VERTICAL_ALIGN_BOTTM align content to the center of cell vertically
type CellVerticalAlignment ¶
type DocRelation ¶
type DocRelation struct { XMLName xml.Name `xml:"Relationships"` Xmlns string `xml:"xmlns,attr"` Relationship []*RelationShip `xml:"Relationship"` }
type File ¶
type File struct { Document Document DocRelation DocRelation // contains filtered or unexported fields }
type Indentation ¶
type Justification ¶
type PageBreakBefore ¶
type PageMargin ¶
type Paragraph ¶
type Paragraph struct { XMLName xml.Name `xml:"w:p"` Data []interface{} Properties *ParagraphProperties // contains filtered or unexported fields }
func (*Paragraph) AddNewLine ¶
func (p *Paragraph) AddNewLine()
AddNewLine adds break with type textWrapping, newline after previous
func (*Paragraph) AddNewPage ¶
func (p *Paragraph) AddNewPage()
AddNewPage adds break with type page, new page after previous
type ParagraphProperties ¶
func (*ParagraphProperties) Indentation ¶
func (prp *ParagraphProperties) Indentation(left, right int)
Indentation takes left and right indentation for paragraph in twips There is constant CM which is equal to 567 twips per centimeter There is constant INCH which is equal to 1440 twips per inch
func (*ParagraphProperties) Justification ¶
func (prp *ParagraphProperties) Justification(justificaiton string)
Justification takes justificaiton type Possible values are in constants: JUSTIFY_START align to the left JUSTIFY_END align to the right JUSTIFY_BOTH align to both sides with regular spaces JUSTIFY_DISTRIBUTE align to both sides with wider spaces JUSTIFY_CENTER align to the center of line
func (*ParagraphProperties) KeepLines ¶
func (prp *ParagraphProperties) KeepLines()
KeepLines prevents pagebreak within a paragraph
func (*ParagraphProperties) PageBreakBefore ¶
func (prp *ParagraphProperties) PageBreakBefore(val string)
Define Pagebreak before paragraph
func (*ParagraphProperties) Spacing ¶
func (prp *ParagraphProperties) Spacing(before, after int)
Spacing sets the space before and after paragraph
type RelationShip ¶
type Row ¶
type RowProperties ¶
type Run ¶
type Run struct { XMLName xml.Name `xml:"w:r"` RunProperties *RunProperties `xml:"w:rPr,omitempty"` InstrText string `xml:"w:instrText,omitempty"` Text *Text }
type RunProperties ¶
type SectionProperties ¶
type SectionProperties struct { XMLName xml.Name `xml:"w:sectPr"` PageMargin *PageMargin }
type Table ¶
type Table struct { XMLName xml.Name `xml:"w:tbl"` Data []interface{} Properties *TableProperties // contains filtered or unexported fields }
type TableBorders ¶
type TableBorders struct { XMLName xml.Name `xml:"w:tblBorders"` Top *TableBordersTop Bottom *TableBordersBottom Start *TableBordersStart End *TableBordersEnd InsideV *TableBordersInsideV InsideH *TableBordersInsideH }
type TableBordersAttributes ¶
type TableBordersBottom ¶
type TableBordersBottom struct { XMLName xml.Name `xml:"w:bottom"` TableBordersAttributes }
TableBordersBottom specifies the border displayed at the bottom of a table.
type TableBordersEnd ¶
type TableBordersEnd struct { XMLName xml.Name `xml:"w:end"` TableBordersAttributes }
TableBordersEnd specifies the border displayed on the right for left-to-right tables and left for right-to-left tables
type TableBordersInsideH ¶
type TableBordersInsideH struct { XMLName xml.Name `xml:"w:insideH"` TableBordersAttributes }
TableBordersInsideH specifies the border displayed on all inside horizontal table cell borders.
type TableBordersInsideV ¶
type TableBordersInsideV struct { XMLName xml.Name `xml:"w:insideV"` TableBordersAttributes }
TableBordersInsideV specifies the border displayed on all inside vertical table cell borders.
type TableBordersStart ¶
type TableBordersStart struct { XMLName xml.Name `xml:"w:start"` TableBordersAttributes }
TableBordersStart specifies the border displayed to the left for left-to-right tables and right for right-to-left tables.
type TableBordersTop ¶
type TableBordersTop struct { XMLName xml.Name `xml:"w:top"` TableBordersAttributes }
TableBordersTop specifies the border displayed at the top of a table.
type TableCellMargin ¶
type TableCellMargin struct { XMLName xml.Name `xml:"w:tblCellMar"` Top *TableCellMarginTop Bottom *TableCellMarginBottom Start *TableCellMarginStart End *TableCellMarginEnd }
type TableCellMarginBottom ¶
type TableCellMarginBottom struct { XMLName xml.Name `xml:"w:bottom"` TableCellMarginAttributes }
type TableCellMarginEnd ¶
type TableCellMarginEnd struct { XMLName xml.Name `xml:"w:end"` TableCellMarginAttributes }
type TableCellMarginStart ¶
type TableCellMarginStart struct { XMLName xml.Name `xml:"w:start"` TableCellMarginAttributes }
type TableCellMarginTop ¶
type TableCellMarginTop struct { XMLName xml.Name `xml:"w:top"` TableCellMarginAttributes }
type TableLayout ¶
type TableProperties ¶
type TableProperties struct { XMLName xml.Name `xml:"w:tblPr"` Width *TableWidth Borders *TableBorders Layout *TableLayout CellMargin *TableCellMargin }