MCPSERV.CLUB
Stirling-PDF

Stirling-PDF

Self-Hosted

Local web PDF editor with split, merge, convert and more

Active(100)
69.1kstars
1views
Updated 2 days ago
Stirling-PDF screenshot

Overview

Discover what makes Stirling-PDF powerful

Stirling‑PDF is a fully self‑hosted, web‑based PDF manipulation engine built to run inside Docker containers. From a developer’s perspective it is essentially a **microservice** that exposes a REST‑style API for a wide spectrum of PDF operations—merge, split, OCR, conversion, compression, and more. Internally it orchestrates a collection of open‑source libraries (such as *pdf-lib*, *MuPDF*, and *Poppler*) through a lightweight Go or Node.js façade, allowing the service to handle multiple concurrent jobs without persisting user data beyond the request lifecycle. This statelessness makes it ideal for CI/CD pipelines, automated document workflows, or embedding into larger enterprise systems.

API

Pipelines

Webhooks

Authentication

Overview

Stirling‑PDF is a fully self‑hosted, web‑based PDF manipulation engine built to run inside Docker containers. From a developer’s perspective it is essentially a microservice that exposes a REST‑style API for a wide spectrum of PDF operations—merge, split, OCR, conversion, compression, and more. Internally it orchestrates a collection of open‑source libraries (such as pdf-lib, MuPDF, and Poppler) through a lightweight Go or Node.js façade, allowing the service to handle multiple concurrent jobs without persisting user data beyond the request lifecycle. This statelessness makes it ideal for CI/CD pipelines, automated document workflows, or embedding into larger enterprise systems.

Architecture

The core stack is a Docker‑based Go runtime that bundles the PDF manipulation binaries. The service exposes HTTP endpoints and a WebSocket channel for real‑time progress updates, which are consumed by the bundled React front‑end. Configuration is driven entirely by environment variables or a JSON/YAML file, enabling zero‑touch deployment on any cloud provider that supports Docker (Kubernetes, ECS, DigitalOcean App Platform, etc.). When persistence is required—such as user authentication or audit logs—the application can be pointed to a PostgreSQL database via standard JDBC/PG drivers. The Docker image is intentionally minimal (≈200 MB) to reduce attack surface and accelerate startup times.

Core Capabilities

  • API: A comprehensive REST API (/api/v1/...) that accepts multipart/form‑data uploads, returns JSON status objects, and streams results back to the client. Endpoints are grouped by operation (e.g., /merge, /split, /convert).
  • Pipelines: Users can define “pipelines”—ordered lists of operations that run sequentially in a single job. Pipelines are stored as JSON and can be triggered programmatically, making it trivial to build multi‑step workflows.
  • Webhooks: On completion or failure, the service can POST a payload to a configured URL, allowing downstream services to react automatically.
  • Authentication: Optional JWT or OAuth2 support via a pluggable middleware layer. Enterprise features such as SSO (SAML/OIDC) are available through configuration flags.
  • File Handling: All uploads are stored in a temporary directory that is cleaned up after the job. The service can stream large PDFs directly from S3 or Azure Blob by using signed URLs, eliminating the need to load entire files into memory.

Deployment & Infrastructure

Stirling‑PDF is designed for horizontal scalability. Because each request is isolated, multiple container instances can be run behind a load balancer without session affinity. Docker Compose and Helm charts are provided for quick starts, while the image is compatible with any OCI‑compliant registry. For high availability, a single PostgreSQL replica can be used for user data, while the PDF processing layer remains stateless. The application requires only a modest CPU (≥ 2 cores) and 4 GB RAM to handle moderate workloads; burstable instances can process up to 100 concurrent jobs with the default thread pool.

Integration & Extensibility

The plugin architecture is intentionally simple: developers can inject custom middleware in Go or Node.js to extend request handling, add new authentication back‑ends, or modify response streams. The public API is fully documented on the official site and can be consumed by any language that supports HTTP clients. For advanced use cases, developers can fork the repository and replace underlying libraries (e.g., swap pdf-lib for a commercial PDF SDK) without touching the Docker runtime.

Developer Experience

Documentation is split into Getting Started, API Reference, and Advanced Configuration sections. Inline comments in the source code follow Go conventions, and unit tests cover 80 % of the core logic. The community is active on Discord and GitHub Discussions, providing rapid feedback for feature requests or security issues. The OpenSSF Scorecard badge demonstrates a mature security posture, and the project is MIT‑licensed, allowing unrestricted commercial use.

Use Cases

  1. CI/CD Document Generation – Automatically merge test reports, convert markdown to PDF, and archive results.
  2. Enterprise Document Workflows – Expose a secure API behind an internal gateway, allowing business units to programmatically compress or OCR documents.
  3. Self‑Hosted Web UI – Deploy the bundled React front‑end for end users who need a browser interface without exposing their PDFs to third‑party services.
  4. Data‑Privacy Compliance – Keep all processing in a private network; no data leaves the host, satisfying GDPR or HIPAA constraints.

Advantages

  • Performance: The use of compiled binaries and a stateless Go server yields sub‑second response times for small PDFs and graceful degradation under load.
  • Flexibility: The pipeline system lets developers compose arbitrary workflows without writing custom scripts.
  • Licensing & Security: MIT license + OpenSSF scorecard means no vendor lock‑in and a transparent audit trail.
  • Scalability: Stateless design, Docker containerization, and optional database backend make it trivial to scale horizontally or vertically.
  • Low Operational Overhead: Minimal runtime, automatic cleanup of temp files, and a single Docker image simplify maintenance.

For developers looking to embed robust PDF manipulation into their own services or provide a self‑hosted, privacy‑first document editor, Stirling‑PDF offers a mature, well‑documented foundation that can be extended and scaled with minimal friction.

Open SourceReady to get started?

Join the community and start self-hosting Stirling-PDF today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
NOASSERTION
Stars
69.1k
Technical Specs
Pricing
Open Source
Docker
Community
Supported OS
LinuxDocker
Author
Stirling-Tools
Stirling-Tools
Last Updated
2 days ago