Free Support Forum - aspose.com

Save a word document as a HTML document *without the images*

Hello,

Are the any options to set to save a word document as a HTML document without the images? I know that we can iterate through all shapes and remove the ones that have an image inside. But it would better to have just an option (like SaveOptions.HtmlExportImages) to save developpement (and performance). Its possible to Aspose to add something like that?

Thank you!

Best regards,

André

Hi

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

Thanks for your inquiry. There is no such option. But you are right, you can just iterate through all shapes and remove images. Another option is using SaveOptions.HtmlExportImageSaving event. You can just specify stream, where the images will be saved. In this case, you your HTML you will still have tags for images, but the images will not be stored anywhere.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.saveoptions.htmlexportimagesaving.html

Hope this helps.

Best regards.

Hi Alexey,

Thank you for your response! But it's possible to Aspose to add that option? Can I, as a client, request such feature? Its seems like a frequently used *feature*. Would be great to not have to code something to make it work....

Thanks!

Regards,

André

Hi <?xml:namespace prefix = st1 ns = "urn:schemas:contacts" />André,

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

Thanks for your request. We will consider adding such option. You will be notified as soon as the issue is resolved.

Best regards.

Thank you! That will be great.

Regards,

André

The link is broken in one of the reply? may i have the working link.

Hi

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

Thanks for your request. There were few breaking changes in API. Now you should use callback instead of event. Please see the documentation:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.saving.iimagesavingcallback.html

Best regards,