Export media files into HTML file
Contents
[
Hide
]
In order to export media files to HTML. Please follow the steps below:
- Create an instance of Presentation class
- Get reference of the slide
- Setting the transition effect
- Write the presentation as a PPTX file
In the example given below, we have exported the media files to HTML.
Example
//Loading a presentation
using (Presentation pres = new Presentation("example.pptx"))
{
const string path = "path";
const string fileName = "video.html";
const string baseUri = "http://www.example.com/";
VideoPlayerHtmlController controller = new VideoPlayerHtmlController(path: path, fileName: fileName, baseUri: baseUri);
//Setting HTML options
HtmlOptions htmlOptions = new HtmlOptions(controller);
SVGOptions svgOptions = new SVGOptions(controller);
htmlOptions.HtmlFormatter = HtmlFormatter.CreateCustomFormatter(controller);
htmlOptions.SlideImageFormat = SlideImageFormat.Svg(svgOptions);
//Saving the file
pres.Save(path + fileName, SaveFormat.Html, htmlOptions);
}
Download Running Example
- [CodePlex](https://asposeslidesvsto.codeplex.com/SourceControl/latest#Aspose.Slides Features missing in VSTO/Export media files into html/)
- Github
- Code.MSDN