Word- Slides- Cells feature request on HTML save

In all major aspose components you can easy save a document to html.
In our case we do not want to store extra files (images) so we made a little program that converts the images to base64 and then directly insert this into the document.
In result you have one simple html-file including all images.

All modern browser can easy handle this.

It would be awesome if the save methods gets this feature directly!

like another mode or even better to set a property before save.

Hi Yves,

You can set HtmlSaveOptions.ExportImagesAsBase64 option to true while using Aspose.Words to convert Word to HTML and Aspose.Cells to convert Excel to HTML to export images as base64 in the output HTML. Aspose.Pdf also supports this option.

As far as Aspose.Slides is concerned, we will share more details about it soon.

Best Regards,

Hi Yves,

The feature is currently not supported in Aspose.Slides for .NET API. We have logged it as a new feature request for consideration by our product team as SLIDESNET-37023. Once there is some update available about this issue, we will inform you here.

Hello,
thank you for the feedback.

Tried it.
Set in Word and Excel components:

// saveformat is a variable string and set to “html”

var saveOptions = new HtmlSaveOptions((SaveFormat)Enum.Parse(typeof(SaveFormat), saveformat, true));
if (_suppressHeaderFooter)
saveOptions.ExportHeadersFootersMode = ExportHeadersFootersMode.None;
saveOptions.ExportImagesAsBase64 = true;
_document.Save(target, saveOptions);

The document saves but the images are still extra files.


Hi Yves,

Can you please share your input document to reproduce the issue?

Best Regards,

I attached 2 files. In both cases I suspect to get html code where the hat base64 encoded data. At the moment it store a PNG file on disk and set the path inside the html code.

Hi Yves,

We are investigating your documents and update you soon.

Best Regards,

Hi Yves,

Sorry, I was not able to reproduce this issue at my end. No image file is saved to disk after setting ExportImagesAsBase64 to true. Output is attached for your reference. Please confirm if you are using the latest versions and also share a simple console application to reproduce the issue if the problem persists.

Best Regards,

Hello,
found the problem.
SaveMode was htmlfixed for testing. There it do not work. With SaveMode html it works.

Is there a reason to not implement it with htmlfixed as well?

Hi Yves,

You can use HtmlFixedSaveOptions when saving to Html_Fixed format and set HtmlFixedSaveOptions.ExportEmbeddedImages option to export images as base64.

Best Regards,