New Library Creates and Manipulates PowerPoint Files | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (203)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (211)BoldSign  (13)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (65)Flutter  (132)JavaScript  (219)Microsoft  (118)PDF  (81)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (897)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (50)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (127)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (618)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (39)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (501)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (42)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (381)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (17)Web  (582)What's new  (323)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

New Library Creates and Manipulates PowerPoint Files

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.

DOM of Essential Presentation
  • 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:

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;

}

First Slide of the Presentation
Second Slide of the PresentationSecond Slide of the Presentation

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.

Content Editor: Usha Clementine Henry | Content Contributor: Vijayakumar Srinivasan

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed