Introduces a new directory containing a small standalone CLI tool () that converts PDFs to Markdown using PyMuPDF and pymupdf4llm. When installed, it replaces the slower pdftohtml-based converter with a significantly faster path. The tool is invoked as an OS subprocess, following the same pattern already used for LibreOffice and Tesseract. A new service handles discovery (PATH probe, cached 30 s), temp file I/O, and process execution via the existing infrastructure. Auto-detected at startup via — no configuration flag required. Falls back transparently to the bundled pdftohtml converter if not found. is baked into the Docker base image via the existing Python venv build stage and symlinked onto PATH, so all Docker users get the faster path automatically with no manual steps. AGPL notice: is licensed under AGPL-3.0-or-later because it depends on PyMuPDF (AGPL-3.0 / Artifex commercial). It is a SEPARATE program from the rest of Stirling PDF and shares no source code with the MIT-licensed core or the proprietary engine. The subprocess boundary ensures the AGPL copyleft attaches to this tool alone and does not extend to Stirling PDF. The LICENSE file and pymupdf-worker/LICENSE document this separation explicitly. Do not replace the subprocess invocation with an in-process import of PyMuPDF.
Stirling PDF PyMuPDF Convert
A small, standalone CLI tool that converts PDFs to Markdown using
PyMuPDF (pymupdf4llm). It gives Stirling PDF a much
faster PDF→Markdown path than the default pdftohtml-based converter.
License — please read
This tool is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). It depends on PyMuPDF, which is dual-licensed under AGPL-3.0 or the Artifex commercial license.
This tool is a separate program from the rest of Stirling PDF:
- It shares no source code with the MIT core (
app/) or the proprietary engine (engine/). - It is invoked only as an OS subprocess.
- Its AGPL copyleft attaches to this tool only and does not extend to Stirling
PDF. Do not replace the subprocess boundary with an in-process
importof PyMuPDF — that separation would be lost.
Usage
pymupdf-convert <input.pdf> <output.md>
Install
uv sync
uv tool install .
Once installed, Stirling PDF auto-detects pymupdf-convert on PATH at startup
and uses it automatically, falling back to the bundled pdftohtml converter if
it is not found.