Use CasesConvert documents and images to PDF locally
Personal assistantFiles / knowledge

Convert documents and images to PDF locally

Recipe by @mr.potato
View Source Repository

How it works

Uses Stirling PDF's local API to convert images (JPG, PNG, TIFF, WebP) and documents (Word, PowerPoint, HTML, and more) into PDFs entirely on your own machine. No file ever leaves your system — Stirling PDF runs as a self-hosted Docker container or desktop app and exposes a REST API that the agent calls directly.

The agent handles single files or batches, and can chain conversions into further PDF operations: merge pages, compress output, add page numbers, or apply OCR. This makes it the go-to approach for converting sensitive documents (contracts, medical records, ID scans) that you'd normally have to upload to an online converter.

Run Stirling PDF locally in one command:

docker run -p 8080:8080 docker.stirlingpdf.com/stirlingtools/stirling-pdf

Then ask the agent to convert any file — it will call the local API at http://localhost:8080.

Example Prompt

"Convert these three scanned JPEGs into a single PDF, and also turn this Word document into a PDF — all without uploading anything to an external service."