Urgent! Shape.ImageData.SetImage and Shape.ImageData.ImageBytes not working

HI

I am using below code to set image for an existing shape(textbox) in word document. However image is not rendering in generated pdf. Image size is small.Please help if I am missing anything. Though I am able to see bytes in oshape.Imagedata.Imagebytes, but still image is not rendering.

Node oNode = GetNode(doc.GetChildNodes(NodeType.Shape, true), "Charts");

Shape oshape = (Shape)oNode;

if (oshape.CanHaveImage)

oshape.ImageData.SetImage(attach.SavedFilename);

We use Doc.Save("c:\working\abc.pdf",Aspose.Words.SaveFormat.Pdf). One surprising behaviour that I observed is - If I call Shape.GetShaperenderer() method after calling either Shape.ImageData.Images or Shape.ImageData.SetImage(), then image gets rendered in the PDF. However, Image is too small and textbox doesn't get resized with the size of image.

Hi Hetal,


Thanks for your inquiry. To ensure a timely and accurate response, it would be great if you please create a standalone/runnable simple application (for example a Console Application Project) that helps me reproduce your problem on my end and attach it here for testing. As soon as you get this simple application ready for me, I’ll start investigation into your issue and provide you more information. Also, please attach related resources e.g. Word/Pdf documents and image you’re trying to set. Thanks for your cooperation.

Best regards,