Stirling PDF

The open-source PDF platform you can run anywhere — edit, convert, sign, and automate PDFs without sending files to external servers.

86.1Kstars
7.5Kforks
Custom / Unknown
Java

Stirling PDF is a powerful, open-core PDF editing platform that lets individuals and organizations process documents entirely on their own infrastructure. From a personal desktop app to a server deployment with a full REST API, it covers the complete PDF workflow — merging, splitting, signing, redacting, converting, compressing, and OCR — all without routing documents through third-party cloud services.

Built on Spring Boot (Java) with a modern TypeScript/React frontend and a Tauri-based desktop client, Stirling PDF supports flexible deployment via Docker, bare metal, or Kubernetes. The platform includes enterprise-grade features such as SSO integration, detailed audit logging, no-code automation pipelines, and an AI-native layer for local LLM-assisted document processing. With over 81,000 GitHub stars, it has become the most widely adopted self-hosted PDF solution available.

The architecture separates the open-source core (MIT-licensed) from proprietary enterprise modules and SaaS components, all cleanly packaged in the same repository. This means self-hosters get access to the full toolset by default, while organizations needing team management, advanced security controls, or managed cloud deployment can opt into paid tiers. With 40+ language localizations, Cucumber-based end-to-end tests, and 550+ test files, the codebase reflects a mature, production-ready project maintained by an active team shipping multiple releases per month.

What You Get

  • 50+ PDF Tools in One Interface - Edit, merge, split, sign, redact, compress, rotate, watermark, and convert PDFs to and from images, Office formats, and more — all accessible through a unified web UI or REST API.
  • No-Code Automation Pipelines - Build document workflows visually in the UI and trigger them via API to process millions of PDFs in batch without writing a single line of code.
  • AI-Assisted PDF Processing - Connect a local LLM to summarize, classify, extract structured data, or auto-redact sensitive information from PDFs without sending documents to an external AI provider.
  • Enterprise SSO and Audit Logging - Integrate with SAML 2.0 and OAuth providers for single sign-on, enforce role-based access, and capture a full audit trail of all user actions for compliance reporting.
  • Flexible Deployment Options - Run via Docker with a one-line command, deploy on Kubernetes for HA production setups, install as a native desktop app via Tauri, or embed as a library — all from the same codebase.
  • Full REST API - Every tool is accessible as an HTTP endpoint, enabling programmatic integration with existing systems, automated document pipelines, and custom developer workflows.
  • 40+ Language UI Localization - Complete interface translations in over 40 languages with community-maintained translation files, making the platform usable by global teams without configuration.

Common Use Cases

  • Healthcare Document Redaction - Hospital IT teams deploy Stirling PDF on-premise to automatically redact patient identifiers from medical records before sharing, keeping PHI on internal infrastructure and maintaining HIPAA compliance.
  • Legal Contract Automation - Law firms use the REST API and pipeline builder to extract clauses, watermark drafts for version control, and convert finalized contracts to archivable PDF/A format in a single automated workflow.
  • Government Air-Gapped Processing - Defense and intelligence agencies run Stirling PDF on air-gapped networks to process classified documents — OCR, split, and redact without any network egress requirement.
  • Financial KYC Document Handling - Banks integrate the API into onboarding flows to extract and validate identity fields from uploaded PDFs, merge supporting documents, and stamp approval watermarks — all without cloud exposure.
  • Developer Document Microservice - Engineering teams embed Stirling PDF as a self-hosted microservice behind their product to provide in-app PDF generation, conversion, and signing without depending on third-party SaaS APIs.
  • Enterprise IT PDF Standardization - IT departments automate conversion of scanned images and legacy Word documents to searchable, compressed PDFs using scheduled pipeline runs triggered via the REST API.

Under The Hood

Architecture Stirling PDF follows a clear layered architecture with a Spring Boot Java backend, a React/TypeScript frontend, and a Tauri desktop shell — each communicating through well-defined REST APIs and sharing no business logic directly. The backend is modularized into distinct Gradle subprojects: a common utilities layer, a core application module, proprietary enterprise extensions, and a SaaS module — allowing the open-source core to remain cleanly separated from commercial additions. PDF processing logic is encapsulated in service classes and utility objects, with a strategy-like pattern for extensibility across the 50+ tools. Spring dependency injection ties everything together, ensuring loose coupling and testability across the entire stack. Profile-based activation at runtime determines which modules load, so the same JAR can serve the community edition, enterprise, or SaaS deployments without code changes.

Tech Stack The backend runs on Spring Boot 4 with Java 25, using Apache PDFBox and a custom JPDFium integration for high-fidelity PDF rendering and manipulation. Gradle orchestrates the multi-module build, with Spotless enforcing code formatting and a custom license compliance check validating all third-party dependencies against an OSI-approved whitelist. The frontend is built with TypeScript, React, and Tailwind CSS, embedding the EmbedPDF plugin ecosystem for in-browser PDF viewing, annotation, and redaction. The desktop client uses Tauri (Rust) to wrap the Spring Boot backend in a native OS application. Cucumber with Gherkin provides end-to-end behavioral tests, complemented by JUnit and Mockito for unit and integration coverage. Docker images are built using multi-stage Dockerfiles, and 38+ GitHub Actions workflows handle CI, security scanning, and deployment.

Code Quality With over 550 test files spanning unit tests, integration tests, and Cucumber end-to-end scenarios, Stirling PDF maintains extensive automated coverage. Tests use JUnit 5 with Mockito for mocking, and dynamic endpoint discovery tests validate that every registered API endpoint has proper configuration — a non-trivial quality gate. Code formatting is enforced by Spotless (Google Java Format) on the backend and ESLint 10 on the frontend, with pre-commit hooks running automatically. Error handling is explicit throughout, with custom exception types, structured logging via Logback/SLF4J, and graceful degradation for missing optional tools like Ghostscript. TypeScript strict typing is applied consistently across all frontend state, props, and API response models, catching errors at compile time rather than runtime.

What Makes It Unique Stirling PDF’s most distinctive technical trait is its open-core module system: MIT-licensed core functionality runs without restrictions, while proprietary modules (SSO, advanced auditing, SaaS billing) activate only when their JARs are present on the classpath — detected at runtime via class introspection and Spring profile switching. This means contributors can work on the full codebase in one repository with zero configuration friction. The EmbedPDF integration brings a production-quality in-browser PDF editor with bidirectional text support, annotation layers, and redaction rendering that rivals commercial solutions. The no-code pipeline builder serializes complex multi-step document workflows to JSON, enabling versioned automation without custom scripting. Combined with 40-language community-driven localization and a Tauri desktop app sharing the same backend, Stirling PDF is architecturally positioned as both a self-hosted microservice and a consumer-grade application in one codebase.

Self-Hosting

Stirling PDF uses a split licensing model. The core application and the majority of tools are released under the MIT License, which is permissive: you can use, modify, and distribute the code commercially without restrictions. However, components in the proprietary, saas, engine, and certain frontend subdirectories are covered by the Stirling PDF User License, which requires a paid subscription for production use. This means that while you can evaluate the full application for free, running it in a production environment at scale, or in business-critical contexts, legally requires a valid license from Stirling PDF Inc. The open-source core is genuinely useful for individuals and small teams, but any organization deploying Stirling PDF for internal business operations should review the User License terms at stirlingpdf.com/terms before proceeding.

Operationally, self-hosting Stirling PDF is straightforward via Docker — a single docker run command gets the server running. For production deployments, you are responsible for container orchestration (Kubernetes configs are provided), data persistence, backup of any user configuration or audit logs stored on disk, and applying security updates from the project’s frequent release cadence (roughly 4+ releases per month). The application itself is stateless by default for core PDF processing, so horizontal scaling is feasible, but teams enabling authentication, audit logging, or database-backed features will need to configure and maintain a connected database. The comprehensive documentation at docs.stirlingpdf.com and an active Discord community reduce the operational learning curve considerably.

Compared to the hosted SaaS tier (stirling.com), self-hosting means you forgo managed upgrades, cloud backups, SLA guarantees, and centralized team billing. The SaaS offering adds built-in team management, Supabase-backed user storage, and commercial support — features that the self-hosted enterprise tier can partially replicate but require you to operate. For privacy-sensitive workloads where documents must never leave your network, self-hosting is the only viable path, and Stirling PDF is purpose-built for exactly that use case.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search