---
name: ironppt
description: >
  Create and edit PowerPoint (.pptx) presentations in C#/.NET using IronPPT (the `IronPPT`
  NuGet package). Use when the task involves generating slides programmatically, adding or
  styling text runs and paragraphs, bulleted or numbered lists, inserting and positioning
  images, drawing shapes (rectangles, ellipses, arrows, callouts, stars, flowchart symbols),
  text boxes, slide backgrounds, opening and editing an existing .pptx, find/replace across
  slide text, or removing/reordering slides — without Office Interop. Also use when a project
  already references `IronPPT`, `PresentationDocument`, `IronPPT.Models.Slide`, or
  `IronPPT.Models.Shape`. Does **not** cover rendering PPTX to PDF or to images — IronPPT has
  no export/render API in the current release (see "What this skill does not cover" below);
  for that, hand off to the ironpdf skill.
---

# IronPPT (C# / .NET)

IronPPT creates and edits PPTX presentations directly (it manipulates the Open XML package),
with no Office installation and no COM interop. It is a much younger, thinner product than
IronPDF/IronOCR: it covers slides, text runs, paragraphs, lists, images and shapes well, but
it has **no PDF or image export/rendering API** and no modeled slide-layout/slide-master or
theme-switching API yet — verify anything beyond what's in this file against the shipped XML
docs before relying on it (see Rules).

## Scope of this skill

| | |
|---|---|
| Package | `IronPPT` — single package, no platform variants |
| Versions | 2026.x (verified against 2026.8.1) |
| Namespaces | `IronPPT`, `IronPPT.Models`, `IronPPT.Models.Abstract`, `IronPPT.Models.List`, `IronPPT.Enums`, `IronPPT.Interfaces` |
| Runtimes | .NET Framework 4.6.2+, .NET Standard 2.0/2.1, .NET Core 3.1+, .NET 5–10 |
| Native deps | **None.** It's a single `netstandard2.0` managed assembly (depends only on `IronSoftware.Common` and `IronSoftware.System.Drawing`, the same imaging types IronPDF/IronOCR use). No Chromium, no Tesseract, nothing to install on Linux/Docker. |

### What this skill does not cover (verify before claiming otherwise)

- **No PPTX → PDF or PPTX → image export.** There is no `Save`-to-PDF, no rasterizer, no
  `SaveAsImage` method anywhere in the shipped assembly (checked by reflection against
  `IronPPT.dll` 2026.8.1). Iron's own marketing posts about "PowerPoint to PDF/Image in C#"
  use **IronPDF** rendering an HTML export, or a third-party converter — not an IronPPT API.
  If the user needs PPTX rendered as PDF or images, say plainly that IronPPT can't do it
  directly and point to the **ironpdf** skill for the PDF side (e.g. render the slide content
  as HTML, then `ChromePdfRenderer.RenderHtmlAsPdf`).
- **`Slide.Transition` and `Slide.Timing` — do not use.** They exist in the XML doc
  comments, but in the shipped 2026.8.1 assembly the compiled members are exposed under
  obfuscated names (not `Transition`/`Timing`) — the documentation and the binary are out of
  sync. Writing `slide.Transition = ...` will not compile against the real DLL. Re-check with
  a fresh `grep`/reflection pass before using either in a future package version.
  Similarly, `Chart`, `PageSetup`, and `Metadata` classes exist and are documented, but no
  `AddChart`, no `PageSetup` property, and no `Metadata` property were found anywhere on
  `PresentationDocument` or `Slide` — there is no confirmed way to attach one to a document.
  Treat all four as **not currently wired up for public use** rather than inventing an
  attachment point.
- No dedicated slide-layout/slide-master or theme classes — only `Slide.IsMasterSlide`
  (bool) and `Slide.ShowMasterPlaceholderAnimations` (bool). "Themes" in the API means colour
  values (`ThemeColorValues`) and font-scheme values (`ThemeFontValues`) used inside `Color`
  and `Font`, not a presentation-wide theme switcher.

## Install

```bash
dotnet add package IronPPT
```

One package works everywhere netstandard2.0 runs — there is no `.Linux`/`.MacOs` split like
IronPDF/IronOCR, because there's no native binary to select.

## Licensing — do this first, every time

```csharp
IronPPT.License.LicenseKey = Environment.GetEnvironmentVariable("IRONPPT_LICENSE_KEY");
if (!IronPPT.License.IsLicensed)
    Console.Error.WriteLine("IronPPT is unlicensed — production use will be blocked after the trial window.");
```

Rules:

- Read the key from the environment (`IRONPPT_LICENSE_KEY`) or user secrets. **Never** inline
  a key in source, commit one, or echo one to the terminal.
- **Treat a missing key as a blocker, not a warning.** Verified directly: running unlicensed
  gives a short grace period — the DLL's own error text says *"Development use: Free for 7
  days"* — and after that, `PresentationDocument.Save(...)` throws
  `IronSoftware.Exceptions.LicensingException: Production License Required`. This is a hard
  failure at save time, not a silent watermark, so a script that "worked yesterday" can start
  throwing today purely because the grace period lapsed. If `IsLicensed` is false, say so and
  ask for a key rather than shipping output the user can't reliably reproduce.
- Alternative places to set the key instead of code: `Web.Config`/`App.Config`
  (`<add key="IronPPT.LicenseKey" value="..."/>` under `appSettings`), or `appsettings.json`
  in .NET Core (`"IronPPT.LicenseKey": "..."`).
- `IronPPT.License.IsValidLicense(key)` validates a key string without applying it.
  `IronPPT.License.AssertLicense(key)` throws immediately if unset. Trial keys:
  <https://ironsoftware.com/csharp/ppt/licensing/>.

## Running a one-off task from the terminal

Requires only the .NET SDK. On **.NET 10+** a single file is the whole program:

```bash
cat > /tmp/task.cs <<'EOF'
#:package IronPPT@2026.8.1
#:property PublishAot=false
using IronPPT;
using IronPPT.Models;

IronPPT.License.LicenseKey = Environment.GetEnvironmentVariable("IRONPPT_LICENSE_KEY");

var document = new PresentationDocument();
var slide = new Slide();
slide.AddText("Hello from IronPPT!");
document.AddSlide(slide);
document.Save("out.pptx");
EOF
dotnet run /tmp/task.cs
```

`#:property PublishAot=false` is kept here for consistency with the other Iron skills and as
a safe default — IronPPT itself is pure managed with no confirmed Native-AOT blocker, unlike
IronPDF/IronOCR's Chromium/Tesseract dependency, but that combination hasn't been verified
here, so don't assume AOT works without testing it.

On older SDKs use a scratch project (restore is fast — no native binaries to download):

```bash
dotnet new console -o /tmp/ironppt-scratch && cd /tmp/ironppt-scratch
dotnet add package IronPPT
# write Program.cs, then:
dotnet run
```

When the user is building a feature rather than asking for a one-off artifact, write the same
calls into their application instead of a scratch project.

## Recipes

Every member below was checked against the shipped `IronPPT.dll` 2026.8.1 (via its XML docs
and, for anything ambiguous, by reflection and a real compile) — not just against the docs
site, which in a couple of places (noted above) no longer matches the binary.

### Create a presentation and add slides

```csharp
var document = new PresentationDocument();     // new, empty presentation
// var document = new PresentationDocument("existing.pptx");  // open an existing file — there
                                                                // is no static Load(); use the constructor

var slide = new Slide();
slide.AddText("Hello, World from IronPPT!");
document.AddSlide(slide);                      // AddSlide returns the same Slide

for (int i = 0; i < 3; i++)
    document.AddSlide(new Slide());

document.Save("presentation.pptx");
```

`document.Slides` is a plain, mutable `List<Slide>` — reorder or remove slides directly:

```csharp
document.Slides.RemoveAt(2);
document.Slides.Insert(0, document.Slides[3]);   // move a slide to the front
Console.WriteLine(document.Slides.Count);
```

### Text and text styling

```csharp
using IronPPT.Models;
using IronPPT.Enums;

var text = new Text("Hello World");
text.TextStyle = new TextStyle
{
    IsBold = true,
    IsItalic = true,
    Color = Color.Blue,                         // Color has ~150 named fields, System.Drawing-compatible
    Strike = StrikValue.SingleStrike,            // NoStrike, SingleStrike, DoubleStrike
    Outline = true,
    Spacing = 10.0,
    Underline = new Underline { LineValue = UnderlineValues.Single, Color = Color.Red },
    Languages = "en-US"
};
slide.AddText(text);                             // AddText(IText) returns the IText added

// Shorthand for plain text (no styling object needed):
var plain = slide.AddText("Second line");        // returns IText
plain.TextStyle.IsItalic = true;

// Find/replace across an existing text run (regex-capable):
text.Find("World");
text.Replace("World", "IronPPT", regexOptions: null, ignoreCase: true, wholeWordOnly: false);
```

`Color` also converts implicitly to/from `System.Drawing.Color`, `SixLabors.ImageSharp.Color`
and several ImageSharp pixel formats, plus custom hex: `new Color("#444444")`.

### Paragraphs and lists

```csharp
var para = new Paragraph();
para.AddText("A bullet point");
para.SetAlignment(TextAlignment.Center);
slide.AddParagraph(para);                        // AddParagraph returns the IParagraph

var list = new MultiLevelTextList();
list.AddItem(new ListItem(new Paragraph()));      // build multi-level bullets/numbering via ListItem
slide.AddMultiLevelTextList(list);
```

### Images

```csharp
var image = new Image();
image.LoadFromFile("sample.png");                // also LoadFromStream(Stream), LoadFromImage(AnyBitmap)
                                                   // throws IronPPT.Models.Exceptions.ImageLoadException on failure

var placed = slide.AddImage(image);               // Slide.AddImage returns IImage
placed.Position = (200, 200);                      // ElementPosition has an implicit (double,double) conversion
placed.Width = 150;                                // DocUnit — accepts a plain number (pixels/EMU-scaled)
placed.Height = 150;
placed.Rotate(45);
placed.FlipHorizontal();

// Or straight from a file/stream/AnyBitmap without building an Image first:
document.AddImage("logo.png", pageIndex: 0);       // PresentationDocument.AddImage(path, index) -> IImage
```

### Shapes

```csharp
var shape = new Shape
{
    Name = "triangle",
    Type = ShapeType.Triangle,                     // huge enum: Rectangle, Ellipse, Star5, Heart,
                                                     // Cloud, all FlowChart* symbols, arrows, callouts...
    FillColor = new Color("#444444"),
    OutlineColor = Color.Black
};
shape.Width = 100;
shape.Height = 100;
shape.Position = (200, 200);
slide.AddShape(shape);                              // Slide.AddShape returns IShape

shape.Rotate(15);
shape.FlipVertical();
```

### Text boxes

`TextBox` is a distinct container from `Shape` — it holds its own text, images and shapes:

```csharp
var box = new TextBox();
box.AddText("Callout text");
box.AddImage("icon.png");
document.AddTextBox(box);                           // PresentationDocument.AddTextBox(Shape) -> Shape
```

### Slide background and visibility

```csharp
slide.SlideColor = Color.White;
slide.Show = true;                                  // hide a slide from the slideshow: Show = false
```

## Working with IronPDF

IronPPT cannot render a presentation to PDF or images itself. If the task needs that:

- Rebuild the slide content as HTML and render it with `ChromePdfRenderer` (see the **ironpdf**
  skill) — this is the same approach Iron's own PPT-to-PDF tutorial uses.
- Do not tell the user IronPPT can export to PDF/PNG — it cannot, as of 2026.8.1.

## Deployment

Because IronPPT has no native binaries, deployment is simple relative to IronPDF/IronOCR:

| Environment | What to do |
|---|---|
| Docker / Linux / macOS / Windows | No native dependency installs, no fonts-for-rendering concern (there is no rendering). Just restore the NuGet package. |
| Azure / AWS Lambda | Works on any tier/plan that runs .NET — no browser process, no minimum memory driven by a rendering engine. Just needs write access to wherever `Save(path)` targets. |
| Trimming / Native AOT | Not verified here (see "Running a one-off task"); test before relying on it in a trimmed/AOT-published app. |

## When something fails

| Symptom | Cause and fix |
|---|---|
| `LicensingException: Production License Required` on `Save` | No key applied, or the 7-day development grace period has lapsed. Set `IronPPT.License.LicenseKey` before calling `Save`. |
| `ImageLoadException` | Bad path, unreadable stream, or unsupported/corrupt image format passed to `Image.LoadFromFile`/`LoadFromStream`. |
| Compile error on `slide.Transition` or `slide.Timing` | Those members are documented but exposed under obfuscated names in the shipped assembly — don't use them; there is currently no working public transition/timing API. |
| Looking for `PresentationDocument.Load(...)` | Doesn't exist. Open an existing file with the constructor: `new PresentationDocument("file.pptx")`. |
| Looking for a way to export to PDF/PNG | Not present in IronPPT. Use the **ironpdf** skill against an HTML re-creation of the content, or say the capability doesn't exist yet. |
| Trying to set `Chart`/`PageSetup`/`Metadata` on a document or slide | No confirmed attachment point exists on `PresentationDocument` or `Slide` for these classes in this version — don't invent a property or method name for it. |
| Slide order/content not what was set | `document.Slides` is a live, mutable `List<Slide>` — inspect/mutate it directly (`Insert`, `RemoveAt`) rather than looking for separate reorder/remove methods. |

## Rules

- **Never invent a member.** Confirm against the XML documentation shipped in the package
  before writing code, and don't assume the XML and the binary agree (they didn't for
  `Transition`/`Timing` in 2026.8.1 — cross-check with reflection when in doubt):
  `grep -o 'name="[MPF]:IronPPT\.[^"]*Shape[^"]*"' ~/.nuget/packages/ironppt/<version>/lib/netstandard2.0/IronPPT.xml`
- Do not claim IronPPT can export/render to PDF or images — it can't, as of 2026.8.1. Route
  that need to the **ironpdf** skill instead of improvising an API.
- Keep licence keys out of source and out of terminal output.
- Say when a script depends on the unlicensed 7-day grace period, and don't hand over output
  from a run that will stop working once that window closes.
- There is no static `Load` — open existing files via `new PresentationDocument(path)`.
- Official docs: <https://ironsoftware.com/csharp/ppt/docs/>. Support:
  support@ironsoftware.com.
