locally hosted web application that allows you to perform various operations on PDF files
Go to file
Anthony Stirling 11d23a2d43
V2 Auto rename (#4244)
# Description of Changes

This pull request introduces the new "Auto Rename PDF" tool to the
frontend, enabling users to automatically rename PDF files based on
their content. The implementation includes UI components, parameter
handling, operation logic, localization, and enhancements to the file
response utilities to support backend-provided filenames. Below are the
most important changes grouped by theme:

**Feature: Auto Rename PDF Tool**

- Added the main `AutoRename` tool component (`AutoRename.tsx`) and
registered it in the tool registry, enabling selection and execution of
the auto-rename operation in the UI.
[[1]](diffhunk://#diff-3647ca39d46d109d122d4cd6cbfe981beb4189d05b1b446e5c46824eb98a4a88R1-R80)
[[2]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969R17)
[[3]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969L359-R366)
[[4]](diffhunk://#diff-29427b8d06a23772c56645fc4b72af2980c813605abc162e3d47c2e39d026d06L25-R26)
- Implemented the settings panel (`AutoRenameSettings.tsx`) and
parameter management hook (`useAutoRenameParameters.ts`), allowing users
to configure options such as using the first text as a fallback for the
filename.
[[1]](diffhunk://#diff-b2f9474c8e5a7a42df00a12ffd2d31a785895fe1096e8ca515e6af5633a4d648R1-R27)
[[2]](diffhunk://#diff-8798a1ef451233bf3a1bf8825c12c5b434ad1a17a1beb1ca21fd972fdaceb50cR1-R19)
- Created the operation hook (`useAutoRenameOperation.ts`) to handle API
requests, error handling, and result processing for the auto-rename
feature.

**Localization**

- Added English (US and GB) translations for the new tool, including UI
labels, descriptions, error messages, and settings.
[[1]](diffhunk://#diff-e4d543afa388d9eb8a423e45dfebb91641e3558d00848d70b285ebb91c40b249R1048-R1066)
[[2]](diffhunk://#diff-14c707e28788a3a84ed5293ff6689be73d4bca00e155beaf090f9b37c978babbR1321-R1339)

**File Response Handling Enhancements**

- Updated the file response processor and related hooks to support
preserving backend-provided filenames via the `Content-Disposition`
header, ensuring files are renamed according to backend results.
[[1]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0R11)
[[2]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0L49-R51)
[[3]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191R52-R58)
[[4]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191L175-R183)
[[5]](diffhunk://#diff-fa8af80f4d87370d58e3a5b79df675d201f0c3aa753eda89cec03ff027c4213dL13-R21)
[[6]](diffhunk://#diff-efa525dbdeceaeb5701aa3d2303bf1d533541f65a92d985f94f33b8e87b036d1R2-R37)

These changes collectively deliver a new advanced tool for users to
automatically rename PDFs, with robust parameter handling, user
interface integration, and proper handling of filenames as determined by
backend logic.
---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/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/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] 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/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

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

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-05 17:12:52 +01:00
.claude Undo Button -> review state. Result files added to recents (#4337) 2025-09-02 15:09:05 +01:00
.devcontainer
.github Add linting to frontend (#4341) 2025-09-04 14:08:28 +01:00
.vscode V2 Auto rename (#4244) 2025-09-05 17:12:52 +01:00
app JWT Auth into V2 (#4187) 2025-08-15 14:13:45 +01:00
devGuide
devTools
docker Revert "npm login" (#4299) 2025-08-26 14:06:29 +01:00
docs
exampleYmlFiles JWT Auth into V2 (#4187) 2025-08-15 14:13:45 +01:00
frontend V2 Auto rename (#4244) 2025-09-05 17:12:52 +01:00
gradle/wrapper
images
scripts
testing
.editorconfig Add linting to frontend (#4341) 2025-09-04 14:08:28 +01:00
.git-blame-ignore-revs
.gitattributes
.gitignore
.pre-commit-config.yaml
ADDING_TOOLS.md V2 flatten (#4358) 2025-09-05 11:25:30 +00:00
build.gradle JWT Auth into V2 (#4187) 2025-08-15 14:13:45 +01:00
CLAUDE.md V2 flatten (#4358) 2025-09-05 11:25:30 +00:00
CONTRIBUTING.md
DATABASE.md
DeveloperGuide.md
gradle.properties
gradlew
gradlew.bat
HowToUseOCR.md
launch4jConfig.xml
LICENSE
README.md
SECURITY.md
settings.gradle

Stirling-PDF

Docker Pulls Discord 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 for documentation)

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 40 languages!

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

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: