Aspose.Slides.Examples.CSharp.Slides.Layout.SetPDFPageSize.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_Slides_Presentations_Layout();

            // ExStart:SetPDFPageSize
            // Instantiate a Presentation object that represents a presentation file 
            Presentation presentation = new Presentation();

            // Set SlideSize.Type Property 
            presentation.SlideSize.Type = SlideSizeType.A4Paper;

            // Set different properties of PDF Options
            PdfOptions opts = new  PdfOptions();
            opts.SufficientResolution = 600;

            // ExEnd:SetPDFPageSize
            // Save presentation to disk
            presentation.Save(dataDir + "SetPDFPageSize_out.pdf", SaveFormat.Pdf, opts);
        }
    }
SetPDFPageSize