Poi word2007 read the first picture in the document

The blogger is currently engaged in the import and export of reports and various customization related work. I haven't done it before, so I'm also groping and sharing it by the way.

Regarding the operation of word2007, XWPF in poi is used.

    The idea is: 1. Get the document object

                 2. Get all the pictures of the document, a collection. Here the blogger only gets the first picture

                 3. Obtain various attributes of the image. The most important thing is to get the data array.

                 4. Use the output stream to output the picture to the designated road.

    The following is the method packaged by the blogger. Of course, it is also written with reference to the code of many big cows. I am just a scumbag.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324814912&siteId=291194637