Insert Image in a textBox at run-time

Hello there,

I have a client requirement where I need to insert Image in a TextBox at run-time so that Image should resize depending on the size of TextBox.

Source, Output, Expected Output docs are attached for your reference.
In Source Document, I am replacing
with Image Merge Field at run-time.
But as you will see in the Output document, it is just displaying the part of Image that fits in the textbox.
Can you please guide how can I ensure the correct size formatting for the image?
Thank you!

Hi Nutan,

Thanks for your request. You can calculate shape size to fit the container. You can find a code example here:
https://forum.aspose.com/t/111719
Hope this helps.
Best regards.