Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreDocx2Type ¶
type CoreDocx2Type struct { }
CoreDocx2Type 第二代word处理模块 该模块将交给py完成处理操作,并将文件换回临时存储目录
func (*CoreDocx2Type) PutDoc ¶
func (t *CoreDocx2Type) PutDoc(templateSrc string, replaceData ReplaceDataType) (newFileSrc string, err error)
type CoreDocxType ¶
type CoreDocxType struct { ////文件结构 //DocFile *docx.ReplaceDocx ////编辑文档引用 //DocData *docx.Docx DocData *docx.Document }
CoreDocxType 数据结构
func (*CoreDocxType) LoadDocx ¶
func (t *CoreDocxType) LoadDocx(src string) (err error)
LoadDocx 读取文件
func (*CoreDocxType) QuickReplaceAll ¶
func (t *CoreDocxType) QuickReplaceAll(replaceData map[string]interface{}) (err error)
QuickReplaceAll 批量替换数据
func (*CoreDocxType) SaveDocx ¶
func (t *CoreDocxType) SaveDocx(src string) (err error)
SaveDocx 保存文件
type ReplaceDataImgType ¶
type ReplaceDataType ¶
type ReplaceDataType struct { //替换普通文本 ReplaceText map[string]string `json:"replaceText"` //替换图片 ReplaceImage map[string]ReplaceDataImgType `json:"replaceImage"` }
Click to show internal directories.
Click to hide internal directories.