1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-25 05:20:46 +08:00

add AddInlineDrawingFrom

This commit is contained in:
源文雨
2023-02-20 22:48:04 +08:00
parent f07b5dd914
commit 292a298c57
27 changed files with 634 additions and 130 deletions

View File

@@ -2,6 +2,7 @@ package docxlib
import (
"archive/zip"
"bytes"
"encoding/xml"
"io"
"os"
@@ -27,9 +28,13 @@ func (f *Docx) pack(zipWriter *zip.Writer) (err error) {
return
}
}
files["word/_rels/document.xml.rels"] = marshaller{data: f.DocRelation}
files["word/_rels/document.xml.rels"] = marshaller{data: &f.DocRelation}
files["word/document.xml"] = marshaller{data: f.Document}
for _, m := range f.media {
files[m.String()] = bytes.NewReader(m.Data)
}
for path, r := range files {
w, err := zipWriter.Create(path)
if err != nil {