Aspose words JAVA - MailMerge

Hi,


I am using mailmerge to generate a document with image field type. In that, i am generating a image and place it in the placeholder dynamically. But my image size is larger than the page size. So, generate document needs manual adjustment on the images in the document.

Kindly help me out to fit the image for the page size.

Looking for your feedback ASAP.

Thanks,

Hi Suresh,


Thanks for your inquiry. You can implement IFieldMergingCallback interface and manually insert image using the following overload of InsertImage method:

DocumentBuilder.InsertImage Method (String, Double, Double)

Please refer to the following article for details:
http://www.aspose.com/docs/display/wordsjava/How+to++Apply+Custom+Formatting+during+Mail+Merge

Best regards,