Convert PowerPoint files to PDF

The following examples show how you can use the GemBox.Presentation API to convert presentations to PDF and PDF/A formats.

Convert PowerPoint presentations to PDF

The following example shows how to convert a PowerPoint presentation to PDF using default LoadOptions and SaveOptions.

Upload your file (Drag file here)
using GemBox.Presentation;

class Program
{
    static void Main()
    {
        // If using the Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        var presentation = PresentationDocument.Load("%InputFileName%");

        // In order to achieve the conversion of a loaded PowerPoint file to PDF,
        // we just need to save a PresentationDocument object to desired 
        // output file format.
        presentation.Save("Convert.%OutputFileType%");
    }
}
Imports GemBox.Presentation

Module Program

    Sub Main()

        ' If using the Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim presentation = PresentationDocument.Load("%InputFileName%")

        ' In order to achieve the conversion of a loaded PowerPoint file to PDF,
        ' we just need to save a PresentationDocument object to desired 
        ' output file format.
        presentation.Save("Convert.%OutputFileType%")

    End Sub

End Module
PDF converted from PowerPoint file with GemBox.Presentation
Screenshot of PDF converted from PowerPoint file with GemBox.Presentation

For both reading and writing, you can either provide the file's path or a stream by using one PresentationDocument.Load or PresentationDocument.Save methods.

Convert PowerPoint presentations to PDF/A

The following example shows how to convert a PowerPoint presentation to PDF/A using PdfConformanceLevel to specify the conformance level and version.

Upload your file (Drag file here)
using GemBox.Presentation;

class Program
{
    static void Main()
    {
        // If using the Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        PdfConformanceLevel conformanceLevel = %PdfConformanceLevel%;

        // Load PowerPoint file.
        var presentation = PresentationDocument.Load("%InputFileName%");

        // Create PDF save options.
        var options = new PdfSaveOptions()
        {
            ConformanceLevel = conformanceLevel
        };

        // Save to PDF file.
        presentation.Save("Output.pdf", options);
    }
}
Imports GemBox.Presentation

Module Program

    Sub Main()

        ' If using the Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim conformanceLevel As PdfConformanceLevel = %PdfConformanceLevel%

        ' Load PowerPoint file.
        Dim presentation = PresentationDocument.Load("%InputFileName%")

        ' Create PDF save options.
        Dim options As New PdfSaveOptions() With
        {
            .ConformanceLevel = conformanceLevel
        }

        ' Save to PDF file.
        presentation.Save("Output.pdf", options)

    End Sub
End Module
PDF/A converted from PowerPoint file with GemBox.Presentation
Screenshot of PDF/A converted from PowerPoint file with GemBox.Presentation

You can find the full list of formats on the Supported File Formats help page.

See also


Next steps

GemBox.Presentation is a .NET component that enables you to read, write, edit, convert, and print presentation files from your .NET applications using one simple API.

Download Buy