frame1.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.PAGE.toString());
frame1.setTextAnchorPageNumberAttribute(1);
//add paragraph
OfficeTextElement office = doc.getContentRoot();
OdfTextParagraph para1 = (OdfTextParagraph) office.newTextPElement();
para1.setTextContent("insert an image here");
String imagePath2 = doc.newImage(mImageUri_ODFDOM);
OdfTextParagraph para2 = (OdfTextParagraph) office.newTextPElement();
para2.setTextContent("another");
String imagePath3 = doc.newImage(mImageUri_ODFDOM);
OdfDrawImage image3 = getImageByPath(doc, imagePath3).get(1);
OdfDrawFrame frame3 = (OdfDrawFrame) image3.getParentNode();
frame3.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.CHAR.toString());