# Convert OpenDocument to PDF and Images

Convert ODT, ODS and ODP files to PDF or page images, and rebuild editable OpenDocument files from a PDF, with a report of both conversion stages.

**Packages**

- [OfficeIMO.OpenDocument.Odt.Pdf](https://www.nuget.org/packages/OfficeIMO.OpenDocument.Odt.Pdf) `dotnet add package OfficeIMO.OpenDocument.Odt.Pdf`
- [OfficeIMO.OpenDocument.Ods.Pdf](https://www.nuget.org/packages/OfficeIMO.OpenDocument.Ods.Pdf) `dotnet add package OfficeIMO.OpenDocument.Ods.Pdf`
- [OfficeIMO.OpenDocument.Odp.Pdf](https://www.nuget.org/packages/OfficeIMO.OpenDocument.Odp.Pdf) `dotnet add package OfficeIMO.OpenDocument.Odp.Pdf`

**Works with**

- .NET
- [PowerShell](/docs/pswriteoffice/install/) `Install-Module PSWriteOffice`
- [CLI](/docs/cli/install/) `dotnet tool install --global OfficeIMO.Tool`

**Target frameworks**

netstandard2.0, net8.0, net10.0, net472

**APIs**

- [`PdfDocument`](/api/pdf/officeimo-pdf-pdfdocument/)
- [`OdpPresentation`](/api/open-document/officeimo-opendocument-odppresentation/)
- [`OdsDocument`](/api/open-document/officeimo-opendocument-odsdocument/)
- [`OdtDocument`](/api/open-document/officeimo-opendocument-odtdocument/)
- [`OdtPdfExportOptions`](/api/open-document-odt-pdf/officeimo-opendocument-odt-pdf-odtpdfexportoptions/)
- [`OdpPdfExportOptions`](/api/open-document-odp-pdf/officeimo-opendocument-odp-pdf-odppdfexportoptions/)
- [`OdsPdfExportOptions`](/api/open-document-ods-pdf/officeimo-opendocument-ods-pdf-odspdfexportoptions/)
- [`OfficeConversionReport`](/api/core/officeimo-officeconversionreport/)
- [`OfficeDiagnostic`](/api/core/officeimo-officediagnostic/)
- [`OfficeImageExportFormat`](/api/core/officeimo-drawing-officeimageexportformat/)
- [`OfficeImageExportResult`](/api/core/officeimo-drawing-officeimageexportresult/)
- [`WordImageExportOptions`](/api/word-pdf/officeimo-word-wordimageexportoptions/)

**Cmdlets**

- [`Convert-OfficeDocument`](/api/powershell/convert-officedocument/)

**Commands**

- [`officeimo convert`](/docs/cli/convert/)

**Limits**

PDF to ODT, ODS or ODP is semantic reconstruction through the Word, Excel or PowerPoint models, not a visual copy; check both stage reports when fidelity matters. [OfficeIMO.OpenDocument.Odt.Pdf support matrix](/compatibility/#package-opendocument-odt-pdf), [OfficeIMO.OpenDocument.Ods.Pdf support matrix](/compatibility/#package-opendocument-ods-pdf), [OfficeIMO.OpenDocument.Odp.Pdf support matrix](/compatibility/#package-opendocument-odp-pdf)

**Verified**

Examples compiled against the source on 2026-11-14

**Data**

- [OfficeIMO.OpenDocument.Odt.Pdf API index](/api/open-document-odt-pdf/index.json)
- [OfficeIMO.OpenDocument.Ods.Pdf API index](/api/open-document-ods-pdf/index.json)
- [OfficeIMO.OpenDocument.Odp.Pdf API index](/api/open-document-odp-pdf/index.json)
- [PSWriteOffice command catalog](/data/powershell/commands.json)
- [CLI command catalog](/data/cli/commands.json)
- [Capability catalog (JSON)](/data/capabilities.json)

PDF export renders through the same Word, Excel and PowerPoint engines the Office formats use, so pick the package for the format you have: `OfficeIMO.OpenDocument.Odt.Pdf`, `.Ods.Pdf` or `.Odp.Pdf`. Each brings only its own engine, with no LibreOffice process. The returned report holds the diagnostics of both stages: the OpenDocument import and the PDF rendering.

## Convert ODT, ODS and ODP to PDF

### C#

```csharp
using OfficeIMO;
using OfficeIMO.OpenDocument;
using OfficeIMO.OpenDocument.Odp.Pdf;
using OfficeIMO.OpenDocument.Ods.Pdf;
using OfficeIMO.OpenDocument.Odt.Pdf;

using (OdtDocument text = OdtDocument.Load("proposal.odt")) {
    OfficeConversionReport report = text.SaveAsPdf("proposal.pdf", new OdtPdfExportOptions { FailOnLoss = true });
    Console.WriteLine($"proposal.pdf: {report.Diagnostics.Count} diagnostics");
}

using (OdsDocument workbook = OdsDocument.Load("budget.ods")) {
    workbook.SaveAsPdf("budget.pdf");
}

using (OdpPresentation presentation = OdpPresentation.Load("slides.odp")) {
    presentation.SaveAsPdf("slides.pdf");
}
```

`OdtPdfExportOptions`, `OdsPdfExportOptions` and `OdpPdfExportOptions` take `ConversionOptions` for the import stage, `PdfOptions` for the PDF engine and `FailOnLoss`. `ToPdf` returns a `PdfDocument` instead of writing a file, for example to merge it with other PDFs.

### PowerShell

```powershell
Convert-OfficeDocument -Path ./proposal.odt -OutputPath ./proposal.pdf
Get-ChildItem ./reports -Filter *.ods | Convert-OfficeDocument -To Pdf -OutputDirectory ./pdf
```

### CLI

```sh
officeimo convert proposal.odt proposal.pdf
officeimo convert budget.ods budget.pdf
officeimo convert slides.odp slides.pdf --require-no-loss
```

## Render pages as images

The Word, Excel and PowerPoint OpenDocument adapters render pages to PNG, JPEG, WebP, TIFF or SVG through the same visual engines.

### C#

```csharp
using OfficeIMO;
using OfficeIMO.Drawing;
using OfficeIMO.OpenDocument;
using OfficeIMO.Word;
using OfficeIMO.Word.OpenDocument;

using OdtDocument source = OdtDocument.Load("proposal.odt");
var options = new WordImageExportOptions { Format = OfficeImageExportFormat.Png, TargetDpi = 144 };

IReadOnlyList<OfficeImageExportResult> pages = source.ToImages(options);
Console.WriteLine($"{pages.Count} pages rendered");

OfficeConversionReport saved = await source.SaveAsImagesAsync("pages", options);
```

For spreadsheets and presentations, use `OdsDocument.ToImages` with `ExcelImageExportOptions` from `OfficeIMO.Excel.OpenDocument`, or `OdpPresentation.ToImages` with `PowerPointImageExportOptions` from `OfficeIMO.PowerPoint.OpenDocument`.

### CLI

```sh
officeimo convert proposal.odt proposal.png
```

## Rebuild an OpenDocument file from a PDF

The reverse direction reconstructs editable content: PDF to ODT goes through the PDF-to-Word and Word-to-ODT adapters, and the report keeps both stages.

### C#

```csharp
using OfficeIMO;
using OfficeIMO.OpenDocument.Odp.Pdf;
using OfficeIMO.OpenDocument.Ods.Pdf;
using OfficeIMO.OpenDocument.Odt.Pdf;
using OfficeIMO.Pdf;

PdfDocument contract = PdfDocument.Load("contract.pdf");
OfficeConversionReport report = contract.SaveAsOdt("contract.odt");
foreach (OfficeDiagnostic diagnostic in report.Diagnostics) Console.WriteLine(diagnostic.Message);

PdfDocument.Load("statement.pdf").SaveAsOds("statement.ods");
PdfDocument.Load("slides.pdf").SaveAsOdp("slides.odp");
```

### CLI

```sh
officeimo convert contract.pdf contract.odt
officeimo convert statement.pdf statement.ods
```

<!-- PowerForge markdown source sha256:D91BB4EA2F381113F1C0EA956DC51DEC32A481F91AF69B69E17F6C036C2FFF12; title=True -->

<!-- PowerForge markdown artifact sha256:A1AF776129DC21E97AAF20117DF8ACFC3FD2C784651BD2CF76D27A87FACA065A -->
