UTF-8 problems while converting Word to PDF in Aspose for Java

We use Aspose to read a Word document, merge some fields and save it in Docx and Pdf format.
It seems that when you use any out of the ordinary characters they are shown as unknown character (a small square sign) in PDF alternative. The DOCX does not experience this problem. So, it seems that converting from Word to PDF does not use UTF-8 encoding.

I use the the Aspose.Words Document.save(“filename.pdf”) method.
Is there any alternative coding to solve this encoding problem?

Thanks in advance.

Gerben Ernst

This message was posted using Page2Forum from How-to: Convert a Document to PDF - Aspose.Words for Java

Hello

Thanks for your request. Could you please attach your input and output documents here for testing? I will check the problem on my side and provide you more information.
Best regards,

It doesn’t really matter what document you use. Any character other than the regular English alfabet will give you this result. Attached one of the examples I used. In this case some chinese characters just for test purposes. I always use chinese characters when I am hunting an UTF8 problem :slight_smile: The application itself will fill out names in a document. Not chinese, but the names can contain characters like ü or ö or other non english characters.

Hello

Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed. This problem does not occur in .NET version of Aspose.Words. Currently we are working on synchronizing Java and .NET versions of Aspose.Words. Once we finish this work all functionality which is supported in, NET version will be supported in Java version. Also you should note, converting to PDF is in beta at the moment. I will notify you as soon as converting to PDF in Aspose.Words for Java is out of beta.
Best regards,

We are happy to inform you that the first auto-ported version of Aspose.Words for Java is ready. This version supports converting documents to PDF. You can get it from here.

Best regards,
Aspose.Words team

(140)