メディアの管理

メディアファイルをHTMLにエクスポートする

メディアファイルをHTMLにエクスポートするには、Aspose.Slides for C++がチャートデータ形式を管理するためのシンプルなAPIを提供します。以下の手順に従ってください:

1. Presentation クラスのインスタンスを作成します。

  1. スライドの参照を取得します。
  2. トランジション効果を設定します。
  3. プレゼンテーションをPPTXファイルとして書き出します。

以下の例では、メディアファイルをHTMLにエクスポートしました。

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