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)
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:latestDocker Compose (with OCR languages)
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-stoppedFull Version (with LibreOffice)
# Full version includes Word/Excel/PPT conversion
docker run -d frooodle/s-pdf:latest-fatKey Features
API Access
Every operation is available via REST API:
# 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.pdfMulti-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 → OutputWhy 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常见问题
Q: Stirling PDF 支持中文 OCR 吗?
A: 支持。通过 LANGS 环境变量配置 chi_sim(简体中文)或 chi_tra(繁体中文)。首次使用会自动下载对应语言包。
Q: 普通版和 fat 版有什么区别? A: 普通版包含基础 PDF 操作。fat 版额外包含 LibreOffice,支持 PDF ↔ Word/Excel/PPT 互转。fat 版镜像约 1.5GB,普通版约 400MB。
Q: 处理大文件有限制吗? A: 自托管版本没有文件大小限制。处理速度取决于服务器配置。建议大文件 OCR 分配至少 2GB RAM。
来源与致谢
- GitHub: Stirling-Tools/Stirling-PDF — 76.5K+ ⭐
- 官网: stirlingpdf.io