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

            // Instantiate a Presentation object that represents a presentation file
            using (Presentation pres = new Presentation(dataDir + "Convert_XPS_Options.pptx"))
            {
                // Instantiate the TiffOptions class
                XpsOptions opts = new XpsOptions();

                // Save MetaFiles as PNG
                opts.SaveMetafilesAsPng = true;

                // Save the presentation to XPS document
                pres.Save(dataDir + "XPS_With_Options_out.xps", SaveFormat.Xps, opts);
            }
        }
コード例 #2
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Conversion();

            // Instantiate a Presentation object that represents a presentation file
            using (Presentation pres = new Presentation(dataDir + "Convert_XPS_Options.pptx"))
            {
                // Instantiate the TiffOptions class
                XpsOptions opts = new XpsOptions();

                // Save MetaFiles as PNG
                opts.SaveMetafilesAsPng = true;

                // Save the presentation to XPS document
                pres.Save(dataDir + "XPS_With_Options_out.xps", SaveFormat.Xps, opts);
            }
        }
コード例 #3
0
        public void WorkWithXpsOptions()
        {
            // ExStart:WorkWithXpsOptions
            // ExFor: XpsOptions
            // ExFor: XpsOptions.#ctor
            // ExFor: XpsOptions.RenderMetafileAsBitmap
            // ExSummary: Shows how to save project as XPS file.
            var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

            // create XPS save options and tune the parameters
            var options = new XpsOptions
            {
                RenderMetafileAsBitmap = true
            };

            project.Save(OutDir + "UseSvgOptions_out.xps", options);

            // ExEnd:WorkWithXpsOptions
        }