Click or drag to resize

Hello World Example

When a component is installed (to download a component, click here), it is installed in GAC (Global Assembly Cache).

To use GemBox.Presentation, follow these steps:

  • Create a new .NET project (or use an existing one).

  • Use the Add Reference dialog to add a new reference to the DLL with a GemBox.Presentation name. It should be under the .NET tab.

  • Import a GemBox.Presentation namespace: using GemBox.Presentation; for C# or Import GemBox.Presentation for VB.NET.

  • Set the license key to use GemBox.Presentation in Free mode as follows: ComponentInfo.SetLicense("FREE-LIMITED-KEY"); for C# or ComponentInfo.SetLicense("FREE-LIMITED-KEY") for VB.NET.

Now you can write an application-specific presentation processing code like the one below.


Using the GemBox.Presentation component is easy and straightforward. The following code shows how to create a slide with the "Hello World!" text:

// Create a new empty presentation.
var presentation = new PresentationDocument();

// Add a new empty slide.
var slide = presentation.Slides.AddNew(SlideLayoutType.Custom);

// Add a text box of size 5 x 5 cm in the top-left corner of the slide.
var textBox = slide.Content.AddTextBox(0, 0, 5, 5, LengthUnit.Centimeter);

// Add a paragraph with text content to the text box.
textBox.AddParagraph().AddRun("Hello World!");

// Save the presentation to PPTX and PDF file.