We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Convert HTML to PPT Using Aspose.Slides?

i want convert my html page to ppt. My html page is complex which consists of text, icons and charts. I want to convert chart as an image and then to ppt. Is this possible using aspose.slides? please help me to achieve this. Thanks!

@techcedence,
Thank you for your question. To create presentation slides from HTML pages, please try using the following code example:

using var presentation = new Presentation();
using var htmlStream = File.OpenRead("page.html");

presentation.Slides.AddFromHtml(htmlStream);
presentation.Save("MyPresentation.ppt", SaveFormat.Ppt);

API Reference: ISlideCollection interface

In case of failure, please share the following data and information:

  • input and output files
  • OS version where the code was executed
  • .NET target platform in your app

Thank you Andrey for your response.

if it’s a simple html file then I can see the content in the presentation file. But my html file is a little complex which consists of scripts, text, images, etc. Attached the sample file for your reference . Please help me to convert it into ppt.

(Attachment Test.html is missing)

@techcedence,
Please zip the HTML file and upload it here. It would be great if you could also share the rest of the information mentioned above.

Thank you Andrey for your response.

if it’s a simple html file then I can see the content in the presentation file. But my html file is a little complex which consists of scripts, text, images, etc. Attached the sample file for your reference . Please help me to convert it into ppt.

Test.zip (742 Bytes)

Hi @techcedence,

for the complex of html file, (javascript class) is not possible use directly Aspose.Slides for convert html to PPT that file without lose funcionality. (trust me, i tried)

I invite you to use Aspose.Slide to directly generate the file you own using our references

Aspose.Slides Reference

Regards

Thank you Luis Castro for your help. Let me try and get back to you.

1 Like