Exporter des fichiers multimédias en fichier HTML
Contents
[
Hide
]
Pour exporter des fichiers multimédias en HTML. Veuillez suivre les étapes ci‑dessous :
- Créer une instance de la classe Presentation
- Obtenir la référence de la diapositive
- Définir l’effet de transition
- Enregistrer la présentation au format PPTX
Dans l’exemple ci‑dessous, nous avons exporté les fichiers multimédias en HTML.
Exemple
//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);
}