WolfPPT - PPTX to PDF on Linux

# Convert PPTX to PDF in Python without PowerPoint or LibreOffice

Two first-party ways convert a .pptx deck to PDF on a Linux server or in a Docker container, with no Microsoft PowerPoint and no LibreOffice. WolfPPT Commercial, a $500-a-year subscription for one legal organization, adds the render-native command to the WolfPPT Python package. Wolf Runtime is licensed separately: eligible organizations buy Starter online, higher bands use a written Order, and evaluation requires accepted evaluation terms. pip install wolfppt does not install it; its wolf command also writes a receipt and render report for every file. Both lay out slides with their own engine, so nothing launches a headless office suite that can hang or crash inside a container.

## With WolfPPT Commercial: render-native

```
pip install wolfppt-pro --index-url https://packages.wolfxl.com/wolfppt/simple/
wolfppt-harness render-native --source monthly_review.pptx --output-dir out --format pdf \
  --font 'Calibri=/opt/fonts/calibri.ttf'
```

Repeat `--format` for more outputs: `svg`, `png`, `tiff`, `xps`, `gif`, and `html5` are also available. Admit each font family the deck uses with `--font FAMILY=PATH` (or `FAMILY:STYLE=PATH`), so output does not depend on what happens to be installed in the image; a missing font is refused unless you name a default font to substitute. Content it cannot draw is refused by name instead of being left out silently. The output folder must not exist yet: the command refuses to replace one, and publishes all files at once. PNG, TIFF, and GIF output also need Pillow from PyPI.

The layout is WolfPPT's own, with no claim of matching PowerPoint pixel for pixel. See [deck assembly](https://wolfppt.com/copy-slides-pptx-python) for the other WolfPPT Commercial workflow, and the [pricing page](https://wolfxl.com/pricing) to buy it.

## With Wolf Runtime: before you run these commands, get Wolf Runtime

The `wolf render` examples below need the `wolf` command from Wolf Runtime. It is a separate licensed product (online Starter for eligible organizations or higher bands under a written Order), and it is not on PyPI, so `pip install wolfppt` does not provide it. The free MIT WolfPPT package still edits existing decks with no Order, as in [WolfPPT text edits](https://wolfppt.com/update-pptx-python). To get the `wolf` command, [request an evaluation](https://wolfxl.com/evaluate) or read [Wolf Runtime and licensing](https://wolfsdk.com/runtime).

## Render one deck

```
wolf render monthly_review.pptx --to pdf --outdir out
wolf render monthly_review.pptx --to png --outdir out
# out/monthly_review.pdf, or out/monthly_review-1.png and out/monthly_review-2.png,
# plus out/render-report.json; the receipt (JSON) goes to standard output
```

A PDF holds one page per slide. A PNG, SVG, JPEG, TIFF, or BMP target writes one file per slide, named `<stem>-<n>` with the slide number. Useful options: `--pages 1-3` renders a slide range, `--dpi` sets the raster resolution for image targets only (a PDF target with `--dpi` is a usage error, exit code `2`), `--font-dir <dir>` (repeatable) adds font folders, and `--timeout-ms` and `--max-pages` cap the work for untrusted files.

The exit code tells a script what happened. `0` means every output was written with no error-level loss. `1` means the output was written and the render report holds at least one error-level omission or approximation. `3` means the input is missing or is not a valid deck, and nothing is written.

## Call it from Python

```
import json
import subprocess
from pathlib import Path

def render_to_pdf(source: str, outdir: str) -> tuple[Path, str, dict]:
    outdir = Path(outdir).resolve()
    run = subprocess.run(
        ["wolf", "render", source, "--to", "pdf", "--outdir", str(outdir)],
        capture_output=True,
        text=True,
    )
    receipt = json.loads(run.stdout)
    if receipt["status"] == "failed":
        raise RuntimeError(receipt["errors"])
    report = json.loads(Path(receipt["render_report"]["path"]).read_text())
    return Path(receipt["outputs"][0]["path"]), receipt["status"], report["summary"]

pdf, status, summary = render_to_pdf("monthly_review.pptx", "pdf-out")
print(pdf.name, status, summary["pages"], summary["omissions"]["total"])
# monthly_review.pdf succeeded 2 0
```

The receipt carries the input and output digests, the status, and the path of the render report. The render report lists each page's size, and each omission, approximation, and font substitution with a location, a reason, and a severity. Review that list before a deck goes to a customer.

To edit first and render second, change the deck with [WolfPPT text edits](https://wolfppt.com/update-pptx-python), [table updates](https://wolfppt.com/update-pptx-table-python), or [chart data updates](https://wolfppt.com/update-pptx-chart-python), then pass the saved file to `render_to_pdf`.

## Fidelity limits of the wolf command

- The layout is the wolf engine's own. Text wrapping, chart drawing, and effects can differ from Microsoft PowerPoint's, and the output carries no promise of matching PowerPoint pixel for pixel.
- The command uses a bundled set of metric-compatible fonts plus any `--font-dir` folders, and leaves installed fonts off unless you pass `--system-fonts`. A font outside those sources is substituted and named in the render report. Supply the deck's own font files for the closest match.
- Content the engine cannot draw is named as an omission with a location, for example a shape on a slide. An error-level omission makes the run `partial`, exit code `1`, so a script can refuse the output.
- On a frozen corpus of 51 PPTX test files, Wolf's page count matched Microsoft Office's on all 51, and 18 of the files ended `partial` with an error-level omission. The corpus is a regression benchmark and no blind test has been run, so test your own decks. The [rendering results](https://wolfsdk.com/blog/introducing-wolf-runtime#how-close-is-the-rendering) describe the method.

## Where WolfPPT fits

The free MIT WolfPPT package edits decks and does not render them; rendering needs WolfPPT Commercial or the `wolf` command. For editing, see [the python-pptx comparison](https://wolfppt.com/python-pptx-alternative). The [WolfPPT home page](https://wolfppt.com/) lists every task.

## Get the wolf command

The `wolf` command ships with Wolf Runtime. Eligible organizations buy Starter online; higher bands use a written Order. There is no pip package for it. The Wolf Runtime page lists the integration steps: select the build, install the shims or call the command directly, and run your own documents while you check the receipts, omissions, and refusals.

[See Wolf Runtime and licensing](https://wolfsdk.com/runtime)[Start an evaluation](https://wolfxl.com/evaluate)
