We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Doc/docx to pdf- garbled

Hey, guys. I’m using mono+ Aspose.Words on ubuntu to convert doc/docx files to pdf files. The documents contain a lot of Chinese characters. The converted pdf files are garbled. I’ve tried codes below, but it didn’t work. Any ideas?

LoadOptions opt = new LoadOptions ();
opt.Encoding = Encoding.GetEncoding(“gb2312”);
Document doc = new Document ("/data/upfile/test.docx", opt);
doc.Save ("/data/upfile/test.pdf", SaveFormat.Pdf);

Hi Hector,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (PDF, XPS or SWF). Make sure you have all the Fonts installed on the machine you’re using to convert Word document to PDF format. I would suggest you please read the following articles:

If you still face problem after installing fonts, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.

Thank you so much, tahir.

There’s another problem. It stucked for a very long time and seemed to never end when executing Save (“D:\test.pdf”, SaveFormat.Pdf); I have no idea whether it had something to do with my document.
I’ve already upload this file. Pls check the attachment. Thanks.

Hi Hector,

Thanks for your inquiry.

Perhaps, you’re using an older version of Aspose.Words; as with Aspose.Words v13.2.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.2.0 and let us know how it goes on your side. I hope, this will help.

3 posts were split to a new topic: True Type Fonts Article