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.setPageCount(1);
options.setPageIndex(0);
document.save(outFile, options);
} catch (Exception e) {
throw new ConversionException("Failed to convert from doc to jpg", e);
}
When the line “document.save(outFile, 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:
testFile.docx.zip (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.
Thanks!