本文整理匯總了Golang中github.com/mingqing/godocx/word.Document.AddParagraph方法的典型用法代碼示例。如果您正苦於以下問題:Golang Document.AddParagraph方法的具體用法?Golang Document.AddParagraph怎麽用?Golang Document.AddParagraph使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/mingqing/godocx/word.Document
的用法示例。
在下文中一共展示了Document.AddParagraph方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Text7
func (d *DocXml) Text7(document *word.Document) {
paragh := document.AddParagraph()
ppr := paragh.AddProperties()
ppr.AddAlign("center")
rpr := ppr.AddRunProperties()
rpr.Bold(true)
font := rpr.AddFont()
font.AsciiTheme = "majorEastAsia"
font.EastAsiaTheme = "majorEastAsia"
font.HansiTheme = "majorEastAsia"
rpr.Fontsize("24")
rpr.ComplexScriptFontsize("24")
run := paragh.AddRunContent()
rpr2 := run.AddRunProperties()
rpr2.Bold(true)
rpr2.Fontsize("24")
rpr2.ComplexScriptFontsize("24")
font2 := rpr2.AddFont()
font2.AsciiTheme = "majorEastAsia"
font2.EastAsiaTheme = "majorEastAsia"
font2.HansiTheme = "majorEastAsia"
font2.Hint = "eastAsia"
run.Text("第I卷(選擇題)")
d.defaultText(document, "")
}
示例2: defaultText
func (d *DocXml) defaultText(document *word.Document, text string) {
paragh := document.AddParagraph()
run := paragh.AddRunContent()
rpr := run.AddRunProperties()
font := rpr.AddFont()
font.Hint = "eastAsia"
run.Text(text)
}
示例3: Text4
func (d *DocXml) Text4(document *word.Document) {
paragh := document.AddParagraph()
ppr := paragh.AddProperties()
ppr.AddAlign("center")
run := paragh.AddRunContent()
rpr2 := run.AddRunProperties()
font2 := rpr2.AddFont()
font2.Hint = "eastAsia"
run.Text("考試範圍:xxx;考試時間:100分鍾;命題人:xxx")
}
示例4: Text1
func (d *DocXml) Text1(document *word.Document) {
paragh := document.AddParagraph()
ppr := paragh.AddProperties()
rpr := ppr.AddRunProperties()
rpr.Bold(true)
font := rpr.AddFont()
font.EastAsia = "黑體"
run := paragh.AddRunContent()
rpr2 := run.AddRunProperties()
rpr2.Bold(true)
font2 := rpr2.AddFont()
font2.Ascii = "黑體"
font2.EastAsia = "黑體"
font2.Hint = "eastAsia"
run.Text("絕密★啟用前")
}
示例5: Text2
func (d *DocXml) Text2(document *word.Document) {
paragh := document.AddParagraph()
ppr := paragh.AddProperties()
ppr.AddAlign("center")
rpr := ppr.AddRunProperties()
rpr.Bold(true)
font := rpr.AddFont()
font.EastAsia = "黑體"
rpr.Fontsize("30")
rpr.ComplexScriptFontsize("30")
run := paragh.AddRunContent()
rpr2 := run.AddRunProperties()
rpr2.Bold(true)
rpr2.Fontsize("30")
rpr2.ComplexScriptFontsize("30")
font2 := rpr2.AddFont()
font2.EastAsia = "黑體"
font2.Hint = "eastAsia"
run.Text("2015-2016學年度???學校11月月考卷")
}
示例6: Text3
func (d *DocXml) Text3(document *word.Document) {
paragh := document.AddParagraph()
ppr := paragh.AddProperties()
ppr.AddAlign("center")
rpr := ppr.AddRunProperties()
rpr.Bold(true)
font := rpr.AddFont()
font.EastAsia = "黑體"
font.AsciiTheme = "minorHAnsi"
font.HansiTheme = "minorHAnsi"
rpr.Fontsize("36")
rpr.ComplexScriptFontsize("36")
run := paragh.AddRunContent()
rpr2 := run.AddRunProperties()
rpr2.Bold(true)
rpr2.Fontsize("36")
rpr2.ComplexScriptFontsize("36")
font2 := rpr2.AddFont()
font2.EastAsia = "黑體"
font2.Hint = "eastAsia"
run.Text("試卷副標題")
}