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 6.0 on Windows
  • .NET Standard 2.0 (for Linux, macOS, Android, iOS, …)
  • .NET Framework 3.5 - 4.8

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 the 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 the Free mode in a C# project, use: ComponentInfo.SetLicense("FREE-LIMITED-KEY");
To use the 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 the 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 the 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

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