Original image name retrieval

I have a class that implements ‘MergeImageFieldEventHandler’. How do I get access to the original image source path/url of the image. By the time the handler get notification of the event, the image has been renamed to ‘Aspose.Words.XXXX’. I want to get access to the original name of the image file name.

Thanks.

Hi

Thanks for your request. I suppose e.FieldValue contains name of your image. Could you please provide me your code and sample data source for testing?

Best regards.

public void htmlExportImageSaving(Object arg0, ExportImageSavingEventArgs arg1) throws Exception {
    String name = arg1.getCurrentShape().getImageData().getSourceFullName();
    // If image came from a url such as 'http://www.somewhere.com/images/image.gif, how do I get this url?
}

Steve

Sorry, the class implements ‘ExportImageSavingEventHandler

Hi

Thanks for your inquiry and additional information. Could you please attach your Word document here for testing? Actually, there are few ways to insert an image into a Word document. Images can be embedded (stored in the document)or linked (stored in external resources). If an image is linked then SourceFullName will return path to the linked resource.

I think the information described in this thread could be useful for you.
https://forum.aspose.com/t/91801

Best regards.