With the release of Essential Studio 2015 Volume 1, Syncfusion introduced the beta version of Essential Presentation, a new .NET library that can read, write, convert, and create raster images from Microsoft PowerPoint files. It provides a rich object model similar to Syncfusion’s file format libraries: XlsIO, DocIO, and PDF. This library can be used with Windows Forms, WPF, ASP.NET, and ASP.NET MVC applications. As it does not depend on Microsoft Office or any other external software, this library can be used on the server side without any difficulty. Keep in mind that this version of Essential Presentation supports only PowerPoint 2007-2013 (.pptx) files.
Key features of Essential Presentation
- Opens and saves PowerPoint (.pptx) files from and to streams.
- Sends output to a client browser.
- Accesses and modifies a PowerPoint presentation’s document properties.
- Creates and manipulates charts within a PowerPoint file.
- Creates and manipulates bulleted lists, numbered lists, tables, shapes, pictures, etc.
- Exports a single slide or an entire PowerPoint presentation to PDF.
- Renders a slide or an entire presentation as an image.
Note: Since this version of Essential Presentation is in beta, it does not have some features found in Microsoft PowerPoint such as WordArt, SmartArt, slide notes, master-slide editing, animations, transitions, comments, headers, footers, OLE objects, handouts, equations, and built-in themes.
Experience the magic of Syncfusion’s C# PowerPoint Library. Witness your ideas come to life with its Microsoft PowerPoint-like editing, conversion, and formatting options.
How can I get started?
In order to create and modify a PowerPoint presentation, you need to know how the elements are organized in Essential Presentation’s document object model (DOM). The following figure illustrates this DOM.
- IPresentation – An instance of IPresentation represents an entire PowerPoint presentation file. It is the root element in Essential Presentation’s DOM. This presentation instance contains the slide collections present in the PowerPoint presentation file.
- ISlide – An instance of ISlide represents a single slide within a PowerPoint presentation, which in turn contains a collection of shapes. All the elements present within a slide are enclosed in a shape.
- IOfficeChart – IOfficeChart represents a chart present within a slide. Through this instance, you can customize the chart.
- ITable – An instance of ITable represents a table within a slide. A table instance contains a collection of rows.
- IRow – An IRow instance represents a single row in a table. Each row contains a collection of cells.
- ICell – An ICell instance represents a single cell within a row. A cell contains an instance of ITextBody, through which you can to add or modify the textual content of a slide.
- ITextBody – ITextBody represents a container for textual content. It can contain a collection of paragraphs.
- IParagraph – An IParagraph instance represents a paragraph. Paragraphs can only be added into text boxes and auto-shapes. A paragraph contains a collection of text parts.
- ITextPart – A text part is similar to <span> in HTML. An instance of ITextPart holds textual content of similar character-level formatting.
- IPicture – The IPicture interface represents a picture or image in a slide.
We have published resources explaining in detail on how to get started using the presentation library:
- Creating a PowerPoint Presentation from Scratch – Tutorial on creating a simple presentation file.
- Creating a Chart in a PowerPoint Presentation from Scratch – Tutorial on creating presentation files that contain charts.
- Converting a PowerPoint Presentation to PDF – Describes how to convert a PowerPoint presentation into a PDF document.
- Converting Slides to Image – This section describes how to convert a slide into an image.
Learn to create impactful presentations with Syncfusion’s feature-rich PowerPoint Library. To get started, check out these working demos!
The following code snippet creates a simple PowerPoint presentation with two slides.
private static void CreateSlide2(IPresentation presentation) { //Create a slide with a blank layout. ISlide slide2 = presentation.Slides.Add(SlideLayoutType.Blank); //Add a text box for entering the title of the slide and set its vertical align as middle. IShape titleShape = slide2.AddTextBox(66.24, 28.8, 828, 104.4); titleShape.TextBody.VerticalAlignment = VerticalAlignmentType.Middle; //Add a paragraph into the title shape and set its vertical alignment as center. IParagraph paragraph = titleShape.TextBody.AddParagraph(); paragraph.HorizontalAlignment = HorizontalAlignmentType.Center; //Create an instance of ITextPart and set the text and its formatting. ITextPart textPart1 = paragraph.AddTextPart(); textPart1.Text = "Northwind Database"; textPart1.Font.FontName = "Calibri Light"; textPart1.Font.FontSize = 44; //Add a new text box for the content of the slide and set its vertical alignment as top. IShape contentShape = slide2.AddTextBox(66.24, 144, 828, 342.72); contentShape.TextBody.VerticalAlignment = VerticalAlignmentType.Top; //Add a paragraph into the body of content shape. IParagraph para = contentShape.TextBody.AddParagraph(); //Set the list format type as Numbered and the numbering style as Arabic followed by a period. para.ListFormat.Type = ListType.Numbered; para.ListFormat.NumberStyle = NumberedListStyle.ArabicPeriod; //Set the paragraph indentation as suitable for a list and add a space before the start of the paragraph. para.SpaceBefore = 10; para.LeftIndent = 40; para.FirstLineIndent = -40; //Add a text part and set the text and its formatting. ITextPart textPart2 = para.AddTextPart(); textPart2.Text = "Suppliers of Northwind – who supply to the company."; textPart2.Font.FontName = "Calibri"; textPart2.Font.FontSize = 28; para = contentShape.TextBody.AddParagraph(); para.ListFormat.Type = ListType.Numbered; para.ListFormat.NumberStyle = NumberedListStyle.ArabicPeriod; para.SpaceBefore = 10; para.LeftIndent = 40; para.FirstLineIndent = -40; ITextPart textPart4 = para.AddTextPart(); textPart4.Text = "Customers of Northwind – who buy from Northwind."; textPart4.Font.FontName = "Calibri"; textPart4.Font.FontSize = 28; para = contentShape.TextBody.AddParagraph(); para.ListFormat.Type = ListType.Numbered; para.ListFormat.NumberStyle = NumberedListStyle.ArabicPeriod; para.SpaceBefore = 10; para.LeftIndent = 40; para.FirstLineIndent = -40; ITextPart textPart5 = para.AddTextPart(); textPart5.Text = "Employee details of Northwind traders – who work for Northwind."; textPart5.Font.FontName = "Calibri"; textPart5.Font.FontSize = 28; }
Now that you know the basics of getting started, take a look at our online live demos for Essential Presentation. They serve as a good launching from which you can experiment with some of the features we’ve discussed.