unioffice
unioffice copied to clipboard
docx to pdf
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.
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/
Hi @pingyuan7
Could you share the DOCX file and code with us?
Best regards, Alip
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.pdf }
Hi @pingyuan7,
Thank you for the code and files, we are looking into this and will inform you as soon as possible.
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.