Power Point File to PDF Conversion
Power Point to PDF with advanced options
Below example shows using PowerPointConverter class with PowerPointConversionOptions for setting advanced option properties.
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
PPT to PDF with Converter.Convert static method
One could also use the Converter.Convert static method to convert PPT to PDF file by using the PowerPointConversionOptions object for setting advanced options. Below code demonstrates the usage.
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