Null pointer exception when saving DOCX with specific header configuration

There is a specific DOCX file that throws an exception in Words for Java when I open it and save as HTML.

The file has the following attributes:

  1. Header, footer and body
  2. “Different first page header” is enabled
  3. Shapes in header and footer

LoadOptions loadOptions = new LoadOptions();
Document doc = new Document(new File(“breaks.docx”), loadOptions);
HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.HTML);“output.html”, saveOptions);

Any insights?

Zip with file and stack trace attached. (33.2 KB)


Thanks for your inquiry. We have tested the scenario and noticed the reported exception. We have logged a ticket WORDSNET-15688 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.

Best Regards,


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