Create PowerPoint (PPTX) or PDF files on Linux or macOS in C#
GemBox.Presentation library is a standalone .NET component with cross-platform support. It can be used on non-Windows platforms like Linux and macOS.
The following example shows how to create a PowerPoint presentation and a PDF file using GemBox.Presentation on Linux (Ubuntu).

Prerequisites
- Install Visual Studio Code.
- Install the C# for Visual Studio Code extension.
- Install .NET Core SDK on Ubuntu.
After installing the requirements listed above, follow these steps to see how to use Visual Studio Code (VS Code) to create a simple Console project and C# code that generates a PPTX file.
1. Open a project folder
- Open VS Code.
- Click "Open Folder" on the EXPLORER panel.
- Select the folder you want your console project to be in, for instance a folder named GemBoxExample.

2. Create a new console project
- Open Integrated Terminal in VS Code by clicking View > Terminal or using CTRL + ` shortcut.
- In the terminal window, execute the following command:
dotnet new console - This command will create a code file (Program.cs) and a project file (GemBoxExample.csproj) inside the opened folder.

3. Edit project files
- Add a reference to GemBox.Presentation in the GemBoxExample.csproj file:
- Edit the C# code in Program.cs file:
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 = 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("Output.pptx"); presentation.Save("Output.pdf"); } }
4. Run the console project
- In the terminal window, execute the following command:
dotnet run - This command will run your Console application and create a PowerPoint presentation (Output.pptx) and a PDF file (Output.pdf) that you can open in any PowerPoint and PDF applications.

Using the full functionality of GemBox.Presentation on a Linux host requires the adjustments explained in detail on the Supported Platforms help page.
