Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ yarn-error.log*



/.idea
/.idea

# Claude Code
.claude/worktrees/
12 changes: 6 additions & 6 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import TabItem from '@theme/TabItem';

Stirling PDF exposes a simple API for easy integration with external scripts. You can access the API documentation in two ways:

1. Local Swagger UI at `/swagger-ui/index.html` on your Stirling-PDF instance
1. Local Swagger UI at `/swagger-ui/index.html` on your Stirling PDF instance
2. Online [Swagger Documentation](https://app.swaggerhub.com/apis-docs/Frooodle/Stirling-PDF/)

You can also access the documentation through the settings menu (gear icon in the top-right corner).

## Accessing API Documentation

### Local Swagger UI
Your Stirling-PDF instance includes built-in API documentation:
Your Stirling PDF instance includes built-in API documentation:
1. Navigate to `http://your-instance:port/swagger-ui/index.html`
2. Or append `/swagger-ui/index.html` to your Stirling-PDF URL
2. Or append `/swagger-ui/index.html` to your Stirling PDF URL
3. This provides an interactive documentation interface where you can:
- View all available endpoints
- Test API calls directly
Expand All @@ -41,7 +41,7 @@ When security is enabled, all API requests require authentication. There are two

### User-Specific API Keys
1. Obtain your API key:
- Log into Stirling-PDF
- Log into Stirling PDF
- Go to Account Settings (via the gear icon)
- Find your API key in the account details

Expand All @@ -67,9 +67,9 @@ This allows you to set a single API key that works regardless of user authentica

## API Limitations

Stirling-PDF's feature set is not entirely confined to the backend, hence not all functionalities are accessible via the API. Certain operations, such as the "view-pdf" or "visually sign", are executed exclusively on the front-end, and as such, they are only available through the Web-UI. If you encounter a situation where some API endpoints appear to be absent, it is likely attributable to these front-end exclusive features.
Stirling PDF's feature set is not entirely confined to the backend, hence not all functionalities are accessible via the API. Certain operations, such as the "view-pdf" or "visually sign", are executed exclusively on the front-end, and as such, they are only available through the Web-UI. If you encounter a situation where some API endpoints appear to be absent, it is likely attributable to these front-end exclusive features.

Stirling-PDF also has statistic and health endpoints to integrate with monitoring/dashboard applications.
Stirling PDF also has statistic and health endpoints to integrate with monitoring/dashboard applications.

## Example CURL Commands

Expand Down
2 changes: 1 addition & 1 deletion docs/Advanced Configuration/Other Customisations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem';
Stirling PDF offers various other customisation options, such as:

### Defaulting Language
Default language selection via the `SYSTEM_DEFAULTLOCALE` environment variable. Accepted values include `de-DE`, `fr-FR`, `ar-AR` and all other languages codes that are within Stirling-PDFs current list.
Default language selection via the `SYSTEM_DEFAULTLOCALE` environment variable. Accepted values include `de-DE`, `fr-FR`, `ar-AR` and all other languages codes that are within Stirling PDFs current list.

### Google Search Visibility (robots.txt)
Enable or disable search engine visibility with the `ALLOW_GOOGLE_VISIBILITY` variable.
Expand Down
16 changes: 8 additions & 8 deletions docs/Advanced Configuration/PDF to CBR Conversion.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Enabling PDF to CBR Conversion in Stirling-PDF
# Enabling PDF to CBR Conversion in Stirling PDF

## Overview

Stirling-PDF can convert PDF files into the Comic Book RAR (`.cbr`) format. This process relies on an external command-line utility, `rar`, which is not included by default. To enable this feature, you must first install the `rar` utility on your system and then make it accessible to Stirling-PDF.
Stirling PDF can convert PDF files into the Comic Book RAR (`.cbr`) format. This process relies on an external command-line utility, `rar`, which is not included by default. To enable this feature, you must first install the `rar` utility on your system and then make it accessible to Stirling PDF.

### What is a CBR file?

A CBR (Comic Book RAR) file is an archive used for distributing digital comic books. It is essentially a collection of sequential image files (e.g., JPEG, PNG) compressed into a single file using RAR compression.

While CBR is a popular format, it requires the proprietary `rar` utility for creation. Its more common, open-standard alternative is CBZ (Comic Book ZIP), which is supported by Stirling-PDF out of the box.
While CBR is a popular format, it requires the proprietary `rar` utility for creation. Its more common, open-standard alternative is CBZ (Comic Book ZIP), which is supported by Stirling PDF out of the box.

-----

Expand Down Expand Up @@ -63,7 +63,7 @@ sudo yum install rar # For CentOS 7
1. Download the "WinRAR and RAR command line tools" from [rarlab.com/download.htm](https://www.rarlab.com/download.htm).
2. Extract the downloaded archive.
3. Copy the `rar.exe` file to a folder that is included in your system's `PATH` environment variable. A common and reliable location is `C:\Windows\System32`.
4. If Stirling-PDF is already running, restart it to ensure it recognizes the updated `PATH`.
4. If Stirling PDF is already running, restart it to ensure it recognizes the updated `PATH`.

### macOS

Expand All @@ -75,13 +75,13 @@ brew install rar

-----

## Step 2: Configure Stirling-PDF
## Step 2: Configure Stirling PDF

After installing `rar` on your host system, follow the appropriate instructions for your environment.

### For Non-Docker Users

If you installed Stirling-PDF directly on your operating system (without Docker), no further configuration is needed. As long as the `rar` command is available in your system's `PATH`, Stirling-PDF will automatically (after restart) detect and use it.
If you installed Stirling PDF directly on your operating system (without Docker), no further configuration is needed. As long as the `rar` command is available in your system's `PATH`, Stirling PDF will automatically (after restart) detect and use it.

### For Docker Users

Expand Down Expand Up @@ -117,7 +117,7 @@ The host path must use forward slashes. For example, if you placed `rar.exe` in

## Step 3: Verification

Confirm that Stirling-PDF can access the `rar` command.
Confirm that Stirling PDF can access the `rar` command.

* **For Docker Users:** Execute a command inside the running container.

Expand Down Expand Up @@ -150,5 +150,5 @@ RAR is shareware. While it is free to use for personal, non-commercial purposes,
For broader compatibility and to avoid proprietary software, using the **CBZ (Comic Book ZIP)** format is highly recommended.

* CBZ uses the open and universal ZIP standard.
* The **PDF to CBZ** tool is enabled in Stirling-PDF by default and requires no extra software.
* The **PDF to CBZ** tool is enabled in Stirling PDF by default and requires no extra software.
* CBZ is supported by virtually all modern comic book reader applications.
6 changes: 3 additions & 3 deletions docs/Analytics-and-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Stirling‑PDF uses analytics to understand usage patterns and improve the appli

Stirling‑PDF uses two analytics services:

1. **[Scarf](https://scarf.sh)** a privacy‑friendly tool designed for open‑source projects.
2. **[PostHog](https://posthog.com)** an open‑source product analytics platform for detailed usage insights.
1. **[Scarf](https://scarf.sh)** - a privacy‑friendly tool designed for open‑source projects.
2. **[PostHog](https://posthog.com)** - an open‑source product analytics platform for detailed usage insights.

Both services are designed with privacy in mind and can be completely disabled.

Expand Down Expand Up @@ -164,7 +164,7 @@ Controls **all** analytics and whether a consent banner appears.
**Behavior**
- `false`: Disables **all** analytics (no consent banner; PostHog & Scarf are off).
- `true`: Allows analytics (banner still required for user consent before any capture).
- `null`/unset: **First‑run admin choice** on the first ever connection to a self‑hosted instance, the first visitor (assumed admin) is prompted to choose, and that choice sets the global behavior for all users (either disabling analytics or enabling the consent banner for others).
- `null`/unset: **First‑run admin choice** - on the first ever connection to a self‑hosted instance, the first visitor (assumed admin) is prompted to choose, and that choice sets the global behavior for all users (either disabling analytics or enabling the consent banner for others).

### 2) Component toggles

Expand Down
84 changes: 84 additions & 0 deletions docs/Configuration/Audit Logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
sidebar_position: 18
title: Audit Logging
tags: [enterprise, management, feature, advanced feature]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Audit Logging

> **Tier**: Enterprise

Logs every operation, who ran it, what tool, which files, when. All data is stored in the database.
We recommend external database setup when using this feature due to the potential volume.
Please note the data stored is customisable based on you and your organisations needs and legal requirements.


Settings are under `premium.enterpriseFeatures.audit`.

| Setting | Default | Description |
|---|---|---|
| `enabled` | `true` | Turn audit logging on or off |
| `level` | `2` | Verbosity: `0` = off, `1` = basic, `2` = standard, `3` = verbose |
| `retentionDays` | `90` | Days to keep audit records before purging (`0` = infinite retention) |
| `captureFileHash` | `false` | Store a SHA-256 hash of each processed file |
| `capturePdfAuthor` | `false` | Extract and store PDF author metadata |
| `captureOperationResults` | `false` | Store operation return values - high volume, use sparingly |

## Audit levels

| Level | What's recorded |
|---|---|
| `0` - OFF | Nothing |
| `1` - BASIC | File modifications only - PDF operations (compress, split, merge, etc.) and settings changes |
| `2` - STANDARD | BASIC + user actions (login/logout, account changes, general GET requests) |
| `3` - VERBOSE | STANDARD + continuous polling calls and all GET requests |

## Example

<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
premium:
enabled: true
key: your-enterprise-license-key
enterpriseFeatures:
audit:
enabled: true
level: 2
retentionDays: 365
captureFileHash: true
capturePdfAuthor: false
captureOperationResults: false
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
PREMIUM_ENABLED=true
PREMIUM_KEY=your-enterprise-license-key
PREMIUM_ENTERPRISEFEATURES_AUDIT_ENABLED=true
PREMIUM_ENTERPRISEFEATURES_AUDIT_LEVEL=2
PREMIUM_ENTERPRISEFEATURES_AUDIT_RETENTIONDAYS=365
PREMIUM_ENTERPRISEFEATURES_AUDIT_CAPTUREFILEHASH=true
PREMIUM_ENTERPRISEFEATURES_AUDIT_CAPTUREPDFAUTHOR=false
PREMIUM_ENTERPRISEFEATURES_AUDIT_CAPTUREOPERATIONRESULTS=false
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest
environment:
PREMIUM_ENABLED: true
PREMIUM_KEY: your-enterprise-license-key
PREMIUM_ENTERPRISEFEATURES_AUDIT_ENABLED: true
PREMIUM_ENTERPRISEFEATURES_AUDIT_LEVEL: 2
PREMIUM_ENTERPRISEFEATURES_AUDIT_RETENTIONDAYS: 365
PREMIUM_ENTERPRISEFEATURES_AUDIT_CAPTUREFILEHASH: true
```
</TabItem>
</Tabs>

> **Note on performance:** `captureFileHash` adds a SHA-256 calculation for every file processed - noticeable overhead at high volume. `captureOperationResults` stores full operation output in the database and can grow very large; only enable it when specifically needed.
6 changes: 3 additions & 3 deletions docs/Configuration/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
sidebar_position: 0
slug: /Configuration
title: Configuration Guide
description: Configure Stirling-PDF using environment variables, settings files, or in-app settings
description: Configure Stirling PDF using environment variables, settings files, or in-app settings
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Configuration Guide

Stirling-PDF can be configured in three ways, depending on your deployment and preferences.
Stirling PDF can be configured in three ways, depending on your deployment and preferences.

## Configuration Methods

Expand Down Expand Up @@ -114,7 +114,7 @@ For more details, see [System and Security Configuration](./System%20and%20Secur

**How language selection works:**

Stirling-PDF determines the interface language using this priority order:
Stirling PDF determines the interface language using this priority order:

1. **User's manual selection** (highest priority)
- When a user clicks the language globe icon and selects a language
Expand Down
Loading
Loading