Calls to OfficeMath.toString() affect the result of Shape.getImageData().getImageType()

Aspose.Words for Java is used in our application to extract text, images and math formulas. We have an issue where calls to OfficeMath.toString() affect the results of Shape.getImageData().getImageType().

The issue is demonstrated in a test case on a simple Word document with 2 objects: one office math formula and one drawing of type EMF.

In a DocumentVisitor instance, if the following calls are made in sequence, the returned image type is 6.

  1. OfficeMath.toString()
  2. Shape.getImageData().getImageType()

If the first call is not made, the returned image type is 2.

Attached are the Word document and the Java program for the test case.

Image.docx (27.1 KB)
AsposeImageTest.zip (884 Bytes)

@fzeng2012 Thank you for reporting this problem to us. For a sake of correction it has been logged as WORDSNET-23926. We will keep you updated and let you know once it is resolved or we have additional information for you.

The issues you have found earlier (filed as WORDSNET-23926) have been fixed in this Aspose.Words for Java 22.10 update also available on Maven.