当前位置: 首页 > news >正文

网站设计的设计方案百度一下打开网页

网站设计的设计方案,百度一下打开网页,宣传片拍摄脚本,网门网站下载地址毫无疑问GO的生态就是一坨大便。老子英文水平小学啊。 实现简单文本格式 文本字体颜色、大小、突出显示等。 创建要给docx文件容器【我估算的】 doc : document.New() defer doc.Close() doc.SaveToFile("simple.docx") 把容器保存为文件 设置标题 创建自然段…

毫无疑问GO的生态就是一坨大便。老子英文水平小学啊。

实现简单文本格式 文本字体颜色、大小、突出显示等。

创建要给docx文件容器【我估算的】

doc := document.New()
defer doc.Close()

doc.SaveToFile("simple.docx")  把容器保存为文件

设置标题

创建自然段Paragraph

run设置文本内容

para := doc.AddParagraph()
run := para.AddRun()
para.SetStyle("Title")
run.AddText("Simple Document Formatting")

效果图

设置缩进

para = doc.AddParagraph()
para.Properties().SetFirstLineIndent(0.5 * measurement.Inch)run = para.AddRun()
run.AddText("A run is a string of characters with the same formatting. ")

设置粗体、字体、大小、颜色

run = para.AddRun()
run.Properties().SetBold(true)
run.Properties().SetFontFamily("Courier")
run.Properties().SetSize(15)
run.Properties().SetColor(color.Red)
run.AddText("Multiple runs with different formatting can exist in the same paragraph. ")

换行

run.AddBreak()

run = para.AddRun()
run.AddText("Adding breaks to a run will insert line breaks after the run. ")
run.AddBreak()
run.AddBreak()

输入文本

run = createParaRun(doc, "Runs support styling options:")

大写

run = createParaRun(doc, "small caps")run.Properties().SetSmallCaps(true)

画线和画两条

	run = createParaRun(doc, "strike")run.Properties().SetStrikeThrough(true)run = createParaRun(doc, "double strike")run.Properties().SetDoubleStrikeThrough(true)

其他

run = createParaRun(doc, "outline")run.Properties().SetOutline(true)run = createParaRun(doc, "emboss")run.Properties().SetEmboss(true)run = createParaRun(doc, "shadow")run.Properties().SetShadow(true)run = createParaRun(doc, "imprint")run.Properties().SetImprint(true)run = createParaRun(doc, "highlighting")run.Properties().SetHighlight(wml.ST_HighlightColorYellow)run = createParaRun(doc, "underline")run.Properties().SetUnderline(wml.ST_UnderlineWavyDouble, color.Red)run = createParaRun(doc, "text effects")run.Properties().SetEffect(wml.ST_TextEffectAntsRed)//选择编号样式?
nd := doc.Numbering.Definitions()[0]for i := 1; i < 5; i++ {p := doc.AddParagraph()
//设置编号等级?p.SetNumberingLevel(i - 1)
//设置编号样式p.SetNumberingDefinition(nd)run := p.AddRun()run.AddText(fmt.Sprintf("Level %d", i))}

完整DEMO代码

// Copyright 2017 FoxyUtils ehf. All rights reserved.
package main
//导包
import ( "fmt""os""github.com/unidoc/unioffice/color""github.com/unidoc/unioffice/common/license""github.com/unidoc/unioffice/document""github.com/unidoc/unioffice/measurement""github.com/unidoc/unioffice/schema/soo/wml"
)
//资本家的密钥
func init() {// Make sure to load your metered License API key prior to using the library.// If you need a key, you can sign up and create a free one at https://cloud.unidoc.ioerr := license.SetMeteredKey(os.Getenv(`UNIDOC_LICENSE_API_KEY`))if err != nil {panic(err)}
}func main() {//创建docdoc := document.New()
//关闭docdefer doc.Close()para := doc.AddParagraph()run := para.AddRun()para.SetStyle("Title")run.AddText("Simple Document Formatting")para = doc.AddParagraph()para.SetStyle("Heading1")run = para.AddRun()run.AddText("Some Heading Text")para = doc.AddParagraph()para.SetStyle("Heading2")run = para.AddRun()run.AddText("Some Heading Text")para = doc.AddParagraph()para.SetStyle("Heading3")run = para.AddRun()run.AddText("Some Heading Text")para = doc.AddParagraph()para.Properties().SetFirstLineIndent(0.5 * measurement.Inch)run = para.AddRun()run.AddText("A run is a string of characters with the same formatting. ")run = para.AddRun()run.Properties().SetBold(true)run.Properties().SetFontFamily("Courier")run.Properties().SetSize(15)run.Properties().SetColor(color.Red)run.AddText("Multiple runs with different formatting can exist in the same paragraph. ")run = para.AddRun()run.AddText("Adding breaks to a run will insert line breaks after the run. ")run.AddBreak()run.AddBreak()run = createParaRun(doc, "Runs support styling options:")run = createParaRun(doc, "small caps")run.Properties().SetSmallCaps(true)run = createParaRun(doc, "strike")run.Properties().SetStrikeThrough(true)run = createParaRun(doc, "double strike")run.Properties().SetDoubleStrikeThrough(true)run = createParaRun(doc, "outline")run.Properties().SetOutline(true)run = createParaRun(doc, "emboss")run.Properties().SetEmboss(true)run = createParaRun(doc, "shadow")run.Properties().SetShadow(true)run = createParaRun(doc, "imprint")run.Properties().SetImprint(true)run = createParaRun(doc, "highlighting")run.Properties().SetHighlight(wml.ST_HighlightColorYellow)run = createParaRun(doc, "underline")run.Properties().SetUnderline(wml.ST_UnderlineWavyDouble, color.Red)run = createParaRun(doc, "text effects")run.Properties().SetEffect(wml.ST_TextEffectAntsRed)nd := doc.Numbering.Definitions()[0]for i := 1; i < 5; i++ {p := doc.AddParagraph()p.SetNumberingLevel(i - 1)p.SetNumberingDefinition(nd)run := p.AddRun()run.AddText(fmt.Sprintf("Level %d", i))}doc.SaveToFile("simple.docx")
}func createParaRun(doc *document.Document, s string) document.Run {para := doc.AddParagraph()run := para.AddRun()run.AddText(s)return run
}

http://www.rdtb.cn/news/19231.html

相关文章:

  • 做微网站用什么框架兰州网络推广技术
  • 优秀网页版式设计抖音排名优化
  • 中小企业网站建设济南兴田德润厉害吗北京新闻最新消息
  • 浙江省建设厅网站资质迁移百度云盘搜索引擎入口
  • 云南专业网站优化龙岗网站制作
  • 做银行设计有好的网站参考吗百度pc网页版登录入口
  • 什么叫国际互联网优化排名软件
  • 制作网站视频教程新闻软文广告
  • 电商入门谷歌seo优化公司
  • 自建网站做网上超市可行吗seo收录查询工具
  • 保定网站制作费用seocui cn
  • 惠州品牌网站建设价格关键词生成器
  • 站酷设计网站官网未上色文件重庆镇海seo整站优化价格
  • 东莞市网站建设手机如何建立网站
  • 什么网站可以接单做海报网页设计制作网站
  • 苏州网站建设制作知识营销成功案例介绍
  • 手机邮箱申请免费注册seo收索引擎优化
  • 网站做定制还是固定模板google移动服务应用优化
  • 网站建设税票属于那一类别网推平台
  • 比较好的推广平台快速优化系统
  • 网站单页站群百度极速版免费下载安装
  • 网站导航栏的设计与实现网站应该如何推广
  • wordpress网站微信支付seo标题优化步骤
  • 网站建设注册密码咋弄外贸推广引流
  • 高性能的网站建设指南百度推广代理商
  • 电脑怎么建网站详细步骤网络营销与管理专业是干什么的
  • 海南做网站长春网站快速优化排名
  • wordpress备份恢复青岛百度整站优化服务
  • 建设厅网站装修合同模板快速网站推广公司
  • php做网站csdn看啥网一个没有人工干预的网