We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback


Trusted by the world’s leading companies

Overview

The Syncfusion .NET PowerPoint Library allows you to create, modify, and remove shapes in PowerPoint presentations using C# without Microsoft PowerPoint or interop dependencies.


How to add a shape in PowerPoint presentations using C#

  1. Install NuGet package: Install the Syncfusion.Presentation.Net.Core NuGet package in your project.
  2. Create presentation: Create a new presentation document as an IPresentation object.
  3. Create slide: Add a blank slide as an ISlide object.
  4. Add shape: Add a shape through the AddShape method.
  5. Save the presentation: Save the IPresentation object to the FileStream object.

Here is an example of how to add a shape in a presentation in C# using the Syncfusion .NET PowerPoint Library.

//Create an instance for the presentation.
using IPresentation pptxDoc = Presentation.Create();
//Add a blank slide to presentation.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Add cube shape to slide.
slide.Shapes.AddShape(AutoShapeType.Cube, 50, 200, 200, 200);
//Save the presentation.
using FileStream outputStream = new FileStream("Sample.pptx", FileMode.Create, FileAccess.ReadWrite);
pptxDoc.Save(outputStream);

Shapes in PowerPoints

Format shapes

Format the PowerPoint shapes programmatically, including adjusting the fill, modifying the line formats, and more.

Group shape

Create, format, and remove group shapes in PowerPoint presentations.



Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Scroll up icon