Ekspor File Media ke File HTML
Contents
[
Hide
]
Untuk mengekspor file media ke HTML, ikuti langkah‑langkah berikut:
- Buat sebuah instance dari kelas Presentation
- Dapatkan referensi slide
- Atur efek transisi
- Tuliskan presentasi sebagai file PPTX
Pada contoh di bawah ini, kami telah mengekspor file media ke HTML.
Example
string FilePath = @"..\..\..\Sample Files\";
string srcFileName = FilePath + "Conversion.pptx";
string destFileName = "video.html";
//Memuat presentasi
using (Presentation pres = new Presentation(srcFileName))
{
const string baseUri = "http://www.example.com/";
VideoPlayerHtmlController controller = new VideoPlayerHtmlController(path: FilePath, fileName: destFileName, 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(destFileName, SaveFormat.Html, htmlOptions);
}
Download Sample Code
Download Running Example
Untuk detail lebih lanjut, kunjungi Mengekspor file media ke file html.