Images issue on azure cloud while converting word doc. to html using aspose.words RRS feed

  • Question

  • User1941853149 posted

    Descrption :
    While converting word document to html file using aspose words, It extracts images from word document and store it in current folder and pass reference to html "src" tag , so that images can be displayed in converted html document.
    Problem : 
    When I uploaded the converted html file to Microsoft Azure cloud (i.e blob) It doesn't show the images,
    the reason is for images to be displayed in html file microsoft restrict to upload the embedded images to blob first and then pass the url of each images to "src" tag of html file.
    How Aspose words can resolve this issues ??

    I am using Asp.Net MVC 4 as a development framework.

    Tuesday, March 18, 2014 3:21 PM

All replies

  • User-376018714 posted


    you should check with Aspose as to what is their support in terms of Azure and how in a situation like yours code needs to be handled...

    Monday, March 31, 2014 2:57 AM
  • User-2034328377 posted


    You can avoid this by specifying that images are to be saved in Base64 format to HTML using HtmlSaveOptions.ExportImagesAsBase64 property. When this property is set to true image data is exported directly on the img elements and separate files are not created. Here is sample code:

    Document doc = new Document(MyDir + @"in.docx");
    HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.Html);
    opts.ExportImagesAsBase64 = true;
    opts.PrettyFormat = true;
    doc.Save(MyDir + @"15.9.0.html", opts);
    Monday, October 19, 2015 8:42 AM