Free Support Forum -

Images in HTML are not rendering in documents

We have few images in sharepoint Picture document library. while genrating the report, we are converting the entire report to an HTML format as below giving this HTML as input to Aspose.words.

The images in this HTML are not rendering if we not enable the Ananymouns access at web application level.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

"COLOMBIA -- country-specific regulatory strategy" - Development Strategy


Last Modified on 15-AUG-2012 12:59 PM by Jinka, Ramakrishna


testhttp://amrcldw182:4533/Lists/GRSLGImageLibrary/Tofacitinib%20Citrate%20Chemical%20Structure%20of%20CP-690%20550-10.jpg" />Test is success

If you have find any solution then please let us know the solution.

Hi Ramakrishna,

Thanks for your inquiry and sorry for the delayed response. I am afraid, currently there is no way you can set network credentials using Aspose.Words. I have linked your request to appropriate feature (WORDSNET-927) in our issue tracking system. You will be notified as soon as this feature is supported. Sorry for the inconvenience.

Moreover, in the mean time, you may want to use the following code snippet as a temporary work around:

public class ImageLoadingWithCredentialsHandler : IResourceLoadingCallback


public ImageLoadingWithCredentialsHandler()


mWebClient = new WebClient();


public ResourceLoadingAction ResourceLoading(ResourceLoadingArgs args)


if (args.ResourceType == ResourceType.Image)


Uri uri = new Uri(args.Uri);

if (uri.Host == "")

mWebClient.Credentials = new NetworkCredential("User1", "akjdlsfkjs");


mWebClient.Credentials = new NetworkCredential("SomeOtherUserID", "wiurlnlvs");

// Download the bytes from the location referenced by the URI.

byte[] imageBytes = mWebClient.DownloadData(args.Uri);


return ResourceLoadingAction.UserProvided;




return ResourceLoadingAction.Default;



private WebClient mWebClient;


I hope, this will help.

Best Regards,

The issues you have found earlier (filed as WORDSNET-927) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.