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

Free Support Forum - aspose.com

Processing document with embedded fonts throws NullPointerException using Java

Hi Evgeniy,


Thank you for additional information. I asked Konstantin to take a look at your request. He will answer you shortly.

Best regards,

Hello Evgeniy,

>Could you please discuss this with Java developer - maybe synchronizaton block of code need be extented or refactored?

Unfortunately we still haven’t found the source of NPE and we don’t have any ides how to fix it. But we will look more into it.


>Also I would like to notice that our Word document contains an embedded
font for which a system TTF file exists in the meantime. We try to have
them synchronized (the same font files) but potentially they can be
different. Which font do you place to the cache - from document or from system font folder?

AW uses two font caches: DocumentFontCache and ExternalFontCache. DocumentFontCache contains only fonts that are embedded to the document. Each Document instance have its own DocumentFontCache. At first AW tries to find the font in DocumentFontCache. If font is found in DocumentFontCache then ExternalFontCache is not accessed.

>Do you see some problems here?

This should not be a problem if you don’t access single Document instance from different threads simultaneously. Also there is a call to ExternalFontCache in your trace from previous AW version. This means that particular font is not found in DocumentFontCache and ExternalFontCache is accessed.

Hello Evgeniy,


It seems that reported issue is finally fixed by font cache refactoring with better multithreading support, which was ported to Java.

Could you please check if your issue has been fixed in latest version of Aspose.Words Java?
You can download it from the following page: http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

Best regards, Nail.

The issues you have found earlier (filed as WORDSJAVA-521) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.