Free Support Forum - aspose.com

Symbol Character is broken

Hello,


When converting docx file to image, some symbol character is broken.
Please find attachments (.docx sample file and screenshot image).
How to solve this issue?

Aspose.Total for Java 17.3
JDK 1.6

Thanks,
Antonio Choi

Hi Antonio,


Thanks for your inquiry. After an initial test with Aspose.Words for Java 17.4, we were unable to reproduce this issue on our end over Windows 10 and Java 8 platform. Please see attached awjava-17.4.jpg. Please make sure that the following font files are installed on your machine:

  • 맑은 고딕
  • Wingdings

In case the problem still remains, please tell us the details of the development environment (e.g. OS, JDK versions) of the machine you’re getting this problem on during rendering Word to Image format. We will then investigate the issue further on our end and provide you more information.

Best regards,

Hello Awais,


Thanks for your help.
However, we still have this issue.

OS : Red Hat Enterprise Linux Server release 6.3 (Santiago)
OS : Red Hat Enterprise Linux Server release 6.5 (Santiago)
Java version : 1.7.0_45

Could you please double-check this issue?

Best Regards,
Antonio Choi

Hi Antonio,


Thanks for the additional information. While using the latest version of Aspose.Words i.e. 17.4, we managed to reproduce this issue on our end over Linux environment. However, those broken characters are looking different than how they are shown in your screenshot. Please see attached PDF. We have logged this issue in our bug tracking system. The ID of this issue is WORDSJAVA-1525. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,
Hi Antonio,

Thanks for being patient. Regarding WORDSJAVA-1525, our product team has completed the work on your issue. This looks not to be a problem in Aspose.Words and we will most likely close this issue as 'Not a Bug'. Please see the following details:

There will be no problems if you use/copy the following Windows fonts on your Linux environment:

  • malgun.ttf
  • wingding.ttf

Here is how you can reference these fonts:

LoadOptions opt = new LoadOptions();
FontSettings fontSettings = new FontSettings();

// Add Windows' fonts folder. It contains malgun.ttf and wingding.ttf

addFontFolder(fontSettings, "subst_fonts");

opt.setFontSettings(fontSettings);
com.aspose.words.Document doc = new Document("input.docx", opt);

doc.save("17.5.pdf");

private static void addFontFolder(FontSettings fontSettings, String folder)
{
FontSourceBase[] fontSourceBases = fontSettings.getFontsSources();
FontSourceBase[] newFontSourceBases = new FontSourceBase[fontSourceBases.length + 1];
System.arraycopy(fontSourceBases, 0, newFontSourceBases, 0, fontSourceBases.length);
newFontSourceBases[newFontSourceBases.length - 1] = new FolderFontSource(folder, true);
fontSettings.setFontsSources(newFontSourceBases);
}

Hope, this helps.

Best regards,

@hwchoi,

The issues you have found earlier (filed as WORDSJAVA-1525) have been fixed in this Aspose.Words for .NET 17.7 update and this Aspose.Words for Java 17.7 update.