Fonts Are Not Loading Properly in PPTX to HTML Conversion in C#

I have used below code to convert ppt to html but still fonts are not loading properly

using (Presentation pres = new Presentation("input.pptx"))
{
    // Excludes default presentation fonts
    string[] fontNameExcludeList = { "Calibri", "Arial" };

    EmbedAllFontsHtmlController embedFontsController = new EmbedAllFontsHtmlController(fontNameExcludeList);

    HtmlOptions htmlOptionsEmbed = new HtmlOptions
    {
        HtmlFormatter = HtmlFormatter.CreateCustomFormatter(embedFontsController)
    };

    pres.Save("input-PFDinDisplayPro-Regular-installed.html", SaveFormat.Html, htmlOptionsEmbed);
}

@mrunal.a.deshmukh,
Thank you for contacting support.

We are sorry that you had to encounter this problem. We need more details to investigate the case and help you. Please share the following files and information:

  • input presentation file
  • output HTML file
  • screenshot with the problem you described
  • OS version on which the conversion was performed
  • .NET target platform in your application project
  • Aspose.Slides version you used

I have embedded fonts in input ppt, so 80% issue got resolved. But in conversion i am getting SVG images. I need structure in div span tag format and png images

@mrunal.a.deshmukh,
Could you kindly share a sample presentation to reproduce the problem on our end?

Please find the attached file input and output file.
Below are the issues:
1.Fonts are not loading properly
2.Also images are in svg format.
Test_Font_Output.zip (367.9 KB)

@mrunal.a.deshmukh,
Thank you for the sample files.

I’ve reproduced the problem you described. The problem means that the fonts used in the presentation are not present on the operating system on which the conversion was performed. You should install the Aptos fonts on the OS or load them as external fonts as follows:

FontsLoader.LoadExternalFonts(new string[] { "path_to_your_fonts" });

Custom PowerPoint Font in C#|Aspose.Slides Documentation

We have opened the following new ticket(s) in our internal issue tracking system and will consider implementing the feature according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44628

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

where i need to put this line?It would be good if you could provide me entire logic.

FontsLoader.LoadExternalFonts(new string[] { “path_to_your_fonts” });

@Mrunal07,
Thank you for the question. This code line should be placed before loading a presentation.