Converting ppt to html

this is regarding the thread https://forum.aspose.com/t/75140. I would like to know aspose is supporting this conversion?

Hi Manju,


I like to share that Aspose.Slides does support to export presentation to html. Please visit this documentation link for your kind reference and share with us if any thing further is required on my end.

Many Thanks,

Please have a look at the following code below.

spose.Slides.Pptx.PresentationEx pres1 = new Aspose.Slides.Pptx.PresentationEx(@"C:\\New Folder\New Microsoft PowerPoint Presentation.pptx");

//Saving the presentation to HTML

pres1.Save(@"C:\\New Folder\New Microsoft PowerPoint Presentation.html", Aspose.Slides.Export.SaveFormat.Html);

I am not able to upload the ppt and html as it shows some error while clicking on the content selector in the window. Iam using a sample pptx which have only two slides with two image and some text which returns a imageless html page consists all the slides in the same page. I need it as individual page just like a microsoft convert will deliver. Please help.

Hi Manju,


I like to share that you are right that Aspose.Slides exports the presentation to HTML as single file. In order to meet your requirement where by you are interested in generating the individual pages for the exported slides, please use the following sample code. Please share if I may help you further in this regard.

PresentationEx origPres = new PresentationEx(path + “SamplePres.pptx”);

PresentationEx tempPres = null;

foreach (SlideEx slide in origPres.Slides)
{
tempPres = new PresentationEx();
tempPres.Slides.AddClone(slide);
tempPres.Slides.RemoveAt(0);
tempPres.Save(path + “SamplePres_”+slide.SlideId.ToString()+".html", Aspose.Slides.Export.SaveFormat.Html);
}

Many Thanks,

yes. Now im able to convert to independent files but no images or animations. Please help.

Hi Manju,


I have shared the sample presentation where by I have two images on two slides. Both of them got exported in generated html files. I doubt that animations are not supported in html export. Please share the sample presentation with images and animations and I will investigate it on my end. If necessary, I will have to log issue in our issue tracking system and for that I need the requested information. Please also share the exported html files with missing images. I will really appreciate your cooperation in this regard.

Many Thanks,

In the zip file you already sent to me do not having any images and also the html files shows no image error. Can you please verify it.Please see the screenshot i had attached with this.

Hi,


I have verified the generated html files in both Goolge Chrome and MS Internet Explorer. I have observed no missing images and for your kind reference, I have attached the opened Html snapshots. I feel there may be some settings issue with your browsers.

Many Thanks,

okey…Yes. I verified the same html file in IE and Mozilla. In IE ,the images are not loading also in Mozilla older versions(mozilla 3.6 and IE 7). Can you please provide a fix for this?

Hi,


The images are embedded inside html file. Please open the generated html file in notepad and you will observe the image data. The generated html is a single file and that has every thing inside it. I hope this will elaborate the concept to you.

Many Thanks,

when i checked the viewsource what i can find out is given below.


This is supported in chrome and mozilla new version but not in IE. any suggestion?

Hi Manju,


I have observed the issue of image failed to get loading when opening in IE6 or IE8. However, earlier I tested with IE9 and there is no issue of image loading in that. I have created an issue with ID SLIDESNET-33973 as enhancement to investigate the support for older versions of IE. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

ok…Thank you.

Hi


I’m facing the same problem with images in IE8. Plus i can see that text is corrupted on IE9. On Google Chrome everything works fine. Is there any workaround to fix this?


Hi Konstantin,


Thanks for inquiring Aspose.Slides.

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-33993 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

Hi Konstantin,

Our development team has investigated the requirements in detail. Actually, Internet Explorer versions before 9.0 completely lack SVG support, so they can't render html with SVG images as Aspose.Slides renders the images in SVG by default.

There are other ways to create vector graphics in HTML, one is using html5 canvas and draw everything using javascript (which is unsupported by pre-9 IE too) and one is using VML languages, which were never supported by any other browser and which use is deprecated even by Microsoft. And one is using some third party plugin such as Adobe Flash. So, there are actually no good options but to fall-back to the bitmaps.

To create html file for IE 8 and earlier, you should replace SVGs with bitmaps as shared in the sample code below. Please share, if I may help you further in this regard.

public static void GenHtml()

{

String path = @"C:\Users\Mudassir\Downloads\";

Aspose.Slides.Export.HtmlOptions htmlOpt = new HtmlOptions();

htmlOpt.SlideImageFormat = SlideImageFormat.Bitmap(0.5f, System.Drawing.Imaging.ImageFormat.Jpeg);

PresentationEx origPres = new PresentationEx(path + "SamplePres.pptx");

PresentationEx tempPres = null;

foreach (SlideEx slide in origPres.Slides)

{

tempPres = new PresentationEx();

tempPres.Slides.AddClone(slide);

tempPres.Slides.RemoveAt(0);

tempPres.Save(path + "SamplePres_New_" + slide.SlideId.ToString() + ".html", Aspose.Slides.Export.SaveFormat.Html, htmlOpt);

}

}

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-33993;SLIDESNET-33973) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.