Medien verwalten

Mediendatei nach HTML exportieren

Um Mediendateien nach HTML zu exportieren, stellt Aspose.Slides für C++ eine einfache API zur Verwaltung von Diagrammdatenformaten zur Verfügung. Bitte befolgen Sie die folgenden Schritte:

  1. Erstellen Sie eine Instanz der Klasse Presentation.
  2. Holen Sie sich eine Referenz auf die Folie.
  3. Einstellen des Übergangseffekts.
  4. Schreiben Sie die Präsentation als PPTX-Datei.

Im unten stehenden Beispiel haben wir die Mediendateien nach HTML exportiert.

// 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);