← All articles
PRODUCTIVITY Stirling PDF: The Swiss Army Knife for PDF Processing 2026-02-08 · stirling-pdf · pdf · document-processing

Stirling PDF: The Swiss Army Knife for PDF Processing

Productivity 2026-02-08 stirling-pdf pdf document-processing productivity

You need to merge two PDFs. Or split one. Or compress a 50 MB scan down to a reasonable size. So you search "merge PDF online" and land on one of dozens of websites that want you to upload your documents to their servers, show you ads, limit you to 2 free operations per day, and then ask for $12/month.

Your tax returns, contracts, and medical records don't belong on some random website's servers.

Stirling PDF is a self-hosted web application that handles virtually every PDF operation you'll ever need — merge, split, rotate, compress, OCR, convert, watermark, password-protect, and more. It runs locally, your files never leave your network, and there are no usage limits.

Why Self-Host PDF Tools?

The case for running your own PDF processor:

Concern Online PDF Tools Stirling PDF
Privacy Files uploaded to third-party servers Files stay on your machine
Usage limits 2-5 free operations/day typical Unlimited
Cost $6-15/month for premium Free
Speed Depends on upload/download Instant (local processing)
File size limits Often 25-100 MB max Limited only by your hardware
Availability Requires internet Works offline on your LAN
Batch processing Usually not available Via API

If you handle sensitive documents — financial records, legal paperwork, medical forms, business contracts — uploading them to iLovePDF or SmallPDF should make you uncomfortable. Self-hosting eliminates this concern entirely.

Docker Setup

Stirling PDF is one of the easiest self-hosted apps to deploy. A single container, no database required.

Basic setup

services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest
    container_name: stirling-pdf
    ports:
      - "8080:8080"
    volumes:
      - ./training-data:/usr/share/tessdata  # OCR language files
      - ./config:/configs
      - ./logs:/logs
    environment:
      - DOCKER_ENABLE_SECURITY=false
      - LANGS=en_GB
    restart: unless-stopped
docker compose up -d

Open http://your-server:8080 and you're done. No accounts, no setup wizard — just a clean interface with every tool available immediately.

With authentication

For shared or internet-exposed instances, enable the built-in authentication:

    environment:
      - DOCKER_ENABLE_SECURITY=true
      - SECURITY_INITIALLOGIN_USERNAME=admin
      - SECURITY_INITIALLOGIN_PASSWORD=changeme

This adds a login page. You can create multiple user accounts with different permission levels.

With OCR support

For OCR (extracting text from scanned documents), you need Tesseract language data. Stirling PDF handles this automatically if you mount the training data volume, but you can pre-download additional languages:

# Download additional OCR languages (e.g., German, French, Spanish)
mkdir -p training-data
wget -P training-data https://github.com/tesseract-ocr/tessdata/raw/main/deu.traineddata
wget -P training-data https://github.com/tesseract-ocr/tessdata/raw/main/fra.traineddata
wget -P training-data https://github.com/tesseract-ocr/tessdata/raw/main/spa.traineddata

English is included by default.

Resource requirements

Stirling PDF is lightweight for most operations:

Any machine that can run Docker can run Stirling PDF. A Raspberry Pi 4 handles it fine for occasional use.

Core Features

Merge PDFs

Combine multiple PDFs into one:

  1. Go to Merge
  2. Upload your PDF files
  3. Drag to reorder if needed
  4. Click Merge

Simple, instant, no limits on file count.

Split PDFs

Break a PDF into parts:

Rotate pages

Rotate individual pages or all pages by 90, 180, or 270 degrees. Useful for scanned documents that came through the scanner sideways.

Compress PDFs

Reduce file size without noticeable quality loss. Stirling PDF offers multiple compression levels:

A 50 MB scanned document typically compresses to 5-10 MB at medium quality — good enough for email or archival.

OCR Capabilities

OCR (Optical Character Recognition) converts scanned images and photographed documents into searchable, selectable text.

When you need OCR

Using OCR in Stirling PDF

  1. Go to OCR / Clean Scans
  2. Upload your scanned PDF
  3. Select the document language(s)
  4. Choose the OCR mode:
    • Normal OCR: Adds a text layer over the scanned image (preserves original appearance)
    • Force OCR: Recreates the document as text (smaller file size, different appearance)
    • Clean + OCR: Straightens pages and removes noise before OCR
  5. Click Process

The output is a PDF with selectable, searchable text — essential for feeding into document management systems like Paperless-ngx.

OCR quality tips

Converting Between Formats

Stirling PDF handles conversions in both directions:

To PDF

From PDF

Batch conversion

Upload multiple files at once for conversion. Useful when you need to convert an entire folder of images into a single PDF or extract all pages as images.

Form Filling

Stirling PDF can fill interactive PDF forms:

  1. Upload a PDF with form fields
  2. Stirling PDF detects and displays the fillable fields
  3. Enter your data
  4. Download the filled form

This works with standard PDF form fields (AcroForms). It won't work with forms that are just visual layouts without actual form field definitions — those need to be filled by annotating over the document.

Security Features

Password protection

Add or remove passwords from PDFs:

Watermarking

Add text or image watermarks to PDF pages:

Redaction

Remove sensitive content permanently:

Sanitization

Remove hidden metadata and embedded content:

Useful before sharing documents externally.

API Usage for Automation

Stirling PDF exposes a REST API for every operation, making it scriptable and automatable.

API documentation

Access the built-in Swagger documentation at http://your-server:8080/swagger-ui/index.html. Every feature available in the web interface has a corresponding API endpoint.

Example: Merge PDFs via API

curl -X POST "http://your-server:8080/api/v1/general/merge-pdfs" \
  -F "[email protected]" \
  -F "[email protected]" \
  -o merged.pdf

Example: OCR a scanned document

curl -X POST "http://your-server:8080/api/v1/misc/ocr-pdf" \
  -F "[email protected]" \
  -F "languages=eng" \
  -F "ocrType=Normal" \
  -o searchable.pdf

Example: Compress a PDF

curl -X POST "http://your-server:8080/api/v1/general/optimize-pdf" \
  -F "[email protected]" \
  -F "optimizeLevel=2" \
  -o compressed.pdf

Automation ideas

Integration with Paperless-ngx

A powerful combination: use Stirling PDF's API to OCR and clean scanned documents before dropping them into Paperless-ngx's consume folder. This gives you cleaner text extraction and better search results in Paperless.

#!/bin/bash
# OCR and clean a scanned PDF, then move to Paperless consume folder
for file in /scans/incoming/*.pdf; do
    curl -s -X POST "http://localhost:8080/api/v1/misc/ocr-pdf" \
        -F "fileInput=@$file" \
        -F "languages=eng" \
        -F "ocrType=Clean" \
        -o "/paperless/consume/$(basename $file)"
    rm "$file"
done

Comparison with Desktop and Online Alternatives

Tool Type Cost Privacy Features
Stirling PDF Self-hosted Free Full control Comprehensive
Adobe Acrobat Desktop $23/month Local processing Most complete
iLovePDF Online Free tier / $7/month Cloud upload Good
SmallPDF Online Free tier / $9/month Cloud upload Good
PDF24 Desktop + Online Free Local (desktop) Good
LibreOffice Draw Desktop Free Local processing Basic PDF editing

Adobe Acrobat is the gold standard for PDF manipulation, but $23/month is steep for occasional use. Stirling PDF covers 90% of what most people need from Acrobat at zero cost, with the added benefit of an API for automation.

The Honest Trade-offs

Stirling PDF is great if:

Stirling PDF is not ideal if:

Bottom line: Stirling PDF is one of those self-hosted tools that earns its place immediately. The first time you need to merge, compress, or OCR a PDF and you do it in 5 seconds without uploading anything to a sketchy website, it justifies the 2 minutes it took to deploy. The API makes it especially valuable as part of a document automation pipeline. For most people, it completely replaces the need for paid PDF tools.

Resources