| sidebar_position | 4 | ||||
|---|---|---|---|---|---|
| tags |
|
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Stirling PDF allows straightforward customization of the application name and appearance to make Stirling-PDF your own.
These settings control the visible application name:
appName- Defines the visible application name shown in the window name and navbar if navbar is not defined separatelyhomeDescription- The description displayed on the homepage under the navbar that first greets the userappNameNavbar- The app name shown within the navbar for all pages
These settings (in Settings.yml) control system behavior and customization capabilities:
showUpdate- Controls whether update notifications are displayedshowUpdateOnlyAdmin- When true, restricts update notifications to admin users only (requiresshowUpdate: true)
customHTMLFiles In Settings.yml Enables custom HTML file overrides (called fragments) when set to true
When customHTMLFiles is enabled, you can override the default templatesby placing your custom files in specific directories. The system uses a resource override mechanism where files in these custom directories take precedence over the default files.
customFiles/
├── static/ # Static assets (CSS, JS, images, etc.)
└── templates/ # HTML template files
The root path for custom files varies by installation type:
- Default/Docker Installation:
./customFiles/ - Windows Desktop:
%APPDATA%\Stirling-PDF\customFiles\ - MacOS Desktop:
~/Library/Application Support/Stirling-PDF/customFiles/ - Linux Desktop:
~/.config/Stirling-PDF/customFiles/
To override existing files, maintain the same directory structure as the original. Here are some examples with links to the original files you would be overriding:
To override a file:
- Navigate to the original file in the GitHub repository
- Copy its contents
- Create the same file path under your
customFilesdirectory following the same directory structure - Paste and modify the contents as needed
Note: When overriding templates, first copy the existing template from the source repository to maintain the base structure.
-
To replace the favicon:
customFiles/static/favicon.svgOriginal file: stirling-pdf/src/main/resources/static/favicon.svg
-
To override a Bootstrap icon font:
customFiles/static/css/fonts/bootstrap-icons.woffOriginal file: stirling-pdf/src/main/resources/static/css/fonts/bootstrap-icons.woff
-
To modify a template:
customFiles/templates/fragments/common.htmlOriginal file: stirling-pdf/src/main/resources/templates/fragments/common.html
The original files can be found in the GitHub repository under:
- Static files: stirling-pdf/src/main/resources/static/
- Templates (HTML files): stirling-pdf/src/main/resources/templates/
system:
showUpdate: false # Control update notification visibility
showUpdateOnlyAdmin: false # Restrict update notifications to admins
customHTMLFiles: false # Enable custom HTML/CSS overrides
```
**Option 1: Using Java Properties**
```bash
java -jar Stirling-PDF.jar \
-DAPP_HOME_NAME="New Application Name" \
-DSHOW_UPDATE=false \
-DSHOW_UPDATE_ONLY_ADMIN=false \
-DCUSTOM_HTML_FILES=true
```
**Option 2: Using Environment Variables**
```bash
export UI_APPNAME="Stirling PDF"
export UI_HOMEDESCRIPTION="Your locally hosted one-stop-shop for all your PDF needs."
export UI_APPNAVBARNAME="Stirling PDF"
export SYSTEM_SHOWUPDATE=false
export SYSTEM_SHOWUPDATEONLYADMIN=false
export SYSTEM_CUSTOMHTMLFILES=true
```