當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Document.AddParagraph方法代碼示例

本文整理匯總了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, "")
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:26,代碼來源:docxml.go

示例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)
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:8,代碼來源:docxml.go

示例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")
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:10,代碼來源:docxml.go

示例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("絕密★啟用前")
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:16,代碼來源:docxml.go

示例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月月考卷")
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:20,代碼來源:docxml.go

示例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("試卷副標題")
}
開發者ID:mingqing,項目名稱:godocx,代碼行數:22,代碼來源:docxml.go


注:本文中的github.com/mingqing/godocx/word.Document.AddParagraph方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。