Aspose.Slides.Examples.CSharp.Presentations.Conversion.ConvertWithXpsOptions.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        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);
            }
        }
    }
ConvertWithXpsOptions