---
title: "Convert PowerPoint to PDF in C#"
url: https://recursiveai.org/onedocument/cookbook/convert-pptx-to-pdf/
description: "Export PowerPoint slides as static PDF pages, without animations or transitions."
version: "1.0.0"
---

Export PowerPoint slides as static PDF pages, without animations or transitions.

```shell
dotnet add package RecursiveAI.OneDocument.Presentations
dotnet add package RecursiveAI.OneDocument.Rendering
```

Requires [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0) (net10.0); .NET 9 and earlier aren’t supported.

```csharp
using RecursiveAI.OneDocument;
using RecursiveAI.OneDocument.Presentations;

Office.Convert("review.pptx", "review.pdf");
```

Writes `review.pdf` with one page; the snippet prints nothing. The input file is in the zip.

Unzip [the example](https://recursiveai.org/onedocument/cookbook/convert-pptx-to-pdf/convert-pptx-to-pdf.zip), then `dotnet run`.

## Full program

`review.pptx` is included in the example. It has a visible title slide, “Quarterly review” with subtitle “Sales: 120 EUR”, and a hidden slide titled “Internal notes” with subtitle “Draft figures”.

```csharp
using RecursiveAI.OneDocument;
using RecursiveAI.OneDocument.Presentations;
using RecursiveAI.OneDocument.Rendering.Presentations;

using var deck = Presentation.Open("review.pptx");
using var output = File.Create("review.pdf");
var report = PresentationRenderer.WritePdf(deck, output);
Console.WriteLine("Wrote review.pdf");
Console.WriteLine($"Pages: {report.Pages.Count}");
```

`dotnet run` prints:

```text
Wrote review.pdf
Pages: 1
```

Font substitutions and rendering notes are returned in the render report; missing SmartArt drawings or object previews may leave content unpainted.

## Variations

### Include hidden slides

Replace the `WritePdf` call in the full program with:

```csharp
var report = PresentationRenderer.WritePdf(
    deck, output, new PresentationRenderOptions {
        IncludeHiddenSlides = true
    });
```

Output:

```text
Wrote review.pdf
Pages: 2
```

## Related recipes

- [Convert a Word document to PDF in C#](https://recursiveai.org/onedocument/cookbook/convert-docx-to-pdf/)
- [Convert Excel to PDF in C#](https://recursiveai.org/onedocument/cookbook/convert-excel-to-pdf/)
- [Extract text from DOCX, XLSX and PPTX in C#](https://recursiveai.org/onedocument/cookbook/extract-text-from-office-files/)

## The short answer

Reference the presentations and rendering packages, then call `Office.Convert("review.pptx", "review.pdf")`. The rendering package enables PDF output automatically. For control over hidden slides, notes, handouts or fonts, open the presentation and call `PresentationRenderer.WritePdf`, as in the complete program.

The example converts a deck with one visible slide and one hidden slide. The default output has one PDF page; including hidden slides produces two. It does not automate an installed copy of PowerPoint. The PDF is a static rendering: slide text and graphics become page content, while animations and transitions are not rendered. See the [presentation-rendering documentation](https://recursiveai.org/onedocument/docs/presentation-rendering/) for the output options and drawing rules.

## How do I convert PowerPoint to PDF in C# for free?

Install `RecursiveAI.OneDocument.Presentations` and `RecursiveAI.OneDocument.Rendering` in a .NET 10 project. The example project pins both packages to the release used here. Supply a PPTX file, choose a PDF output path and run the conversion. The library is available under MIT or Apache-2.0, free for commercial use; the conversion does not require an online converter account.

The shortest path selects PDF output from the `.pdf` extension. The longer path returns a `PresentationRenderReport` with pages, hidden-slide counts, font substitutions and notes. Use that report when the output will be reviewed by someone else. A PDF being written tells you that export completed, not that every slide feature has an identical visual equivalent.

The default output is slides. Hidden slides are excluded unless `IncludeHiddenSlides` is true, as in the variation. The page size follows the presentation’s slide size. A presentation with nothing to render still writes a blank PDF page; don’t interpret that as a populated deck.

Fonts matter for page appearance. The default font provider uses the open fonts supplied by the font library. When a requested font is substituted, the report records that substitution. A different font can change character shapes or layout. Supply an appropriate font provider when your documents depend on particular typefaces, and inspect the rendered pages before distributing them.

## Can I download a free PPTX-to-PDF converter?

Yes. The downloadable example above contains a local .NET project, and NuGet supplies its open-source packages. For deciding whether it fits your deck, the rendering rules matter as much as the installation.

OneDocument paints the slide background, then master and layout shapes, then the slide’s own shapes in their stored order. Placeholder geometry and text formatting can inherit from the layout and master. The conversion reads the presentation without changing it; don’t render the same open presentation from several threads.

Pictures, shapes, connectors and tables use the rendering pipeline. Charts are passed to the chart renderer. SmartArt uses the drawing saved with the diagram; the converter does not regenerate that drawing from the diagram’s layout definition. If no saved drawing exists, it is not painted and the report includes a note. An embedded object uses its saved preview picture, not an execution of the embedded application. Without that preview, it is not painted either.

For printable speaker material, `PresentationRenderOptions.Output` supports notes pages and handouts as well as slides. Handout page counts are therefore not the same thing as slide counts. Choose the output kind intentionally rather than assuming every PDF page represents one slide. Keep the input deck, check the report and review a representative PDF before using the same settings on a larger collection. These are static conversion choices, not substitutes for animation playback.
