Hello
I need to use docx4j in a web app inside a JBoss 6.1 EAP
Is it mandatory for me to set docx4j as a module on JBoss ?
If so is there a tutorial for it please
Thks !!
Érico
It is currently Sat Jan 11, 2025 9:37 pm
HashMap<String, Object> hp = new HashMap<>();
hp.put("a_picture", resultSet.getBytes("ALUMNUS_PICTURE"));
byte[] bytes2 = serializeObject(data.get("a_picture"));
P paragraph = addImageToParagraph(createInlineImage(wordMLPackage,
wordMLPackage.getMainDocumentPart(), bytes2, "filename", "alttext", 1, 2));
Drawing drw = (Drawing) XmlUtils.unwrap(drawingObjList.get(0));
if(drw != null)
{
List<Object> grp = ((Drawing) XmlUtils.unwrap(drw)).getAnchorOrInline();
if( grp != null)
{
Graphic grpdata = ((Inline) XmlUtils.unwrap(grp.get(0))).getGraphic();
byte[] imgBytes = BinaryPartAbstractImage.getImage(wProcessorPackage, grpdata);
RenderedImage renderImage = ImageIO.read(new ByteArrayInputStream(imgBytes));
ImageIO.write(renderImage, "jpg", new File("/Users/gwuser164/Desktop/Images/image.jpg"));
}
}
Total posts 10116 • Total topics 2845 • Total members 2076