Hello,
Thank you for your inquiry.
I have received your inquiry and have tested the Word document you provided. After thorough investigation, I have identified the issue you mentioned. It appears that the absence of the required font is causing this problem, despite the fact that the Word document is set to embed the font into the document. Upon closer examination, it seems that the Chinese characters are not being properly embedded.
To address this issue, I have used the following code to test and resolve the problem. Additionally, I have attached the test results file from my Linux environment to this email for your reference.
- Code: Select all
//The Fonts folder contains two font files, calibri.ttf and Deng.ttf.
Document.setGlobalCustomFontsFolders("Fonts");
Document document = new Document();
document.loadFromFile("Test.docx");
document.saveToFile("Test.generated-nofonts.pdf", FileFormat.PDF);
Please note that this code has been tested and verified to resolve the embedding issue for the Chinese characters in your Word document.
Sincerely,
Annika
E-iceblue support team
Login to view the files attached to this post.