Exception when saving a file containing a drawing to PDF format

Hello,

We use appendDocument() and updatePageLayout() on an Aspose document containing a Drawing. When saving the document in Word format, then afterwards in PDF format, Aspose raises a NullPointerException.
We are using version 17.9.

Here is an example showing the error :

com.aspose.words.Document doc = new com.aspose.words.Document();
com.aspose.words.Document docFragment = new com.aspose.words.Document("Drawing.docx");
doc.appendDocument(docFragment, ImportFormatMode.USE_DESTINATION_STYLES);
doc.updatePageLayout();

doc.save("DrawingOutput.docx");
doc.save("DrawingOutput.pdf"); // <- java.lang.NullPointerException is raised

Drawing.zip (10.9 KB)

Could you please fix this issue ?

Thanks in advance !

Alexis

@atapie

Thanks for your inquiry. We have tested the scenario and noticed the reported exception. We have logged a ticket WORDSJAVA-1667 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.

@atapie,
The issues you have found earlier (filed as WORDSJAVA-1667) have been fixed in this Aspose.Words for .NET 17.12 update and this Aspose.Words for Java 17.12 update.
Please also check the following articles: