Hi there,
I am trying to optimize the file sizes of outputted PPT>HTML presentation files. I am hoping to do this by sending images out into separate files, which would then be called upon using standard tags in the HTML. My current HTML options provided to Presentation.Save() looks like this:
ResponsiveHtmlController controller = new();
HtmlOptions htmlOptions = new()
{
HtmlFormatter = HtmlFormatter.CreateCustomFormatter(controller),
JpegQuality = 100,
PicturesCompression = PicturesCompression.DocumentResolution,
SlideImageFormat =
SlideImageFormat.Svg(
new SVGOptions
{
ExternalFontsHandling = SvgExternalFontsHandling.Embed,
JpegQuality = 100,
PicturesCompression = PicturesCompression.DocumentResolution
}),
};
The resulting HTML looks pretty good, but images come out like this
<image width="480" height="529" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAAN ...
Basically, it’s outputting the images as a long inline string in the HTML. Is there any way to create standard image tags like:
<img href="./images/somefile.png" />
which then link to a separate image file, for all images in the auto-generated HTML?
I am sure it’s something I’m missing about SlideImageFormat or something. Any help would be appreciated.
Thanks much,
Liam