Power Point File to PDF Conversion

DynamicPDF converter supports converting Power Point files to PDFs. The following two examples illustrate converting a Power Point to PDF using the static Convert method followed by a more advance example of converting a Power Point to PDF.

PPT to PDF with Converter.Convert Static Method

The Converter.Convert static method converts PPT documents to PDF files. The Converter uses the PowerPointConversionOptions object to set advanced options for conversion. The following code demonstrates.

 private static void PowerPointDemo(string inPath, string outPath)
 {
     PowerPointConversionOptions powerPointConversionOptions = new PowerPointConversionOptions(PageSize.A4, PageOrientation.Portrait, 36);
     HandoutOutputType handout = PowerPointOutputType.Handout;
     handout.HandoutPrintOrder = HandoutPrintOrder.Horizontal;
     handout.SlidesPerPage = SlidesPerPage.Six;
     handout.FrameSlides = true;
     powerPointConversionOptions.OutputType = handout;
     powerPointConversionOptions.OutputType.PrintHiddenSlide = true;

     OutlineViewOutputType outlineView = PowerPointOutputType.OutlineView;
     outlineView.PrintHiddenSlide = false;
     powerPointConversionOptions.OutputType = outlineView;
     Converter.Convert(inPath, outPath, powerPointConversionOptions);
 }
 Private Sub PowerPointDemo(ByVal inPath As String, ByVal outPath As String)
        Dim PowerPointConversionOptions As PowerPointConversionOptions = New PowerPointConversionOptions(PageSize.A4, PageOrientation.Portrait, 36)
        Dim handout As HandoutOutputType = PowerPointOutputType.Handout
        handout.HandoutPrintOrder = HandoutPrintOrder.Horizontal
        handout.SlidesPerPage = SlidesPerPage.Six
        handout.FrameSlides = True
        PowerPointConversionOptions.OutputType = handout
        PowerPointConversionOptions.OutputType.PrintHiddenSlide = True
        
        Dim outlineView As OutlineViewOutputType = PowerPointOutputType.OutlineView
        outlineView.PrintHiddenSlide = False
        PowerPointConversionOptions.OutputType = outlineView
        Converter.Convert(inPath, outPath, PowerPointConversionOptions)
 End Sub

Power Point to PDF with Advanced Options

The following example demonstrates using the PowerPointConverter class along with the PowerPointConversionOptions to set advanced options for converting a PPT.

 private static void PowerPointDemo(string inPath, string outPath)
 {
     PowerPointConversionOptions powerPointConversionOptions = new PowerPointConversionOptions(PageSize.A4, PageOrientation.Portrait, 36);
     HandoutOutputType handout = PowerPointOutputType.Handout;
     handout.HandoutPrintOrder = HandoutPrintOrder.Horizontal;
     handout.SlidesPerPage = SlidesPerPage.Six;
     handout.FrameSlides = true;
     powerPointConversionOptions.OutputType = handout;
     powerPointConversionOptions.OutputType.PrintHiddenSlide = true;
     PowerPointConverter powerPointConverter1 = new PowerPointConverter(inPath, powerPointConversionOptions);
     powerPointConverter1.Convert(outPath);
 }
 Private Sub PowerPointDemo(ByVal inPath As String, ByVal outPath As String)
     Dim PowerPointConversionOptions As PowerPointConversionOptions = New PowerPointConversionOptions(PageSize.A4, PageOrientation.Portrait, 36)
     Dim handout As HandoutOutputType = PowerPointOutputType.Handout
     handout.HandoutPrintOrder = HandoutPrintOrder.Horizontal
     handout.SlidesPerPage = SlidesPerPage.Six
     handout.FrameSlides = True
     PowerPointConversionOptions.OutputType = handout
     PowerPointConversionOptions.OutputType.PrintHiddenSlide = True
     Dim powerPointConverter1 As PowerPointConverter = New PowerPointConverter(inPath, PowerPointConversionOptions)
     powerPointConverter1.Convert(outPath)
 End Sub

In this topic