Why one Image but output two shape nodes?

my test word file, it only has one image and one paragraph that illustrates it.but why in the testcode

for (Shape shape : shapeNodes) {
        System.out.println("Shape Type: " + shape.getShapeType() + ", Has Image: " + shape.hasImage());
        System.out.println("Alt Text: " + shape.getAlternativeText());
}

it outputs two message :

Shape Type: 75, Has Image: true
Alt Text:
Shape Type: 75, Has Image: true
Alt Text:

its so confusing. And when there are two images with two captions attached with it. it only outputs three, why ?

@Madecho Could you please provide your document here for testing? We will investigate the issue and provide you more information.

test2.docx (187.9 KB)
@vyacheslav.deryushev

@Madecho It’s not clear what is the problem. Your document have 2 pictures and output is information about 2 shapes.

its so confusing @vyacheslav.deryushev
test2.docx (187.7 KB)
result.png (77.0 KB)

these are the file and code that I use as well as the result

@Madecho Please check the paths to your test files. I have checked all your files with the latest version 24.6 and everything works as expected. If there are 2 shapes in your file, the output will be 2 shapes, if 1, it will be 1. Also, you can try to create a simple application where the problem can be reproduced.

ok,thanks for your reply !

1 Like