unioffice icon indicating copy to clipboard operation
unioffice copied to clipboard

Document append problem

Open shenghui0779 opened this issue 2 years ago • 3 comments

Description

When I use doc0.Append(doc1), the output file open fail

Expected Behavior

Actual Behavior

image

Please include a reproducible code snippet or document attachment that demonstrates the issue.

shenghui0779 avatar Jun 08 '22 07:06 shenghui0779

Hi @shenghui0779, Can you share more detail regarding the code and the files? Is there any operation like adding more paragraphs or anything else before doc0.Append(doc1)?

sampila avatar Jun 08 '22 07:06 sampila

func main() {
	doc0, err := document.Open("0.docx")

	if err != nil {
		log.Fatal(err)
	}

	defer doc0.Close()

	doc1, err := document.Open("1.docx")

	if err != nil {
		log.Fatal(err)
	}

	defer doc1.Close()

	if err = doc0.Append(doc1); err != nil {
		log.Fatal(err)
	}

	doc0.SaveToFile("output.docx")
}

0.docx 1.docx

shenghui0779 avatar Jun 08 '22 07:06 shenghui0779

Thank you, we will check this issue.

sampila avatar Jun 08 '22 07:06 sampila

Hi @shenghui0779,

We released new UniOffice version https://github.com/unidoc/unioffice/releases/tag/v1.28.0 to solve this issue,

I closing this issue for now, let me know if you still having this after updating the UniOffice version.

Best regards, Alip

sampila avatar Oct 06 '23 16:10 sampila