Skip to content

🍂 A .NET library for manipulating PowerPoint presentations

License

Notifications You must be signed in to change notification settings

tonley/ShapeCrawler

 
 

Repository files navigation

ShapeCrawler

NuGet PRs Welcome Nuget License

ShapeCrawler (formerly SlideDotNet) is a .NET library for manipulating PowerPoint presentations. It provides a simplified object model on top of the Open XML SDK, allowing users to process presentations without having Microsoft Office installed.

Contents

Quick Start

install-package ShapeCrawler

// open existing presentation
var pres = new Presentation("some.pptx");

var shapes = pres.Slides[0].Shapes;

// get number of shapes on slide
var shapesCount = shapes.Count;

// get text
var shape = shapes.GetByName("TextBox 1");
var text = shape.TextFrame!.Text;

How To?

Create presentation

// create a new presentation
var pres = new Presentation();

var shapes = pres.Slides[0].Shapes;

// add new shape
shapes.AddRectangle(x: 50, y: 60, width: 100, height: 70);
var addedShape = shapes.Last();

addedShape.TextFrame!.Text = "Hello World!";

pres.SaveAs("my_pres.pptx");

More samples

Visit the Wiki page to find more usage samples.

Prerelease Version

To access prerelease builds from master branch, add https://www.myget.org/F/shape/api/v3/index.json as a package source:

Prerelease Download Prerelease

Have questions?

If you have a question:

How to contribute?

Give a star⭐ if you find this useful, please give it a star to show your support.

Bug Report

If you encounter an issue, report the bug on the issue page.

To be able to reproduce a bug, it's often necessary to have the original presentation file attached to the issue description. If this file contains confidential data and cannot be shared publicly, you can securely send it to [email protected]. Of course, if your security policy allow this. We assure you that only the maintainer will access this file, and it will not be shared publicly.

Code contributing

Pull Requests are welcome! Please read the Contribution Guide for more details.

Changelog

Version 0.52.0 - 2024-05-28

🍀Added support for the SVG format for the method ISlideShapes.AddPicture() #350
🐞Fixed not displaying a picture added using the method ISlideShapes.AddPicture() #649
🐞Fixed adding picture with high resolution #683

Visit CHANGELOG.md to see the full log.

About

🍂 A .NET library for manipulating PowerPoint presentations

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%