HTML ファイルへのメディア ファイルのエクスポート
Contents
[
Hide
]
メディア ファイルを HTML にエクスポートするには、以下の手順に従ってください:
- Presentation クラスのインスタンスを作成します
- スライドの参照を取得します
- トランジション効果を設定します
- プレゼンテーションを PPTX ファイルとして書き出します
以下の例では、メディア ファイルを HTML にエクスポートしています。
例
//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);
}