Ekspor file media ke file HTML
Contents
[
Hide
]
Untuk mengekspor file media ke HTML, ikuti langkah-langkah berikut:
- Buat instance kelas Presentation
- Dapatkan referensi slide
- Atur efek transisi
- Tulis presentasi sebagai file PPTX
Pada contoh di bawah ini, kami telah mengekspor file media ke HTML.
Contoh
//Memuat presentasi
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);
//Mengatur opsi HTML
HtmlOptions htmlOptions = new HtmlOptions(controller);
SVGOptions svgOptions = new SVGOptions(controller);
htmlOptions.HtmlFormatter = HtmlFormatter.CreateCustomFormatter(controller);
htmlOptions.SlideImageFormat = SlideImageFormat.Svg(svgOptions);
//Menyimpan file
pres.Save(path + fileName, SaveFormat.Html, htmlOptions);
}