I referred to this link - http://www.aspose.com/docs/display/wordsnet/How+to++Replace+or+Modify+Hyperlinks for validating hyperlinks that comes in anchor tag. I want to do the same for image src links too. Any suggestions? Thanks.
Hi,
After converting the attached word doc using aspose to html; I see there is a way to validate the anchor href tag - http://www.aspose.com/docs/display/wordsnet/How+to++Replace+or+Modify+Hyperlinks.
I want to do similar validation for src value too (in this case check if “img_src.001.jpeg” is valid).
Hi,
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html);
options.PrettyFormat = true;
options.ImageSavingCallback = new HandleImageSaving();
doc.Save(MyDir + @"15.9.0.html", options);
public class HandleImageSaving : IImageSavingCallback
{
void IImageSavingCallback.ImageSaving(ImageSavingArgs e)
{
if (e.ImageFileName.EndsWith(".jpeg"))
e.ImageFileName = e.ImageFileName.Replace("15.9.0.001.jpeg", "new.jpeg");
}
}