Update Fields in DOCX containing Footnote & Convert to PDF using Java | java.lang.NullPointerException

Hi Team,

Some of the document that I am converting fail conversion with specific set of document structure combination. Attached is one document that produce that error.
Code used for conversion:
Document doc = new Document(docxFile.getAbsolutePath());
doc.updateFields();
doc.save(outFile, SaveFormat.PDF);

Aspose version used: Aspose Word Java 20.8.0

Note: Please use attached documet with no modification even in respect to space to reporduce the issue.
footnote-relatedpdf-conversion-error-sample.zip (70.1 KB)

@yogeshkhandar,

We have also managed to reproduce the java.lang.NullPointerException on our end using the 20.9 version of Aspose.Words for Java. The problem occurs when you call Document.updateFields method before saving DOCX to PDF. For the sake of correction, we have logged this problem in our issue tracking system with ID WORDSNET-21113. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

HI Hafeez,

Is there any workaround I can do currently to avoid this issue?

@yogeshkhandar,

I am afraid, there is no workaround available to fix the problem. However, we have good news for you i.e. WORDSNET-21113 has now been resolved. The fix of this issue will be included in the next 20.10 version of Aspose.Words for Java. We will inform you via this forum thread as soon as the 20.10 version containing the fix of this issue will be released at the start of next month (October).

Thats good to hear. Thanks :slight_smile:

The issues you have found earlier (filed as WORDSNET-21113) have been fixed in this Aspose.Words for .NET 20.10 update and this Aspose.Words for Java 20.10 update.