unioffice icon indicating copy to clipboard operation
unioffice copied to clipboard

docx to pdf

Open pingyuan7 opened this issue 3 years ago • 4 comments

Description

When converting docx to PDF, the format is simply wrong. Fonts, especially when there is Chinese, will not be converted at all.

Expected Behavior

Actual Behavior

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

pingyuan7 avatar Aug 01 '22 04:08 pingyuan7

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/

github-actions[bot] avatar Aug 01 '22 04:08 github-actions[bot]

Hi @pingyuan7 Could you share the DOCX file and code with us?

Best regards, Alip

sampila avatar Aug 01 '22 17:08 sampila

func main() {

doc, err := document.Open("test.docx")
if err != nil {
	log.Fatalf("error opening document: %s", err)
}
defer doc.Close()
c := convert.ConvertToPdf(doc)

err = c.WriteToFile("test.pdf")
if err != nil {
	log.Fatalf("error converting document: %s", err)
}

test.docx

test.pdf }

pingyuan7 avatar Aug 02 '22 03:08 pingyuan7

Hi @pingyuan7,

Thank you for the code and files, we are looking into this and will inform you as soon as possible.

sampila avatar Aug 04 '22 04:08 sampila

We released new version with improvements of font name lookup, you can try to use new UniOffice version v1.21.0

Let us know if you still have issue regarding this.

sampila avatar Sep 02 '22 16:09 sampila