DOCX to JPEG conversion hangs using Java

Hi all,

We’ve recently come across an issue whereby the Aspose Words Java library hangs indefinitely when converting a .docx to a jpeg file. The library version is 14.10.0.

This is our code, it’s quite simple:
String inFile = “testFile.docx”;
String outFile = “convertedTestFile.jpg”;

    try {
      Document document = new Document(inFile);

      ImageSaveOptions options = new ImageSaveOptions(SaveFormat.JPEG);
      options.setPageIndex(0);, options);
    } catch (Exception e) {
      throw new ConversionException("Failed to convert from doc to jpg", e);

When the line “, options)” is executed it hangs indefinitely. It doesn’t throw an exception, it just hangs.
I’ve attached a file with which to reproduce the issue, as it doesn’t happen with all .docx files: (8.1 MB)

Not sure what’s different in this file that may cause the issue in the library to reproduce, it’s not a complex .docx file.

Any help is appreciated.



We have tested the scenario using the latest version of Aspose.Words for Java 20.3 and have not found the shared issue. So, please use Aspose.Words for Java 20.3. We have attached the output image with this post for you kind reference.
output.jpeg (205.4 KB)

Hi Tahir,

Thanks for your response. However our licence only allows us to use versions of the library that were released before 2015/02/04. Is there any way of having this issue fixed without having to upgrade the library?




Please note that we do not provide support for older released versions of Aspose.Words. Moreover, we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products.

We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.

Please get the 30 days temporary license and apply it to test you scenario.