WolfSDK - LibreOffice alternative

# A LibreOffice headless alternative for Python and agent pipelines

Many pipelines shell out to soffice --headless --convert-to pdf and then to pdftoppm for page images. The wolf command covers that path for Word, PowerPoint, Excel, and PDF files with two verbs, and it accepts the same command lines through documented shims. Anything outside the documented forms fails with a named error and a non-zero exit.

## Replace the two calls

A typical LibreOffice and Poppler pipeline:

```
import subprocess

subprocess.run(
    ["soffice", "--headless", "--convert-to", "pdf", "--outdir", "out", "report.docx"],
    check=True,
)
subprocess.run(["pdftoppm", "-png", "-r", "150", "out/report.pdf", "out/report"], check=True)
# out/report.pdf, out/report-1.png, out/report-2.png, ...
```

The same pipeline with wolf:

```
import subprocess

subprocess.run(["wolf", "render", "report.docx", "--to", "pdf", "--outdir", "out"], check=True)
subprocess.run(["wolf", "rasterize", "out/report.pdf", "--dpi", "150", "--outdir", "out"], check=True)
# out/report.pdf, out/report-1.png, out/report-2.png, ... and out/render-report.json
# check=True raises on exit code 1 (partial output); read the render report to see the losses
```

`wolf render` reads DOCX, XLSX, PPTX, PDF, ODT, ODS, ODP, DOC, XLS, and PPT files and writes PDF, PNG, SVG, JPEG, TIFF, or BMP. Page images are named `<stem>-<n>.png` with the page number padded to the width of the page count, as `pdftoppm` does. To skip the PDF, render straight to images:

```
wolf render report.docx --to png --outdir out --dpi 150
```

Every run writes a JSON receipt and a render report. The receipt records input and output digests, the status, and the exit category. The render report names each omission, approximation, and font substitution with a location, a reason, and a severity. The [DOCX guide](https://wolfdocx.com/convert-docx-to-pdf-python) and the [PPTX guide](https://wolfppt.com/convert-pptx-to-pdf-python) show a Python wrapper that reads both.

## Keep your command lines

When a script or an agent skill already calls `soffice`, `pdftoppm`, `pdftotext`, `pdfinfo`, or `pdfimages`, run the `wolf` binary under those names and put that directory first on `PATH`:

```
export PATH="$PWD/wolf-shims:$PATH"   # a directory whose soffice, pdftoppm, and pdfinfo are links to wolf
soffice --headless --convert-to pdf --outdir out report.docx
pdftoppm -png -r 150 out/report.pdf out/report
pdfinfo out/report.pdf
```

If a caller hard-codes an executable directory, place the shims at that location instead.

## What the shims accept

- `soffice --convert-to` targets `pdf`, `docx`, `pptx`, `xlsx`, `odt`, and `csv`, with or without a profile directory option. Support for each input and target pair depends on the build.
- `pdftoppm` writes PNG, JPEG, and PPM pages, with the `-r`, `-f`, `-l`, `-scale-to`, and `-singlefile` forms. `pdfinfo` reports the page count and page size.
- Any other argument fails before anything is written. A target such as RTF stops with `soffice: unsupported option: --convert-to rtf` and exit code 1. A shim never falls back to a real LibreOffice or Poppler binary, and a failed run removes the files it had written.
- The shims run no arbitrary macros.

## What changes when you switch

- **The layout engine is different.** Pagination and line breaks can differ from LibreOffice's, so compare the output on your own documents. The [published rendering results](https://wolfsdk.com/blog/introducing-wolf-runtime#how-close-is-the-rendering) state the corpus, the method, and the caveats. The [rendering comparison](https://wolfsdk.com/blog/office-rendering-comparison) scores Wolf, BetterOffice, office2pdf, and LibreOffice on the same held-out files.
- **Fonts are explicit.** The wolf command uses bundled fonts plus the folders you pass with `--font-dir`. The shims default to system fonts, as LibreOffice and Poppler do, and read extra folders from `WOLF_FONT_DIRS`. Pin fonts when you need repeatable output.
- **Losses are reported.** A shim run with omissions still exits 0, as the native tools do, and prints one line per output on standard error. Set `WOLF_REPORT_DIR` to a directory and each shim run also writes a receipt and a render report there.
- **No profile directory.** The documented bare form `soffice --headless --convert-to pdf` creates none.

## When to keep LibreOffice

- You need a conversion target or an input format outside the lists above.
- Your workflow runs macros or edits documents interactively.
- Your output must match LibreOffice's layout exactly.

Wolf Runtime publishes its preservation, rendering, and image-size measurements with their methods on [the Wolf Runtime page](https://wolfsdk.com/runtime).

## 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)
