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:
7
pack.go
7
pack.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user