PowerPoint Library for C# and VB.NET applications

The fastest way to get started with the GemBox.Presentation library is by exploring our collection of C# and VB.NET examples. These are live examples that show supported features and APIs for achieving various PowerPoint-related tasks with the GemBox.Presentation component.

System Requirements

GemBox.Presentation requires only .NET, it doesn't have any other dependency.
You can use it on:

  • .NET Framework 3.5 - 4.8
  • .NET Core 3.1 (.NET 5 for Windows)
  • .NET Standard 2.0 (.NET 5 for Linux, macOS, Android, iOS, …)

Hello World

The first step in using the GemBox.Presentation library is to add a reference to GemBox.Presentation.dll within your C# or VB.NET project. There are three ways how to do that.

a) Add from NuGet.

You can add GemBox.Presentation as a package by using the following command from the NuGet Package Manager Console:

Install-Package GemBox.Presentation

Or you can search and add GemBox.Presentation from the NuGet Package Manager.

Adding GemBox.Presentation library from NuGet

b) Add from Setup.

You can download the GemBox.Presentation Setup from this page. After installing the setup, you can add a reference to GemBox.Presentation.dll from the Global Assembly Cache (GAC).

Adding GemBox.Presentation library from GAC

c) Add from a DLL file.

You can download GemBox.Presentation.dll file from this page and add a reference by browsing to it.

Adding GemBox.Presentation library from DLL

The second step is to add a directive for the GemBox.Presentation namespace.

For a C# project, use: using GemBox.Presentation;
For a VB.NET project, use: Import GemBox.Presentation

The third step is to set the license key to use GemBox.Presentation in one of its working modes.

To use a Free mode in a C# project, use: ComponentInfo.SetLicense("FREE-LIMITED-KEY");
To use a Free mode in a VB.NET project, use: ComponentInfo.SetLicense("FREE-LIMITED-KEY")

You can read more about GemBox.Presentation's working modes on the Evaluation and Licensing help page.

The last step is to write your application-specific PowerPoint code, like the following example code that shows how to create a simple presentation with "Hello World!" text. It shows how to initialize the GemBox.Presentation content model, populate the common presentation elements Slide, TextBox, TextParagraph and TextRun, and then save the PresentationDocument to a PowerPoint file.

Simple PowerPoint file created with GemBox.Presentation
Screenshot of simple PowerPoint file created with GemBox.Presentation
using GemBox.Presentation;

class Program
    static void Main()
        // If using Professional version, put your serial key below.

        var presentation = new PresentationDocument();

        var slide = presentation.Slides.AddNew(SlideLayoutType.Custom);

        var textBox = slide.Content.AddTextBox(ShapeGeometryType.Rectangle, 2, 2, 5, 4, LengthUnit.Centimeter);

        var paragraph = textBox.AddParagraph();

        paragraph.AddRun("Hello World!");

        presentation.Save("Hello World.%OutputFileType%");
Imports GemBox.Presentation

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.

        Dim presentation As New PresentationDocument()

        Dim slide = presentation.Slides.AddNew(SlideLayoutType.Custom)

        Dim textBox = slide.Content.AddTextBox(ShapeGeometryType.Rectangle, 2, 2, 5, 4, LengthUnit.Centimeter)

        Dim paragraph = textBox.AddParagraph()

        paragraph.AddRun("Hello World!")

        presentation.Save("Hello World.%OutputFileType%")

    End Sub

End Module

Want more?

Next example GitHub

Check the next example or select an example from the menu. You can also download our examples from the GitHub.

Like it?

Download Buy

If you want to try the GemBox.Presentation yourself, you can download the free version. It delivers the same performance and set of features as the professional version, but with some operations limited. To remove the limitation, you need to purchase a license.