locally hosted web application that allows you to perform various operations on PDF files
Go to file
Omar Ahmed Hassan b4451da2f4
Fix displayed identical fonts in sign PDF (#2751)
# Description of Changes

### Changes:
- Add a new custom select to display fonts correctly and to allow more
styling flexibility in Sign PDF feature by hiding the original
`<select>` element (`display: none;`) and wrap it with a `<div>` and
then create a custom selection menu using `<div>`s and CSS to achieve
the required results due to the limitations of `<select>` and `<option>`
while still preserving the hidden `<select>` for form submission.

### Why was the change made?
1. A bug that caused font families to not be displayed in Firefox.
2. Select/Option element are not flexible when it comes to styling
(compared to DIVs for example) but bullet point `1.` is of higher
priority.

### UI Changes:
- Dark Mode:
   - Before:

![image](https://github.com/user-attachments/assets/37f79c81-8155-4430-9e36-2b4cc2a442e6)

   - After:

![image](https://github.com/user-attachments/assets/e6a2b209-0d8f-4ff2-94ea-54827706d0cd)

- Light Mode:
   - Before:

![image](https://github.com/user-attachments/assets/c5356899-6be9-497b-8ad9-d50e6bd077d5)

   - After: 

![image](https://github.com/user-attachments/assets/29373b1a-cfa1-48a2-9040-3ed2fd5f7fd3)

Note:
- Changes in `sign.js` are between the lines 95-228, as it seems the
file was auto-formatted affecting whitespaces and
single_quotes/double_quotes.


#### Useful quotes from MDN:

> [Styling with
CSS](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#styling_with_css)
Styling the <option> element is highly limited. Options don't inherit
the font set on the parent. In Firefox, only
[color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) and
[background-color](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color)
can be set, however in Chrome and Safari it's not possible to set any
properties. You can find more details about styling in [our guide to
advanced form
styling](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Advanced_form_styling).

#### Useful references:
- [Option
Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#styling_with_css)
- [Select
Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)
- [Advanced Form
Styling](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Advanced_form_styling)

Closes #1575

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [x] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-01-20 12:11:31 +00:00
.github Add: check for duplicate keys (#2749) 2025-01-20 10:52:23 +00:00
.vscode
cucumber Pdf to markdown (#2730) 2025-01-17 22:18:55 +00:00
docs
exampleYmlFiles 🤖 format everything with pre-commit by <github-actions[bot]> (#2685) 2025-01-14 13:55:46 +00:00
gradle Pdf to markdown (#2730) 2025-01-17 22:18:55 +00:00
images
pipeline/defaultWebUIConfigs
scripts Update README.md to add Slovenian (Slovenščina) (sl_SI) (#2735) 2025-01-18 12:04:17 +00:00
src Fix displayed identical fonts in sign PDF (#2751) 2025-01-20 12:11:31 +00:00
testdriver Add tests via TestDriverAI (#1957) (#2005) 2025-01-13 19:06:48 +00:00
.git-blame-ignore-revs
.gitattributes
.gitignore #2418 updating jpackage config (#2713) 2025-01-17 12:25:02 +00:00
.pre-commit-config.yaml Fix: Pinned-Dependencies sync_files.yml (#2660) 2025-01-10 11:25:23 +00:00
build.gradle outdated Gradle functions to the Gradle 9.0 standard (#2740) 2025-01-18 20:07:08 +00:00
CONTRIBUTING.md Move docs to website (#2571) 2024-12-30 15:49:28 +00:00
DATABASE.md Adds manual backup creation 2024-12-17 23:23:16 +01:00
DeveloperGuide.md Pdf to markdown (#2730) 2025-01-17 22:18:55 +00:00
Dockerfile [Snyk] Security upgrade alpine from 3.20.3 to 3.21.2 (#2669) 2025-01-12 15:53:10 +00:00
Dockerfile.fat [Snyk] Security upgrade alpine from 3.20.3 to 3.21.2 (#2669) 2025-01-12 15:53:10 +00:00
Dockerfile.ultra-lite [Snyk] Security upgrade alpine from 3.20.3 to 3.21.2 (#2669) 2025-01-12 15:53:10 +00:00
gradle.properties update gradle-wrapper binaries (#2671) 2025-01-12 13:46:40 +00:00
gradlew update gradle-wrapper binaries (#2671) 2025-01-12 13:46:40 +00:00
gradlew.bat update gradle-wrapper binaries (#2671) 2025-01-12 13:46:40 +00:00
HowToAddNewLanguage.md expand: check language properties (#2724) 2025-01-16 22:03:54 +00:00
HowToUseOCR.md Improve Markdown documentation a bit 2024-12-22 17:37:58 +08:00
lauch4jConfig.xml
LICENSE
README.md 📝 Sync translation files + Update README.md (Translation Progress Table) (#2747) 2025-01-18 23:39:06 +00:00
SECURITY.md Improve Markdown documentation a bit 2024-12-22 17:37:58 +08:00
settings.gradle
test2.sh rename 2024-12-22 11:17:22 +00:00
test.sh test all pages load correctly (#2699) 2025-01-14 13:47:16 +00:00
USERS.md Create USERS.md (#2700) 2025-01-14 15:32:15 +00:00

Stirling-PDF

Docker Pulls Discord Docker Image Version (tag latest semver) OpenSSF Scorecard GitHub Repo stars

Stirling PDF - Open source locally hosted web PDF editor | Product Hunt Deploy to DO

Stirling-PDF is a robust, locally hosted web-based PDF manipulation tool using Docker. It enables you to carry out various operations on PDF files, including splitting, merging, converting, reorganizing, adding images, rotating, compressing, and more. This locally hosted web application has evolved to encompass a comprehensive set of features, addressing all your PDF requirements.

All files and PDFs exist either exclusively on the client side, reside in server memory only during task execution, or temporarily reside in a file solely for the execution of the task. Any file downloaded by the user will have been deleted from the server by that point.

Homepage: https://stirlingpdf.com

All documentation available at https://docs.stirlingpdf.com/

stirling-home

Features

  • 50+ PDF Operations
  • Parallel file processing and downloads
  • Dark mode support
  • Custom download options
  • Custom 'Pipelines' to run multiple features in a automated queue
  • API for integration with external scripts
  • Optional Login and Authentication support (see here for documentation)
  • Database Backup and Import (see here for documentation)
  • Enterprise features like SSO see here

PDF Features

Page Operations

  • View and modify PDFs - View multi-page PDFs with custom viewing, sorting, and searching. Plus, on-page edit features like annotating, drawing, and adding text and images. (Using PDF.js with Joxit and Liberation fonts)
  • Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages
  • Merge multiple PDFs into a single resultant file
  • Split PDFs into multiple files at specified page numbers or extract all pages as individual files
  • Reorganize PDF pages into different orders
  • Rotate PDFs in 90-degree increments
  • Remove pages
  • Multi-page layout (format PDFs into a multi-paged page)
  • Scale page contents size by set percentage
  • Adjust contrast
  • Crop PDF
  • Auto-split PDF (with physically scanned page dividers)
  • Extract page(s)
  • Convert PDF to a single page
  • Overlay PDFs on top of each other
  • PDF to a single page
  • Split PDF by sections

Conversion Operations

  • Convert PDFs to and from images
  • Convert any common file to PDF (using LibreOffice)
  • Convert PDF to Word/PowerPoint/others (using LibreOffice)
  • Convert HTML to PDF
  • Convert PDF to XML
  • Convert PDF to CSV
  • URL to PDF
  • Markdown to PDF

Security & Permissions

  • Add and remove passwords
  • Change/set PDF permissions
  • Add watermark(s)
  • Certify/sign PDFs
  • Sanitize PDFs
  • Auto-redact text

Other Operations

  • Add/generate/write signatures
  • Split by Size or PDF
  • Repair PDFs
  • Detect and remove blank pages
  • Compare two PDFs and show differences in text
  • Add images to PDFs
  • Compress PDFs to decrease their filesize (using qpdf)
  • Extract images from PDF
  • Remove images from PDF
  • Extract images from scans
  • Remove annotations
  • Add page numbers
  • Auto-rename files by detecting PDF header text
  • OCR on PDF (using Tesseract OCR)
  • PDF/A conversion (using LibreOffice)
  • Edit metadata
  • Flatten PDFs
  • Get all information on a PDF to view or export as JSON
  • Show/detect embedded JavaScript

📖 Get Started

Visit our comprehensive documentation at docs.stirlingpdf.com for:

  • Installation guides for all platforms
  • Configuration options
  • Feature documentation
  • API reference
  • Security setup
  • Enterprise features

Supported Languages

Stirling-PDF currently supports 39 languages!

Language Progress
Arabic (العربية) (ar_AR) 90%
Azerbaijani (Azərbaycan Dili) (az_AZ) 89%
Basque (Euskara) (eu_ES) 51%
Bulgarian (Български) (bg_BG) 86%
Catalan (Català) (ca_CA) 81%
Croatian (Hrvatski) (hr_HR) 87%
Czech (Česky) (cs_CZ) 87%
Danish (Dansk) (da_DK) 86%
Dutch (Nederlands) (nl_NL) 85%
English (English) (en_GB) 100%
English (US) (en_US) 100%
French (Français) (fr_FR) 92%
German (Deutsch) (de_DE) 100%
Greek (Ελληνικά) (el_GR) 98%
Hindi (हिंदी) (hi_IN) 99%
Hungarian (Magyar) (hu_HU) 96%
Indonesian (Bahasa Indonesia) (id_ID) 87%
Irish (Gaeilge) (ga_IE) 79%
Italian (Italiano) (it_IT) 99%
Japanese (日本語) (ja_JP) 90%
Korean (한국어) (ko_KR) 99%
Norwegian (Norsk) (no_NB) 79%
Persian (فارسی) (fa_IR) 95%
Polish (Polski) (pl_PL) 86%
Portuguese (Português) (pt_PT) 98%
Portuguese Brazilian (Português) (pt_BR) 97%
Romanian (Română) (ro_RO) 81%
Russian (Русский) (ru_RU) 99%
Serbian Latin alphabet (Srpski) (sr_LATN_RS) 64%
Simplified Chinese (简体中文) (zh_CN) 90%
Slovakian (Slovensky) (sk_SK) 75%
Slovenian (Slovenščina) (sl_SI) 97%
Spanish (Español) (es_ES) 87%
Swedish (Svenska) (sv_SE) 87%
Thai (ไทย) (th_TH) 86%
Tibetan (བོད་ཡིག་) (zh_BO) 95%
Traditional Chinese (繁體中文) (zh_TW) 99%
Turkish (Türkçe) (tr_TR) 83%
Ukrainian (Українська) (uk_UA) 73%
Vietnamese (Tiếng Việt) (vi_VN) 80%

Stirling PDF Enterprise

Stirling PDF offers an Enterprise edition of its software. This is the same great software but with added features, support and comforts. Check out our Enterprise docs

🤝 Looking to contribute?

Join our community: