# Stirling PDF — Self-Hosted PDF Editor & Toolkit > Stirling PDF is the #1 open-source PDF tool on GitHub. Merge, split, convert, compress, OCR, sign, and edit PDFs — all self-hosted with no data leaving your server. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash docker run -d --name stirling-pdf -p 8080:8080 -v stirling-data:/usr/share/tessdata frooodle/s-pdf:latest ``` Open `http://localhost:8080` — start editing PDFs immediately, no account needed. ## Intro **Stirling PDF** is a self-hosted PDF manipulation tool that handles virtually every PDF operation you might need. With 76.5K+ GitHub stars, it's the most popular PDF application on GitHub, providing merge, split, convert, compress, OCR, sign, watermark, and dozens more operations — all through a clean web interface with zero data leaving your server. ## What Stirling PDF Does 50+ PDF operations organized by category: **Page Operations** - Merge multiple PDFs into one - Split PDF by pages, size, or bookmarks - Rotate, reorder, and remove pages - Extract specific page ranges - Add page numbers **Conversion** - PDF ↔ Image (PNG, JPEG, TIFF, WebP) - PDF → Word (DOCX), Excel, PowerPoint - HTML → PDF, Markdown → PDF - PDF ↔ PDFA (archival format) **Security** - Add/remove password protection - Add digital signatures - Redact sensitive content - Add watermarks (text or image) - Set permissions (print, copy, edit) **Document Processing** - OCR (extract text from scanned PDFs) - Compress PDF file size - Flatten forms - Extract images from PDF - Add/edit metadata **Advanced** - Compare two PDFs visually - Auto-rename based on content - Multi-page layout (2-up, booklet) - Repair corrupted PDFs ## Self-Hosting ### Docker (Simple) ```bash docker run -d --name stirling-pdf -p 8080:8080 -v ./training-data:/usr/share/tessdata -v ./configs:/configs -e DOCKER_ENABLE_SECURITY=false frooodle/s-pdf:latest ``` ### Docker Compose (with OCR languages) ```yaml services: stirling-pdf: image: frooodle/s-pdf:latest ports: - "8080:8080" volumes: - ./training-data:/usr/share/tessdata - ./configs:/configs - ./logs:/logs environment: DOCKER_ENABLE_SECURITY: "false" INSTALL_BOOK_AND_ADVANCED_HTML_OPS: "true" LANGS: "zh_sim,zh_tra,eng,jpn,kor" # OCR languages restart: unless-stopped ``` ### Full Version (with LibreOffice) ```bash # Full version includes Word/Excel/PPT conversion docker run -d frooodle/s-pdf:latest-fat ``` ## Key Features ### API Access Every operation is available via REST API: ```bash # Merge PDFs curl -X POST http://localhost:8080/api/v1/general/merge-pdfs -F "fileInput=@file1.pdf" -F "fileInput=@file2.pdf" -o merged.pdf # Convert PDF to images curl -X POST http://localhost:8080/api/v1/convert/pdf/img -F "fileInput=@document.pdf" -F "imageFormat=png" -F "dpi=300" -o images.zip # OCR a scanned PDF curl -X POST http://localhost:8080/api/v1/misc/ocr-pdf -F "fileInput=@scanned.pdf" -F "languages=chi_sim+eng" -o ocr-result.pdf # Compress PDF curl -X POST http://localhost:8080/api/v1/general/optimize-pdf -F "fileInput=@large.pdf" -F "optimizeLevel=3" -o compressed.pdf ``` ### Multi-Language OCR Stirling PDF uses Tesseract OCR with support for 100+ languages: | Language | Code | |----------|------| | English | eng | | Simplified Chinese | chi_sim | | Traditional Chinese | chi_tra | | Japanese | jpn | | Korean | kor | | German | deu | | French | fra | | Spanish | spa | ### Pipeline Operations Chain multiple operations together: ``` Input PDF → OCR → Compress → Add Watermark → Password Protect → Output ``` ## Why Self-Host PDF Tools? ``` Cloud PDF tools (iLovePDF, SmallPDF, etc.): ✗ Your documents uploaded to third-party servers ✗ File size limits on free tier ✗ Monthly subscription for full features ✗ Privacy concerns for sensitive documents Stirling PDF: ✓ Documents never leave your server ✓ No file size limits ✓ All features free, forever ✓ Perfect for sensitive/legal/medical documents ``` ## FAQ **Q: Does Stirling PDF support Chinese OCR?** A: Yes. Configure `chi_sim` (Simplified Chinese) or `chi_tra` (Traditional Chinese) via the LANGS environment variable. Language packs download automatically on first use. **Q: What's the difference between the standard and "fat" images?** A: The standard image includes basic PDF operations. The fat image additionally bundles LibreOffice, enabling PDF ↔ Word/Excel/PPT conversion. Fat image is about 1.5GB; standard is about 400MB. **Q: Any file size limits?** A: The self-hosted version has no file size limit. Processing speed depends on server resources. For large-file OCR, allocate at least 2GB RAM. ## Source & Thanks - GitHub: [Stirling-Tools/Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF) — 76.5K+ ⭐ - Website: [stirlingpdf.io](https://stirlingpdf.io) --- Source: https://tokrepo.com/en/workflows/stirling-pdf-self-hosted-pdf-editor-toolkit-fc325975 Author: Script Depot