Read Shapes (Rectangle,Square,Circle,Arrow etc), Clip Arts from MS Word File using java
<p>I am able to get image from ms word table but unable to get shapes and clip-arts.</p>

<pre><code>public static void main(String[] args) throws Exception {
    // The path to the documents directory.
    try {
        String dataDir = "E://test//demo.docx";
        generatePicturesAsImages(dataDir);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

public static void generatePicturesAsImages(String sourcePath) {
    try {
        Document doc = new Document(sourcePath);
        ImageSaveOptions options = new ImageSaveOptions(SaveFormat.JPEG);
        options.setJpegQuality(100);
        options.setResolution(100);
        // options.setUseHighQualityRendering(true);
        List&lt;ShapeRenderer&gt; pictures = getAllPictures(doc);
        if (pictures != null) {
            for (int i = 0; i &lt; pictures.size(); i++) {
                ShapeRenderer picture = pictures.get(i);
                String imageFilePath = sourcePath + "_output_" + i + ".jpeg";
                picture.save(imageFilePath, options);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

private static List&lt;ShapeRenderer&gt; getAllPictures(final Document document) throws Exception {
    List&lt;ShapeRenderer&gt; images = null;
    @SuppressWarnings("unchecked")
    NodeCollection&lt;DrawingML&gt; nodeCollection = document.getChildNodes(NodeType.DRAWING_ML, Boolean.TRUE);
    if (nodeCollection.getCount() &gt; 0) {
        images = new ArrayList&lt;ShapeRenderer&gt;();
        for (DrawingML drawingML : nodeCollection) {
            images.add(drawingML.getShapeRenderer());
        }
    }
    return images;
}
</code></pre>

<p>Above program is getting images from table so what should i add more to get the shapes.. Please suggest me any help will be appreciate ! </p>