Gérer les Médias
Contents
[
Hide
]
Exporter un Fichier Média en HTML
Pour exporter des fichiers média en HTML, Aspose.Slides pour C++ fournit une API simple pour gérer les données de graphique. Veuillez suivre les étapes ci-dessous :
- Créez une instance de la classe Presentation.
- Obtenez la référence de la diapositive.
- Réglez l’effet de transition.
- Écrivez la présentation en tant que fichier PPTX.
Dans l’exemple ci-dessous, nous avons exporté les fichiers médias en HTML.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The path to the documents directory. | |
const String templatePath = u"../templates/Media File.pptx"; | |
const String path = u"../out/"; | |
SharedPtr<Presentation> pres = MakeObject<Presentation>(templatePath); | |
const String fileName = u"ExportMediaFiles_out.html"; | |
const String baseUri = u"http://www.example.com/"; | |
SharedPtr<VideoPlayerHtmlController> videoController = MakeObject<VideoPlayerHtmlController>(path, fileName, baseUri); | |
System::SharedPtr<HtmlOptions> htmlOptions = System::MakeObject<HtmlOptions>(videoController); | |
System::SharedPtr<SVGOptions> svgOptions = System::MakeObject<SVGOptions>(videoController); | |
htmlOptions->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(videoController)); | |
htmlOptions->set_SlideImageFormat(SlideImageFormat::Svg(svgOptions)); | |
pres->Save(path+fileName, SaveFormat::Html, htmlOptions); | |