SlideDotNet is a fluent wrapper around Open XML SDK for the processing of PowerPoint files without Microsoft Office installed. It aims to provide an intuitive and user-friendly interface to dealing with the underlying Open XML SDK API.
You can quickly start work with the library by following steps listed below.
- .NET Core 2.2 or above
To install SlideDotNet, run the following command in the Package Manager Console:
PM> Install-Package SlideDotNet
// opens presentation from the file path
using var presentation = new PresentationEx(@"c:\test.pptx");
// gets the slides collection
var slides = presentation.Slides;
// gets number of slides
var numSlides = slides.Count();
// gets the shapes collection of the first slide
var shapes = slides[0].Shapes;
// prints texts of shapes on the Debug console
foreach (var sp in shapes)
{
if (sp.HasTextFrame)
{
Debug.WriteLine(sp.TextFrame.Text);
}
}
- Added setters for
X
,Y
,Width
andHeight
properties of non-placeholder shapes; - Added
ShapeEx.IsGrouped
boolean property to determine whether the shape is grouped; - Added APIs to remove table row
var tableRows = shape.Table.Rows; // remove by index tableRows.RemoveAt(0); // remove by instance var row = tableRows.First(); tableRows.Remove(row);
To find out more, please check out the CHANGELOG.
If you have any problems or questions you can create an issue on this repository or contact me at theadamo86@gmail.com. If you want to contribute in improving this wrapper, feel free to create pull requests.
Adam Shakhabov — adamshakhabov