Aspose.Slides for .NET

Aspose.Slides for .NET

Aspose.Slides for .NET is a class library for creating, reading, editing and converting PowerPoint and OpenDocument presentations in .NET applications, without Microsoft PowerPoint or Office Automation.

It loads and saves PPT, PPTX, PPS, POT and ODP, including macro-enabled and template variants, and exports to PDF, XPS, HTML, SVG, TIFF, Markdown and images.



Your first presentation

Create a console application with the .NET SDK 6 or later:

dotnet new console -n HelloSlides
cd HelloSlides

Then add one package for your platform:

  • On Windows: dotnet add package Aspose.Slides.NET
  • On Linux and macOS: dotnet add package Aspose.Slides.NET6.CrossPlatform — see Installation for the Linux prerequisite and for the systems that need Aspose.Slides.NET instead.

Replace the contents of Program.cs with this code and run dotnet run:

using Aspose.Slides;
using Aspose.Slides.Export;

using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 400, 100);
shape.TextFrame.Text = "Hello, Aspose.Slides!";
presentation.Save("hello.pptx", SaveFormat.Pptx);

The program saves hello.pptx with one slide holding a text box. Without a license, the saved file carries an evaluation watermark — see Licensing. For more ways to create and fill a presentation, see Create Presentations.