I need to generate an image and put it to a specific position at Word document.
I'm using the following code (borrowed from ImageAdd example and the following conversation - docx-java-f6/how-to-create-a-floating-image-t1224.html):
public static Drawing newImageDraw( WordprocessingMLPackage wordMLPackage,
org.docx4j.wml.ObjectFactory factory,
byte[] bytes,
String filenameHint, String altText,
int id1, int id2, long cx, long cy) throws Exception {
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
Object anchorXml = XmlUtils.unmarshalString(generateXmlAnchor(4124325, 2847340));
Anchor anchor ...