Quantcast
Channel: Java Programming Forum - Learn Java Programming - Apache POI
Viewing all articles
Browse latest Browse all 120

Set Image undertext with Apache-Poi

$
0
0
I have insert a image in a document .docx but i must set undertext.
Code to insert image:
Code:


                                    XWPFRun xwpfRun = p.createRun();
                                    String imgFile = valore.get(x)[0];
                                    int larg =100;
                                    int alt =100;
                                    int format = XWPFDocument.PICTURE_TYPE_PNG;
                                    try {
                                        xwpfRun.addPicture(new FileInputStream(imgFile), format, imgFile, Units.toEMU(larg), Units.toEMU(alt));
                                    } catch (Exception ex) {

                                    }

With this code i insert image without problem but this is with normal Layout and i dont know how to set undertext with code.

Sorry for my bad english and i hope somebody can help me :(sweat):

Viewing all articles
Browse latest Browse all 120

Latest Images

Trending Articles



Latest Images