When converting PPT to HTML- how to add meta/custom elements to output HTML

Hello,


I am using Aspose.slides to convert PPT documents into HTML. I have the following queries regarding that.

  1. In the output html, I want to add some meta elements. Is there any way to do that using Aspose APIs?
  2. Can you provide some information about “writeDocumentStart” API in “ResponsiveHtmlController”, what is it used for? Can I add meta elements using this API? If yes, Can you please provide some code samples on how to use it?

Thanks,
Neha

Hi Neha,


I have observed your comments. I like to inform that you can add meta data in html. Can you please share what kind of meta you need to add in html. I also like to inform that in general, implementing IHtmlFormattingController you may use WriteDocumentStart to write your own meta, styles, etc. Please visit this article converting presentation to html for more details.

Best Regards,

Hi,


I am using the following code to generate HTML:
Presentation presentation = new Presentation(“filePath”);
ResponsiveHtmlController controller = new ResponsiveHtmlController();
HtmlOptions htmlOptions = new HtmlOptions();
htmlOptions.setHtmlFormatter(HtmlFormatter.createCustomFormatter(controller)); presentation.save(“outputFilePath”, SaveFormat.Html, htmlOptions);

In the of the HTML generated, I want some meta elements to be present, like:
-
-


Thanks,
Neha

Hi Neha,


I have observed your requirements. I have shared a piece of code in a text file with you. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

Best Regards,