Hi,
Please see the following code snippet and the attached document we are trying to use to insert an image (an image is attached too). When using version 15.12.0 and wrapType “TOP_BOTTOM”, the image does not insert. It works OK for “INLINE” wrap type.
When we use an older version, 14.8, the image inserts OK with both wrap types.
Document doc = new Document("/data/insertImage-Test.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
FileInputStream image = new FileInputStream( "/data/star.jpg");
builder.moveToBookmark("cover_image", true, false );
builder.insertImage( image, RelativeHorizontalPosition.DEFAULT, 0.0, RelativeVerticalPosition.PARAGRAPH, 0.0, ConvertUtil.*inchToPoint*(7.5), ConvertUtil.*inchToPoint*(10), WrapType.TOP_BOTTOM);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions( SaveFormat.DOCX );
saveOptions.setCompliance( OoxmlCompliance.ISO_29500_2008_TRANSITIONAL );
doc.save("/data/InsertImageTest-output.docx", saveOptions);
Also, please note, that the issue occurs when inserting an image inside of a shape. Works OK when inserting directly to the document body.
Please let me know if this issue can be fixed or if there is anything on our side that can be done to avoid the problem.
Thanks,
Natasa