Free Support Forum - aspose.com

How can I convert slides to HTML?

I want to convert my ppt slides to HTML format. How is this done? Thanks!


Submitted from: http://saaspose.com/

Hi Paulo,

Can you please share which development platform are you using? This will help us share specific links with you. You can also go through our REST http://saaspose.com/docs/display/slides/1.2+-+Saaspose.Slides+Examples and SDK http://saaspose.com/docs/display/slides/1.3+-+Saaspose.Slides+SDKs examples according to your platform. Check examples with title 'Convert Presentation to Different File Formats'.

Best Regards,
Muhammad Ijaz

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Hi! I am using .net as my platform. Is it possible to save ppt to HTML format? If i have 10 slides, then i will have 10 html files? is that correct?

Sent from my iPhone

Hi Paulo,

Please check following examples for PowerPoint to HTML conversion.

http://saaspose.com/docs/display/slides/1.3.1+-+Saaspose.Slides+SDK+for+.NET
http://saaspose.com/docs/display/slides/Convert+PowerPoint+Documents+to+Different+File+Formats+without+Using+Storage+%28.NET+REST%29
http://saaspose.com/docs/display/slides/Save+PowerPoint+documents+to+other+Formats+%28.NET+REST%29
http://saaspose.com/docs/display/slides/Convert+Presentation+to+Different+File+Formats+without+Using+Storage+%28.NET+SDK%29
http://saaspose.com/docs/display/slides/Save+presentation+to+other+Formats+%28.NET+SDK%29

I would like to clarify a few things when converting PPT to HTML.

- Saaspose returns output as a ZIP when you set output format to HTML because there can be several support files with the HTML
- Saaspose.Slides allows you to convert complete presentation (not individual slides) to HTML, so you can expect one HTML file and some support files (images etc.) in the output
- If you want to convert individual slides to HTML, you can use the following workaround
a) Convert PPT to PDF
b) Split PDF pages http://saaspose.com/docs/display/pdf/Split+PDF+files+%28.NET+REST%29
c) Convert each split page to HTML

Please feel free to contact us in case you have further comments or questions.

Best Regards,
Muhammad Ijaz

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Hi Muhammad Ijaz, Thanks for the information! I tried the links and it worked. I will take note your suggestion regarding conversion of individual slides (that's what I need). Another question, how can I get the notes of each slide and is there a way to get the title of each slide? I tried getting all text items, but there's no indicator whether the text is the title of the slide. Thanks again for your fast response.
Date: Tue, 2 Apr 2013 10:08:06 +0000

Hi Paulo,

You can loop through each placeholder of a slide and check its type (if it is a title or something else). Please check following links.

http://saaspose.com/docs/display/slides/Get+Placeholder+from+a+Particular+Slide+%28.NET+REST%29
http://saaspose.com/docs/display/slides/Get+Placeholder+Count+from+a+Particular+Slide+%28.NET+REST%29
http://saaspose.com/docs/display/slides/Get+Placeholder+Count+from+a+Particular+Slide+%28.NET+SDK%29
http://saaspose.com/docs/display/slides/Get+Placeholder+from+a+Particular+Slide+%28.NET+SDK%29

Best Regards,
Muhammad Ijaz

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Hi, I tested your solution but I think split PDF pages cant be saved to HTML. I am getting a Bad request whenever I request for HTML format, but if I request for TIFF, the code runs smoothly.
Date: Tue, 2 Apr 2013 10:08:06 +0000

Hi Paulo,

You need to split PDF pages to new PDFs and then convert each PDF to HTML. This way you will get separate HTML for each slide.

Best Regards,
Muhammd Ijaz

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Okay, thank you! Do I need to install Saaspose SDK? Even if I am using REST API? because I found this: public class SplitPDFResponse : Saaspose.Common.BaseResponse{public SplitPdfResult Result { get; set; }} public class SplitPdfResult
{public LinkResponse[] Documents { get; set; }} On http://saaspose.com/docs/display/pdf/Split+PDF+files+%28.NET+REST%29 Thanks!
Date: Thu, 4 Apr 2013 10:40:53 +0000

Hi Paulo,

There is no need to install/use SDK if you are using REST API. You can remove ': Saaspose.Common.BaseResponse'. You can even add following two properties in SplitPDFResponse class if you want to check whether request was executed successfully?

public string Code { get; set; }
public string Status { get; set; }

Best Regards,
Muhammad Ijaz

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Hi,
From this E-mail thread, I asked on how to get the Title of each slide. You mention using this links:http://saaspose.com/docs/display/slides/Get+Placeholder+from+a+Particular+Slide+%28.NET+REST%29
http://saaspose.com/docs/display/slides/Get+Placeholder+Count+from+a+Particular+Slide+%28.NET+REST%29
Now, I can get the placeholders. But what I want is to get the Text Content of the placeholder with Type = Title / Centered Title. How can I do this?
Thanks!

Hi Paulo,

Thanks for your inquiry. You can get the placeholder text and type. There is a type tag in the placeholder response XML. For details, please visit the API page here: http://www.aspose.com/docs/display/slidescloud/placeholder+Resource

It also contains the shape's URL which holds placeholder. You need to prepare another REST API call with this URL and you will get a text tag in the response XML. Please check the REST API example here: http://www.aspose.com/docs/display/slidescloud/Get+a+Particular+Shape+from+the+Slide+%28.NET+REST%29

I hope this will help you. Please let us know in case of further assistance and comments.

Regards,
Imran Rafique

Support Developer, Saaspose
Support Team
http://www.saaspose.com

Hi,
I tried your example but it seems that I am getting an incorrect response:
{"Code":200,"Status":"OK","Shape":
This is the whole response that I got using the links you gave me.
Thanks!
-Paulo

Hi Paulo,

Thanks for the information. I managed to replicate the problem. I have logged this problem under ticket id SAASSLIDES-105 in our issue tracking system. As a workaround, you can get a response in the XML format. You just need to update a single line in the ProcessCommand method. Please replace "application/json" with "application/xml". I hope this will help you.

http://saaspose.com/docs/display/rest/Send+Request+and+Receive+Response+%28.NET+REST%29

Please let us know in case of further assistance and comments.

Regards,
Imran Rafique

Support Developer, Saaspose
Support Team
http://www.saaspose.com