Hi,
On the page 4 in the attached document, there’s a shape with the text “teach”. When I access the shape chars using Aspose.Diagram for Java, an IndexOutOfBoundsException is being thrown.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at com.aspose.diagram.CharCollection.get(Unknown Source)
Here’s the code I’m using:
String path = "er-psqa.vsdx";
InputStream inputStream = new FileInputStream(path);
Diagram diagram = new Diagram(inputStream);
inputStream.close();
ShapeCollection shapes = diagram.getPages().get(4).getShapes();
Shape shape = shapes.get(3);
System.out.println(shape.getType() == TypeValue.GROUP); // this prints "true"
Shape subShape = shape.getShapes().get(3);
System.out.println(subShape.getText().getValue().getText()); // this prints "<cp IX="0"/><pp IX="0"/><tp IX="0"/>teach"
subShape.getChars().get(0);
Can you check this?
Thanks,
Zeljko
er-psqa.vsdx.zip (113.4 KB)