I have a Blob object from javaDB and want to display it on a docx page.
he following code snippet was used to convert the blob object to byte array
- Code: Select all
HashMap<String, Object> hp = new HashMap<>();
- Code: Select all
hp.put("a_picture", resultSet.getBytes("ALUMNUS_PICTURE"));
- Code: Select all
byte[] bytes2 = serializeObject(data.get("a_picture"));
this code is to add image to paragraph.
- Code: Select all
P paragraph = addImageToParagraph(createInlineImage(wordMLPackage,
wordMLPackage.getMainDocumentPart(), bytes2, "filename", "alttext", 1, 2));
private org.docx4j.wml.P addImageToParagraph(Inline inLine) {
// Now add the anchor in ...