示例#1
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Conversion();

            // Loading a presentation
            using (Presentation pres = new Presentation(dataDir + "Media File.pptx"))
            {
                string       path     = dataDir;
                const string fileName = "ExportMediaFiles_out.html";
                const string baseUri  = "http://www.example.com/";

                VideoPlayerHtmlController controller = new VideoPlayerHtmlController(path, fileName, 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.Combine(path, fileName), SaveFormat.Html, htmlOptions);
            }
        }
示例#2
0
        public static void Run()
        {
            //ExStart:ConvertWholePresentationToHTMLWithMediaFiles
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Conversion();
           const string htmlDocumentFileName = "presentationWithVideo.html";
          using (Presentation pres = new Presentation("presentationWith.pptx"))
        {
        VideoPlayerHtmlController controller = new VideoPlayerHtmlController(
        "", htmlDocumentFileName, "http://www.example.com/");

        HtmlOptions htmlOptions = new HtmlOptions(controller);
        SVGOptions svgOptions = new SVGOptions(controller);

        htmlOptions.HtmlFormatter = HtmlFormatter.CreateCustomFormatter(controller);
        htmlOptions.SlideImageFormat = SlideImageFormat.Svg(svgOptions);

        pres.Save(htmlDocumentFileName, SaveFormat.Html, htmlOptions);
}
            }
        static void Main(string[] args)
        {
            //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);
            }
        }
        static void Main(string[] args)
        {
            string FilePath     = @"..\..\..\Sample Files\";
            string srcFileName  = FilePath + "Conversion.pptx";
            string destFileName = "video.html";

            //Loading a presentation
            using (Presentation pres = new Presentation(srcFileName))
            {
                const string baseUri = "http://www.example.com/";

                VideoPlayerHtmlController controller = new VideoPlayerHtmlController(path: FilePath, fileName: destFileName, 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(destFileName, SaveFormat.Html, htmlOptions);
            }
        }