We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Missing 'ImageSaving'-Property in HtmlSaveOptions

reference to your Release Notes for 9.2.0 Aspose Words I could not find
the property ‘ImageSaving’ in the class ‘HtmlSaveOptions’.

how should I have to change the code to get the same result.

private static Dictionary<string, MemoryStream> mImagesList = new Dictionary<string, MemoryStream>();

public static MemoryStream ConvertDocToZippedHtml(Document doc)

//Create memory stream where output zip file will be stored

MemoryStream zipStream = new MemoryStream();

//Create zip archive

ZipOutputStream zip = new ZipOutputStream(zipStream);

//Spacify HtmlExportImageSaving event handler

doc.SaveOptions.HtmlExportImageSaving += new ExportImageSavingEventHandler(HtmlExportImageSaving_ZipImage);

//Specify image folder aliase

doc.SaveOptions.HtmlExportImagesFolderAlias = “images/”;

//Save document to stream in HTML format

MemoryStream htmlStream = new MemoryStream();

doc.Save(htmlStream, SaveFormat.Html);

//Put HTML into the zip archive

ZipEntry htmlEntry = new ZipEntry(“index.html”);


zip.Write(htmlStream.GetBuffer(), 0, (int)htmlStream.Length);

//Loop through all images

foreach (KeyValuePair<string, MemoryStream> img in mImagesList)

ZipEntry imgEntry = new ZipEntry(string.Format(“images/{0}”, img.Key));


zip.Write(img.Value.GetBuffer(), 0, (int)img.Value.Length);


//Finish zip stream


return zipStream;


private static void HtmlExportImageSaving_ZipImage(object sender, ExportImageSavingEventArgs e)

MemoryStream imgStream = new MemoryStream();

e.ImageStream = imgStream;

e.KeepImageStreamOpen = true;

mImagesList.Add(e.ImageFileName, imgStream);



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

Thanks for your request. There were some breaking changes in Aspose.Words API. Please see Aspose.Words 9.2.0 release notes:


Now you should use HtmlSaveOptions:


Also the following video might be useful for you:


Best regards.