Commit Graph

211 Commits

Author SHA1 Message Date
Ludy
7f7d6fd1c9
feat(convert): add PDF to Video converter (FFmpeg) with MP4/WebM support (#4704)
# Description of Changes

This pull request introduces support for FFmpeg as a new external tool
in the application. It adds configuration options for FFmpeg session
limits and timeouts, updates the process execution and tool-checking
utilities to handle FFmpeg, and expands endpoint configuration to
include FFmpeg-dependent features. Corresponding unit tests have also
been added to ensure FFmpeg detection works as expected.

**FFmpeg Integration and Configuration:**

* Added FFmpeg session limit and timeout configuration options to
`ApplicationProperties`, with default values and getter methods.
[[1]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R631)
[[2]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R672-R675)
[[3]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R702)
[[4]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R743-R746)
* Updated `ProcessExecutor` to recognize FFmpeg as a process type, and
to use the new session limit and timeout configuration for FFmpeg
processes.
[[1]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aL305-R316)
[[2]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR74-R78)
[[3]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR133-R137)

**Tool Detection and Exception Handling:**

* Implemented `isFfmpegAvailable()` in `CheckProgramInstall` to detect
FFmpeg installation, with caching for efficiency.
[[1]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R14)
[[2]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R60-R78)
* Added a specific exception factory method for missing FFmpeg in
`ExceptionUtils`.

**Endpoint Configuration:**

* Registered the new `pdf-to-video` endpoint under the "Convert",
"Java", and "FFmpeg" groups, and updated the tool group logic to include
"FFmpeg".
[[1]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R265)
[[2]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R395)
[[3]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R452-R454)
[[4]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437L496-R502)

**Testing Enhancements:**

* Added and updated unit tests in `CheckProgramInstallTest` to verify
FFmpeg detection, including scenarios for installed, not installed, and
caching behavior.
[[1]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR29)
[[2]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR38-R45)
[[3]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR67-R75)
[[4]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR222-R262)

---

## 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/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)
- [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/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.
2025-10-30 22:54:33 +00:00
albanobattistella
43e0d73338
Update messages_it_IT.properties (#4697)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.
2025-10-30 21:17:09 +00:00
Balázs Szücs
11bb8bf1fd
Update Hungarian translations (#4698)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2025-10-30 21:09:33 +00:00
stirlingbot[bot]
85ccf502a8
🤖 format everything with pre-commit by stirlingbot (#4771)
Auto-generated by [create-pull-request][1] with **stirlingbot**

[1]: https://github.com/peter-evans/create-pull-request

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-30 21:08:38 +00:00
Ludy
14e3819945
🌐 Sync Translations + Update README Progress Table (#4783)
# Description of Changes


1. Synchronization of Translation Files
Updated translation files (messages_*.properties) to reflect changes in
the reference file messages_en_GB.properties.
Ensured consistency and synchronization across all supported language
files.
Highlighted any missing or incomplete translations.

2. Update README.md
Generated the translation progress table in README.md.
Added a summary of the current translation status for all supported
languages.
Included up-to-date statistics on translation coverage.


---

## 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.
2025-10-30 20:48:15 +00:00
Balázs Szücs
a7900aead8
refactor(tests): replaced redundant setups, simplified exception handling, and optimized code readability. (#4710)
# Description of Changes

This pull request primarily refactors and improves the test code across
several modules, focusing on modernization, simplification, and
consistency of assertions and test setup. The changes include formatting
updates and improvements to utility methods. These updates help make the
tests easier to maintain and read, and ensure they use current best
practices.

**Test code modernization and assertion improvements:**

* Replaced legacy assertion methods such as `assertTrue(x instanceof Y)`
with more specific `assertInstanceOf` assertions in multiple test files,
improving clarity and type safety.
* Updated exception assertion checks to use `assertInstanceOf` for error
types instead of `assertTrue`, ensuring more precise test validation.
* Refactored test setup in `ResourceMonitorTest` to use `final` for
`AtomicReference` fields, clarifying intent and thread safety.
* Changed some test method signatures to remove unnecessary `throws
Exception` clauses, simplifying the test code.

**Test code simplification and cleanup:**

* Removed unused mock fields and simplified array initializations in
`AutoJobPostMappingIntegrationTest`, streamlining test setup and
reducing clutter.
* Updated YAML string initialization in
`ApplicationPropertiesDynamicYamlPropertySourceTest` to use Java text
blocks for improved readability.
* Improved null handling in assertions for collection validity checks.
* Updated byte array encoding to use `StandardCharsets.UTF_8` for
reliability and clarity.

**PDF document factory test refactoring:**

* Refactored `CustomPDFDocumentFactoryTest` to move helper methods for
inflating PDFs and writing temp files to the top of the class, and
restructured parameterized tests for better organization and
maintainability.



<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-30 19:39:55 +00:00
Balázs Szücs
83922c4131
feat(compress): add advanced compression parameters and better optimization levels (#4703)
# Description of Changes

This PR reworks the compression endpoints, to be more consistent and
apply better compression on higher levels. Some improvement on lower is
also expected.

### Overview:
- Added new global flags: --recompress-flate --compress-streams=y
--object-streams=generate
- Added --decode-level=generalized, so that if the original PDF was
poorly compressed then, it can re-compress it better
- Added --stream-data=compress for better compression of vector/text
parts
- Now conditional: --preserve-unreferenced kept only for safe levels ≤3
- Added --optimize-images --jpeg-quality 35–75 depending on level (this
brings significant drop in file size, compared to earlier.)
- Added QPDF_ZOPFLI for level ≥8 which is better algorithm for
compressing JPEG. Comes with approx 5% gain per JPEG on PDFs. See here
for details:
https://qpdf.readthedocs.io/en/stable/cli.html#zopfli-compression-algorithm
- level 9, Ghostscript uses strongest downsampling (72/72/150) and CMYK
-> RGB

### Images:
- Scale factor now ramps 1 -> 9: 0.98, 0.95, 0.88, 0.78, 0.68, 0.58,
0.48, 0.38, 0.28.
- JPEG quality ramps 1 -> 9: 0.92, 0.88, 0.85, 0.80, 0.72, 0.65, 0.55,
0.45, 0.35.

### Results:
<img width="1491" height="731" alt="create-ms_pdf_sizes"
src="https://github.com/user-attachments/assets/43ed2ce2-7524-4c03-8689-96a6cb68d046"
/>

<img width="1481" height="731" alt="img-doc_pdf_sizes"
src="https://github.com/user-attachments/assets/3a217c33-3551-44ac-b499-8283cb36cf5d"
/>

<img width="1470" height="731" alt="lorem-ipsum_pdf_sizes"
src="https://github.com/user-attachments/assets/12a6bc07-1d4b-4648-a66e-ba22d21a1202"
/>
<img width="1482" height="731" alt="pdf-dev-example_pdf_sizes"
src="https://github.com/user-attachments/assets/00632d91-f7b9-4310-a283-f0fca9c922d5"
/>
<img width="1470" height="731" alt="sample-1_pdf_sizes"
src="https://github.com/user-attachments/assets/317a26c2-dd1a-4d63-a578-279b14fd9f37"
/>

Sample files used:


[image-doc.pdf](https://github.com/user-attachments/files/22984417/image-doc.pdf)

[lorem-ipsum.pdf](https://github.com/user-attachments/files/22984418/lorem-ipsum.pdf)
[Create Microsoft Word Document
Templates.pdf](https://github.com/user-attachments/files/22984419/Create.Microsoft.Word.Document.Templates.pdf)

[sample-1.pdf](https://github.com/user-attachments/files/22984420/sample-1.pdf)

### But is it better than the old? (On level 9)
#### Old vs new:
- image-doc: 1.0 MB vs 454 KB
- create-word: 426 KB vs 247 KB
- lorem-ipsum: 44.7 KB vs 44.4


Most of changes are focused on images, so more images = better gains.
Even on lorem-ipsum text PDF (with no images) there still some gains but
not significant.

(so, it is better)

Closes: #4442
Closes: #4720


<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/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)

- [x] 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-30 18:13:11 +00:00
Balázs Szücs
9197c24606
test: Add comprehensive unit tests for GetInfoOnPDF, covering metadata extraction, encryption, permissions, compliance, validation, and error handling scenarios (#4706)
# Description of Changes


Added 27 JUnit tests for getInfoOnPDF covering the following
functionality:

### Basic Functionality
- Valid PDF processing
- Basic info extraction (file size, page count, word count)
- Multi-page PDF handling

### Metadata Extraction
- All metadata fields (title, author, dates, etc.)
- Missing metadata handling

### Encryption & Permissions
- Encryption detection
- All permission types

### Form Fields
- Form field structure
- PDFs without forms

### Per-Page Information
- Page dimensions and standard sizes (A4, Letter, etc.)
- Page rotation

### Validation & Error Handling
- Null file rejection
- Empty file rejection
- File size limit (100MB) validation

### Static Helper Methods
- Page orientation detection (Landscape/Portrait/Square)
- Page size identification (parameterized tests)
- PDF/A standard checking
- Conformance level extraction

### Real PDF Files
- Testing with actual PDF files from resources

### Compliance Testing
- PDF/A, PDF/X, PDF/E, PDF/UA compliance detection

### Image Statistics
- Image statistics extraction



<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-30 18:03:34 +00:00
Balázs Szücs
311f6c8a3a
fix(pipeline): Update isZip method to validate against filename extensions, and keep comic archives zipped (#4741)
# Description of Changes

This pull request updates the logic for detecting and handling zip files
in the `PipelineProcessor` to distinguish between standard zip files and
comic book archive formats (CBZ/CBR). The changes ensure that files with
`.cbz` extensions are not treated as zip files for unzipping purposes.

**Update to zip file detection and extraction:**

* Modified the `isZip` method to take an optional `filename` parameter
and treat files ending with `.cbz` or as non-zip, preventing them from
being unzipped automatically.
* Updated all usages of `isZip` to pass the filename where available,
ensuring the new logic is applied during output file processing and
nested unzipping.

Closes: #4740


<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-30 17:59:43 +00:00
FdaSilvaYY
76d767e038
Improve French translations and update ignore_translation.toml (#4780)
# Description of Changes
- Update French translations in messages_fr_FR.properties
- Update ignore_translation.toml for various languages, in order to
improve fr_FR translation progress.
- Fix some few typos in messages_en_GB.properties

I hope this PR will reach more than 95% Progress in fr_FR translation.
2025-10-30 17:58:37 +00:00
Ludy
0f7ea1aed1
feat(signature): add SVG file support for saved signatures (#4742)
This update adds full support for SVG signature files within the **Sign
module**.
Previously, SVG images could be uploaded and used directly but did not
appear under the “Saved Signatures” section.

### What was changed
- **`SignatureService`**:  
Extended `isImageFile()` method to include `.svg` file extension,
ensuring SVGs are recognized as valid image files.
- **`SignatureController`**:  
Enhanced response handling using `MediaTypeFactory` to dynamically
determine and return the correct `MediaType` based on the file name.
This allows serving `image/svg+xml` for SVG files instead of the
previous hardcoded `image/jpeg`.

### Why the change was made
SVG signature files were not appearing in “Saved Signatures” even though
they could be uploaded and used manually.
This fix ensures consistent handling and display of SVG images alongside
other image types (JPG, PNG, GIF).

Closes #4731

---

## 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/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)
- [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/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.
2025-10-30 10:09:52 +00:00
Angel
e715f14c0a
🌐 Update messages_ru_RU.properties (#4774)
Updated Russian translation
2025-10-30 09:48:31 +00:00
OteJlo
7c5ee4fac6
Fix French formatting and grammar (#4775)
Correction and improvement of some errors in the French translations
2025-10-30 09:48:01 +00:00
Ludy
56afa9e21a
refactor(api): adjust default values and extend schema for stamp and watermark requests (#4632)
# Description of Changes

This refactor updates several API request models to better align with
expected defaults and extend supported options:

- **SplitPdfByChaptersRequest**
  - `includeMetadata`: default changed from `true` → `false`
  - `allowDuplicates`: default changed from `true` → `false`
  - `bookmarkLevel`: default changed from `2` → `0`

- **SplitPdfBySectionsRequest**
  - `merge`: default changed from `true` → `false`

- **AddStampRequest**
  - Added `"thai"` to `allowableValues` for the `alphabet` field
- Updated default `position` from `5` (middle-center) → `8` (top-center)

- **AddWatermarkRequest**
  - Added `"thai"` to `allowableValues` for the `alphabet` field

**Reason for change:**
These modifications bring the API defaults in line with real-world usage
expectations and improve multilingual support (adding Thai alphabet).


---

## 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/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)
- [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/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.
2025-10-29 23:38:10 +00:00
Ludy
e4cf8d800b
refactor(core): parallel, timeout-safe external dependency probes with version gating + tests (#4640)
# Description of Changes

**What was changed**
- Rewrote `ExternalAppDepConfig` to:
- Run dependency probes in parallel with per-call timeouts to avoid
startup hangs on broken PATHs.
- Support both Unix (`command -v`) and Windows (`where`) lookups in a
single codepath with a fallback `--version` probe.
- Centralize version extraction via a regex (`(\d+(?:\.\d+){0,2})`) and
add a small `Version` comparator (major.minor.patch).
- Enforce a minimum WeasyPrint version (`>= 58.0`), disabling affected
group(s) if the requirement is not met.
  - Improve Python/OpenCV handling:
- Resolve interpreter (`python3` → `python`) and check `import cv2`;
disable OpenCV group if unavailable.
- Disable both Python and OpenCV groups when no interpreter is present.
- Keep the command→group mapping immutable and include
runtime-configured paths for WeasyPrint/Unoconvert.
- Improve feature name formatting derived from endpoints (e.g.,
`pdf-to-html` → `PDF To Html`, `img-extract` → `Image Extract`).
- Ensure thread pool shutdown and emit a consolidated disabled-endpoints
summary at the end of checks.
- Added `ExternalAppDepConfigTest` (JUnit + Mockito) to cover:
  - Mapping includes runtime paths and core commands.
- Endpoint-to-feature formatting and capitalization rules (`pdf` →
`PDF`, mixed case normalization).
  - WeasyPrint command detection (`/custom/weasyprint`, name contains).
  - Version comparison edge cases (e.g., `58`, `57.9.2`, `58.beta`).

**Why the change was made**
- Prevents startup stalls caused by long-running or broken shell
lookups.
- Unifies platform-specific logic and de-duplicates probing/formatting
across the codebase.
- Introduces explicit version gating for WeasyPrint to ensure feature
reliability and predictable behavior.
- Makes dependency handling more observable (structured logs) and
maintainable (immutable mappings, focused helpers).
- Improves resilience of Python/OpenCV-dependent features across diverse
environments.

---

## 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/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)
- [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/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: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 23:30:10 +00:00
Ludy
fdc8fab545
refactor(core): centralize temp file handling in CompressController via TempFileManager (#4629)
# Description of Changes

## What was changed
- Introduced `TempFileManager` and injected it into `CompressController`
to centralize and control temporary file lifecycle.
- Replaced ad-hoc `Files.createTempFile(...)` usages with a new
`TempFile` abstraction:
- `compressImagesInPDF(...)` now returns a `TempFile` instead of a
`Path`.
- All intermediate artifacts (original/working/GS/QPDF outputs) are
created via `TempFile` and managed with try-with-resources where
applicable.
- Removed the mutable `List<Path> tempFiles` bookkeeping; cleanup is
handled by `TempFile.close()` and a single `finally` block that closes
all tracked `TempFile` instances.
- Updated save/copy calls to use `TempFile` accessors (`getPath()`,
`getAbsolutePath()`, `getFile()`).
- Hardened error handling:
- Ensured `TempFile` is closed on early exceptions (e.g., in
`compressImagesInPDF`).
- Ghostscript/QPDF helpers now encapsulate their output lifecycle and no
longer accept/require a temp file list.
- Minor Java refinements:
- Used pattern matching for `instanceof` (e.g., `if (ref instanceof
NestedImageReference nestedRef)`).
- Improved and wrapped long log messages for readability and
consistency.

## Why the change was made
- **Resource safety:** Prevent orphaned temp files and reduce
file-descriptor leaks under failure conditions or multi-step pipelines.
- **Consistency:** Establish a single, testable mechanism for temp file
creation, placement, and cleanup across compression flows.
- **Portability & stability:** Avoid Windows file-locking/delete-in-use
issues by using explicit close semantics and predictable lifetimes.
- **Maintainability:** Simplify control flow by removing ad-hoc temp
tracking and pushing lifecycle ownership into `TempFile`.

---

## 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/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)
- [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/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.
2025-10-29 23:21:30 +00:00
Ludy
e4cfb8befe
feat(multitool): Add duplicate page action with undo/redo and harden command stack #4322 (#4333)
# Description of Changes

- Introduced **Duplicate Page** action in the MultiTool UI:
  - New `DuplicatePageCommand` with full undo/redo support
- Button added next to Delete, with tooltip text wired via i18n
(`multiTool.duplicate`)
- `PdfContainer.duplicatePage()` clones page image, rotation, and
adapter state; inserts after source; refreshes numbering
- Hooked duplication into the actions pipeline:
- `PdfActionsManager` now receives `duplicatePage` via `setActions(...)`
  - Added `duplicatePageButtonCallback` and control markup creation
- Refactored command architecture for robust undo/redo:
- Added `CommandWithAnchors` for capturing positions and deterministic
reinsertion (used by add/duplicate/page-break)
- Modernized `AddFilesCommand`, `PageBreakCommand` to use anchors, avoid
DOM state on nodes, and handle arrays consistently
- Improved `RemoveSelectedCommand`, `DeletePageCommand`,
`MovePageCommand`, `Rotate*` and `Split*` commands:
    - Safer null checks for filename/export controls
    - Clearer semantics and documentation
    - Consistent redo mirroring execute
- Minor UI/UX fix:
- Corrected tooltip wiring for the **Add File** button
(`insertFileButton.setAttribute('title', ...)`)
- Internationalization:
  - Added `multiTool.duplicate=Duplicate` to `messages_en_GB.properties`
  - Exposed `translations.duplicate` in `multi-tool.html`

**Why:** Adds a commonly requested workflow improvement (duplicate a
single page quickly) and makes the command stack more resilient
(especially redo after complex DOM mutations), improving reliability and
maintainability.

before:
<img width="186" height="34" alt="image"
src="https://github.com/user-attachments/assets/7edc8e9e-fc3d-411e-aaa1-4da7099c3173"
/>

after:
<img width="225" height="34" alt="image"
src="https://github.com/user-attachments/assets/bdf228c9-b3db-4690-bfb9-f198225459f4"
/>

Closes #4322

---

## 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/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)
- [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/devGuide/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)

- [ ] 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.
2025-10-29 23:20:28 +00:00
Ludy
6b6699ed70
fix(security): sanitize image handling to prevent DOM XSS in PdfContainer (#4267)
# Description of Changes

- Removed the insecure `addImageFile` implementation from
`ImageHighlighter.js`
- Hardened `PdfContainer.addImageFile`:
  - Rejects non-image and SVG files to mitigate DOM XSS risks
- Uses `URL.createObjectURL` safely with automatic revocation after load
- Introduced `bytesFromImageElement` utility to:
  - Safely extract image bytes from `blob:` URLs via Canvas (always PNG)
  - Fetch image data robustly for `http(s)` and `data:` URLs
  - Use HTTP Content-Type as a hint for image type detection
- Updated image type detection to consider explicitly forced types

This change addresses a CodeQL security alert by ensuring user-supplied
image files cannot introduce executable scripts.

---

## 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.
2025-10-29 23:19:37 +00:00
Ludy
6cc3494e62
feat(database): add email notifications for backups/imports & backup verification (#4253)
# Description of Changes

**What was changed**
- Added enterprise configuration for database-related email
notifications:
-
`premium.enterpriseFeatures.databaseNotifications.backups.successful|failed`
-
`premium.enterpriseFeatures.databaseNotifications.imports.successful|failed`
- Extended `ApplicationProperties` and `settings.yml.template`
accordingly.
- Introduced `DatabaseNotificationServiceInterface` and
`DatabaseNotificationService` to centralize and gate notification
sending (EE-only, respects `mail.enabled`).
- Wired notifications into `DatabaseService`:
  - Sends emails on successful/failed **backups** and **imports**.
  - Added backup verification step:
    - Compute SHA‑256 checksum for backup files.
- Validate backup by loading it into an in‑memory H2 instance
(`RUNSCRIPT`) before using it.
    - Abort import if verification fails.
- Enhanced `EmailService`:
- Added `sendSimpleMail(String to, String subject, String body)` (async)
for lightweight notifications.
  - Added debug logging for successful sends.
- Minor refactors and improved logging around backup/export/import
flows.

**Why the change was made**
- Provide admins with timely, configurable notifications about critical
database operations (backups/imports).
- Increase reliability by verifying backup integrity before execution,
reducing risk from corrupted or incomplete scripts.
- Keep configuration explicit and self-documenting via new keys in
`settings.yml.template`.

---

## 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/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)
- [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/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.
2025-10-29 23:18:54 +00:00
stirlingbot[bot]
30d83ec896
Update 3rd Party Licenses (#4770)
Auto-generated by stirlingbot[bot]

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-29 21:55:12 +00:00
Ludy
f48f80927a
fix(api): return 204 No Content on failed PDF filters; add OpenAPI responses and safe resource handling (#4406)
# Description of Changes

- **What was changed**
- Added explicit `@ApiResponses` for filter endpoints with `200` (PDF
passed) and `204` (did not pass) including `@Content` and media types.
- Replaced ambiguous `null` returns with
`ResponseEntity.noContent().build()` when a filter condition is not met.
- Ensured `PDDocument` is properly closed using try-with-resources in
relevant endpoints.
- Consolidated comparison logic into a reusable, type-safe `compare<T
extends Comparable<T>>()` helper for page count, page size, file size,
and rotation checks.
  - Minor cleanup and consistency improvements across filter endpoints.

- **Why the change was made**
- To return correct HTTP semantics (avoid ambiguous `null` responses)
and improve API reliability for clients consuming these endpoints.
- To document expected responses clearly in the OpenAPI spec for better
consumer tooling and DX.
- To prevent potential resource leaks by consistently closing
`PDDocument`.

---

## 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/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)
- [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/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.
2025-10-29 21:54:23 +00:00
Balázs Szücs
5e281fa002
perf(scanner-effect): Optimize fake-scanner effect with multithreading (#4614)
# Description of Changes

TLDR: should be 3-4x faster by my (very) unscientific benchmarks (I ran
the new and old with 5 docs and averaged out the results)


Notes:
- Made Threadpool and pages are rendered separately (large perf
improvement over previous code)
- Most of actual rendering/processing logic remain unchanged
- DPI values are now more "reasonable
- Buffering related perf gains also somewhat significant


<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/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)

- [x] 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-29 21:36:36 +00:00
stirlingbot[bot]
7008b3cf3d
Update 3rd Party Licenses (#4719)
Auto-generated by stirlingbot[bot]

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-29 20:00:20 +00:00
dependabot[bot]
2e21beacad
build(deps): bump com.unboundid.product.scim2:scim2-sdk-client from 4.0.0 to 4.1.0 (#4621)
Bumps
[com.unboundid.product.scim2:scim2-sdk-client](https://github.com/pingidentity/scim2)
from 4.0.0 to 4.1.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pingidentity/scim2/blob/master/CHANGELOG.md">com.unboundid.product.scim2:scim2-sdk-client's
changelog</a>.</em></p>
<blockquote>
<h2>v4.1.0 - 2025-Oct-06</h2>
<p>Added new methods to the Path class to simplify certain usages and
make interaction, especially
instantiation, less verbose. These include:</p>
<ul>
<li>Creation of simple attributes (e.g., <code>username</code>)
previously had to be performed with
<code>Path.root().attribute(&quot;userName&quot;)</code>, but can now be
done with <code>Path.of(&quot;userName&quot;)</code>. Note that
this may only be used for simple, top-level attributes that are
typically hard-coded.</li>
<li>For fetching the last element in a path, library calls such as
<code>path.getElement(path.size() - 1)</code> can now be shortened to
<code>path.getLastElement()</code>.</li>
</ul>
<p>Updated the documentation of the Path class to elaborate on the
definition of an attribute path, as
well as provide examples for how to interface with the class.</p>
<p>Simplified integration with the <code>scim2-sdk-client</code> library
by updating subclasses of
<code>RequestBuilder</code> to always provide
<code>GenericScimResource</code> objects for JSON payloads. In previous
releases, applications needed to use the right JSON properties in the
environment so that the client
library would send proper JSON when issuing HTTP requests. This update
to the client library places
the responsibility for serialization on the SCIM SDK itself, and reduces
the number of HTTP client
configuration properties to set within your application. If you have
added custom HTTP configuration
to your project specifically for the SCIM SDK, you may be able to remove
some properties.</p>
<p>Updated the following dependencies:</p>
<ul>
<li>Jackson: 2.19.2</li>
</ul>
<p>Added a new <code>ForbiddenException.sensitive()</code> method to
simplify the creation of a <code>403 FORBIDDEN</code>
exception for a client that has entered potentially-sensitive
information via URL query parameters.
This exception encourages SCIM clients to re-issue these requests as a
POST search request that is
less susceptible to leaking this information from web browsers or log
data.</p>
<p>Deprecated the <code>BaseScimResource#addExtensionValue</code>
methods, since they allowed creating schema
extension attributes whose values are arrays instead of objects. Since
this is a form that is not
used in practice, these methods will be removed in a future release.</p>
<p>Fixed an issue where deserialization of <code>ListResponse</code>
objects could result in <code>ClassCastException</code>
errors if an application tried to use fields stored in the
<code>Resources</code> array. Now, the SCIM SDK
supports these conversions (via Jackson <code>TypeReference</code>
objects). See the class-level Javadoc of
ListResponse for more information. As a result of this change, the
map-based constructor,

<code>com.unboundid.scim2.common.messages.ListResponse.ListResponse(java.util.Map)</code>,
is now deprecated
and will be removed in a future release.</p>
<p>Updated documentation for <code>GroupResource</code> and
<code>Group</code> to highlight the distinction between the
classes, as well as provide examples of how they may be used.
GroupResource represents a group
object/entity, whereas a <code>Group</code> is a subfield on a user
resource (like <code>Email</code>). The documentation
for <code>UserResource</code> was also updated.</p>
<p>Added support for non-standard group membership patch remove requests
that contain a value. An
example JSON for this request type is shared below:</p>
<pre lang="json"><code>    {
&quot;schemas&quot;: [
&quot;urn:ietf:params:scim:api:messages:2.0:PatchOp&quot; ],
      &quot;Operations&quot;: [{
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b780494e99"><code>b780494</code></a>
Setting release version 4.1.0</li>
<li><a
href="b6ed7c8ca0"><code>b6ed7c8</code></a>
Add relativePath to child pom.xml files.</li>
<li><a
href="dbfc354685"><code>dbfc354</code></a>
Revert version updates to re-attempt release.</li>
<li><a
href="8ce6abea34"><code>8ce6abe</code></a>
Setting release version 4.1.1-SNAPSHOT</li>
<li><a
href="d0ddde50bf"><code>d0ddde5</code></a>
Setting release version 4.1.0</li>
<li><a
href="1ee18e958e"><code>1ee18e9</code></a>
Update CHANGELOG date for the next release.</li>
<li><a
href="ee20b63fe0"><code>ee20b63</code></a>
Fix incorrect Javadoc.</li>
<li><a
href="ffc152af6a"><code>ffc152a</code></a>
Support non-standard patch group membership remove</li>
<li><a
href="313bccc925"><code>313bccc</code></a>
Deprecate BaseScimResource#addExtensionValue</li>
<li><a
href="3c6bb67773"><code>3c6bb67</code></a>
Update formatting and documentation.</li>
<li>Additional commits viewable in <a
href="https://github.com/pingidentity/scim2/compare/scim2-4.0.0...scim2-4.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.unboundid.product.scim2:scim2-sdk-client&package-manager=gradle&previous-version=4.0.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 19:54:03 +00:00
stirlingbot[bot]
f3a285bbd7
🌐 Sync Translations + Update README Progress Table (#4764)
### Description of Changes

This Pull Request was automatically generated to synchronize updates to
translation files and documentation. Below are the details of the
changes made:

#### **1. Synchronization of Translation Files**
- Updated translation files (`messages_*.properties`) to reflect changes
in the reference file `messages_en_GB.properties`.
- Ensured consistency and synchronization across all supported language
files.
- Highlighted any missing or incomplete translations.

#### **2. Update README.md**
- Generated the translation progress table in `README.md`.
- Added a summary of the current translation status for all supported
languages.
- Included up-to-date statistics on translation coverage.

#### **Why these changes are necessary**
- Keeps translation files aligned with the latest reference updates.
- Ensures the documentation reflects the current translation progress.

---

Auto-generated by [create-pull-request][1].

[1]: https://github.com/peter-evans/create-pull-request

---------

Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-29 19:51:26 +00:00
stirlingbot[bot]
6e52a8d9e2
🤖 format everything with pre-commit by stirlingbot (#4403)
Auto-generated by [create-pull-request][1] with **stirlingbot**

[1]: https://github.com/peter-evans/create-pull-request

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-29 19:50:49 +00:00
FdaSilvaYY
b8891f65c8
Update and improve French translations in messages_fr_FR.properties (#4755)
# Description of Changes

Update and improve French translations for various UI elements and error
messages, including corrections and improvements in terminology.
Add 5 missing entries already present in messages_en_GB.properties

---

## 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/devGuide/DeveloperGuide.md)
(if applicable)
- [X] 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)
- [X] I have performed a self-review of my own code
- [X] My changes generate no new warnings
2025-10-29 19:46:01 +00:00
dependabot[bot]
e8400a9b64
build(deps): bump io.swagger.core.v3:swagger-core-jakarta from 2.2.38 to 2.2.39 (#4672)
Bumps io.swagger.core.v3:swagger-core-jakarta from 2.2.38 to 2.2.39.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.swagger.core.v3:swagger-core-jakarta&package-manager=gradle&previous-version=2.2.38&new-version=2.2.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 19:40:58 +00:00
dependabot[bot]
f7711d8892
build(deps): bump io.micrometer:micrometer-core from 1.15.4 to 1.15.5 (#4746)
Bumps
[io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer)
from 1.15.4 to 1.15.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micrometer-metrics/micrometer/releases">io.micrometer:micrometer-core's
releases</a>.</em></p>
<blockquote>
<h2>1.15.5</h2>
<h2>🐞 Bug Fixes</h2>
<ul>
<li>Close scope in same thread in ObservedAspect <a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6727">#6727</a></li>
<li>Synchronize access of current connections in JettyConnectionMetrics
<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6578">#6578</a></li>
</ul>
<h2>🔨 Dependency Upgrades</h2>
<ul>
<li>Bump dropwizard-metrics from 4.2.36 to 4.2.37 <a
href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6733">#6733</a></li>
</ul>
<h2>❤️ Contributors</h2>
<p>Thank you to all the contributors who worked on this release:</p>
<p><a href="https://github.com/deadok22"><code>@​deadok22</code></a> and
<a href="https://github.com/pema4"><code>@​pema4</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ce3a9e0efc"><code>ce3a9e0</code></a>
Merge branch '1.14.x' into 1.15.x</li>
<li><a
href="bae31ebd22"><code>bae31eb</code></a>
Close scope in same thread in ObservedAspect (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6728">#6728</a>)</li>
<li><a
href="c6e10e3de8"><code>c6e10e3</code></a>
Bump org.assertj:assertj-core from 3.27.5 to 3.27.6 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6753">#6753</a>)</li>
<li><a
href="9a614b9555"><code>9a614b9</code></a>
Bump org.postgresql:postgresql from 42.7.7 to 42.7.8 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6749">#6749</a>)</li>
<li><a
href="ac9dffa6fd"><code>ac9dffa</code></a>
Bump org.assertj:assertj-core from 3.27.4 to 3.27.5 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6748">#6748</a>)</li>
<li><a
href="b871654040"><code>b871654</code></a>
Bump org.postgresql:postgresql from 42.7.7 to 42.7.8 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6747">#6747</a>)</li>
<li><a
href="98f64c3375"><code>98f64c3</code></a>
Bump dropwizard-metrics from 4.2.36 to 4.2.37 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6733">#6733</a>)</li>
<li><a
href="238b901ba2"><code>238b901</code></a>
Merge branch '1.14.x' into 1.15.x</li>
<li><a
href="64be1d65f0"><code>64be1d6</code></a>
Improve CurrentObservationTest</li>
<li><a
href="9548a1e4a0"><code>9548a1e</code></a>
Bump dropwizard-metrics from 4.2.36 to 4.2.37 (<a
href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6734">#6734</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/micrometer-metrics/micrometer/compare/v1.15.4...v1.15.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.micrometer:micrometer-core&package-manager=gradle&previous-version=1.15.4&new-version=1.15.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 19:39:42 +00:00
PingLin8888
cac11826d3
Split pdf by sections improvement (#4111)
### What was changed

* Implemented new **split modes** in the "Split PDF by Sections" tool.
* Added support for **predefined split presets**:

  * Split all except first and last
  * Split all except first
  * Split all except last
  * Split all
* Added a **custom split mode** with an input field for comma-separated
page numbers (e.g., `2,4`), allowing users to specify exactly which
pages to split.

### Why the change was made

* This change improves the flexibility and usability of the split tool.
* It covers a common use case: skipping the cover and back pages when
splitting a document.

Closes #4072

---

## 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/devGuide/DeveloperGuide.md)
(if applicable)
- [x] 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)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [x] 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)
- [x] 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)

- [x] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
<img width="340" height="612" alt="image"
src="https://github.com/user-attachments/assets/7932bdea-945f-4937-879d-437339b86c94"
/>


### Testing (if applicable)

- [x] 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.
2025-10-29 12:09:01 +00:00
dependabot[bot]
30bc7207a2
build(deps): bump com.github.junrar:junrar from 7.5.5 to 7.5.7 (#4715)
Bumps [com.github.junrar:junrar](https://github.com/junrar/junrar) from
7.5.5 to 7.5.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/junrar/junrar/releases">com.github.junrar:junrar's
releases</a>.</em></p>
<blockquote>
<h2>Release v7.5.7</h2>
<h2>Changelog</h2>
<h2>🛠  Build</h2>
<ul>
<li>fix failing version (<a
href="https://github.com/junrar/junrar/commits/beccd50">beccd50</a>)</li>
<li>fix failing version (<a
href="https://github.com/junrar/junrar/commits/4ccf1d2">4ccf1d2</a>)</li>
<li>use bump when computing snapshot version (<a
href="https://github.com/junrar/junrar/commits/20e9105">20e9105</a>)</li>
<li>use java 21 (<a
href="https://github.com/junrar/junrar/commits/ae8bff6">ae8bff6</a>)</li>
<li>remove java toolchains and use release flag instead (<a
href="https://github.com/junrar/junrar/commits/0d99993">0d99993</a>),
closes <a
href="https://redirect.github.com/junrar/junrar/issues/218">#218</a></li>
</ul>
<h2>📝 Documentation</h2>
<ul>
<li>update maven snapshot badge (<a
href="https://github.com/junrar/junrar/commits/04481cf">04481cf</a>)</li>
</ul>
<h2>Contributors</h2>
<p>We'd like to thank the following people for their contributions:
Gauthier Roebroeck</p>
<h2>Release v7.5.6</h2>
<h2>Changelog</h2>
<h2>🐛 Fixes</h2>
<ul>
<li>CorruptHeaderException when EndArcHeader is missing and parsing as
stream (<a
href="https://github.com/junrar/junrar/commits/964801c">964801c</a>),
closes <a
href="https://redirect.github.com/junrar/junrar/issues/216">#216</a></li>
</ul>
<h2>🧪 Tests</h2>
<ul>
<li>replace deprecation (<a
href="https://github.com/junrar/junrar/commits/ae8870d">ae8870d</a>)</li>
</ul>
<h2>🛠  Build</h2>
<p><strong>deps</strong></p>
<ul>
<li>bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 from
2.19.0 to 2.20.0 (<a
href="https://github.com/junrar/junrar/commits/a1143e2">a1143e2</a>)</li>
<li>bump ch.qos.logback:logback-classic from 1.5.18 to 1.5.19 (<a
href="https://github.com/junrar/junrar/commits/06ba358">06ba358</a>)</li>
<li>bump org.mockito:mockito-core from 5.17.0 to 5.20.0 (<a
href="https://github.com/junrar/junrar/commits/9880cc4">9880cc4</a>)</li>
<li>bump com.fasterxml.jackson.core:jackson-databind (<a
href="https://github.com/junrar/junrar/commits/9912de1">9912de1</a>)</li>
<li>bump commons-io:commons-io from 2.19.0 to 2.20.0 (<a
href="https://github.com/junrar/junrar/commits/716b0fc">716b0fc</a>)</li>
<li>bump org.assertj:assertj-core from 3.27.4 to 3.27.6 (<a
href="https://github.com/junrar/junrar/commits/23ba3d7">23ba3d7</a>)</li>
<li>bump peter-evans/create-or-update-comment from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/932af2e">932af2e</a>)</li>
<li>bump gradle/actions from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/d3b4237">d3b4237</a>)</li>
<li>bump org.assertj:assertj-core from 3.27.3 to 3.27.4 (<a
href="https://github.com/junrar/junrar/commits/a7b88da">a7b88da</a>)</li>
<li>bump com.github.gotson.bestbefore:bestbefore-processor-java (<a
href="https://github.com/junrar/junrar/commits/acf11b2">acf11b2</a>)</li>
<li>bump org.jreleaser from 1.18.0 to 1.20.0 (<a
href="https://github.com/junrar/junrar/commits/694c46c">694c46c</a>)</li>
<li>bump actions/setup-java from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/c6c2cb9">c6c2cb9</a>)</li>
<li>bump actions/checkout from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/f55f514">f55f514</a>)</li>
<li>bump archunit to 1.4.1 (<a
href="https://github.com/junrar/junrar/commits/4942838">4942838</a>)</li>
<li>bump junit-pioneer to 2.3.0 (<a
href="https://github.com/junrar/junrar/commits/75bd572">75bd572</a>)</li>
<li>bump slf4j-api from 2.0.9 to 2.0.17 (<a
href="https://github.com/junrar/junrar/commits/cd598e6">cd598e6</a>)</li>
<li>bump ch.qos.logback:logback-classic from 1.4.11 to 1.5.18 (<a
href="https://github.com/junrar/junrar/commits/666e572">666e572</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/junrar/junrar/blob/master/CHANGELOG.md">com.github.junrar:junrar's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/junrar/junrar/compare/v7.5.6...v7.5.7">7.5.7</a>
(2025-10-17)</h1>
<h2>🛠  Build</h2>
<ul>
<li>fix failing version (<a
href="https://github.com/junrar/junrar/commits/beccd50">beccd50</a>)</li>
<li>fix failing version (<a
href="https://github.com/junrar/junrar/commits/4ccf1d2">4ccf1d2</a>)</li>
<li>use bump when computing snapshot version (<a
href="https://github.com/junrar/junrar/commits/20e9105">20e9105</a>)</li>
<li>use java 21 (<a
href="https://github.com/junrar/junrar/commits/ae8bff6">ae8bff6</a>)</li>
<li>remove java toolchains and use release flag instead (<a
href="https://github.com/junrar/junrar/commits/0d99993">0d99993</a>),
closes <a
href="https://redirect.github.com/junrar/junrar/issues/218">#218</a></li>
</ul>
<h2>📝 Documentation</h2>
<ul>
<li>update maven snapshot badge (<a
href="https://github.com/junrar/junrar/commits/04481cf">04481cf</a>)</li>
</ul>
<h1><a
href="https://github.com/junrar/junrar/compare/v7.5.5...v7.5.6">7.5.6</a>
(2025-10-16)</h1>
<h2>🐛 Fixes</h2>
<ul>
<li>CorruptHeaderException when EndArcHeader is missing and parsing as
stream (<a
href="https://github.com/junrar/junrar/commits/964801c">964801c</a>),
closes <a
href="https://redirect.github.com/junrar/junrar/issues/216">#216</a></li>
</ul>
<h2>🧪 Tests</h2>
<ul>
<li>replace deprecation (<a
href="https://github.com/junrar/junrar/commits/ae8870d">ae8870d</a>)</li>
</ul>
<h2>🛠  Build</h2>
<p><strong>deps</strong></p>
<ul>
<li>bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 from
2.19.0 to 2.20.0 (<a
href="https://github.com/junrar/junrar/commits/a1143e2">a1143e2</a>)</li>
<li>bump ch.qos.logback:logback-classic from 1.5.18 to 1.5.19 (<a
href="https://github.com/junrar/junrar/commits/06ba358">06ba358</a>)</li>
<li>bump org.mockito:mockito-core from 5.17.0 to 5.20.0 (<a
href="https://github.com/junrar/junrar/commits/9880cc4">9880cc4</a>)</li>
<li>bump com.fasterxml.jackson.core:jackson-databind (<a
href="https://github.com/junrar/junrar/commits/9912de1">9912de1</a>)</li>
<li>bump commons-io:commons-io from 2.19.0 to 2.20.0 (<a
href="https://github.com/junrar/junrar/commits/716b0fc">716b0fc</a>)</li>
<li>bump org.assertj:assertj-core from 3.27.4 to 3.27.6 (<a
href="https://github.com/junrar/junrar/commits/23ba3d7">23ba3d7</a>)</li>
<li>bump peter-evans/create-or-update-comment from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/932af2e">932af2e</a>)</li>
<li>bump gradle/actions from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/d3b4237">d3b4237</a>)</li>
<li>bump org.assertj:assertj-core from 3.27.3 to 3.27.4 (<a
href="https://github.com/junrar/junrar/commits/a7b88da">a7b88da</a>)</li>
<li>bump com.github.gotson.bestbefore:bestbefore-processor-java (<a
href="https://github.com/junrar/junrar/commits/acf11b2">acf11b2</a>)</li>
<li>bump org.jreleaser from 1.18.0 to 1.20.0 (<a
href="https://github.com/junrar/junrar/commits/694c46c">694c46c</a>)</li>
<li>bump actions/setup-java from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/c6c2cb9">c6c2cb9</a>)</li>
<li>bump actions/checkout from 4 to 5 (<a
href="https://github.com/junrar/junrar/commits/f55f514">f55f514</a>)</li>
<li>bump archunit to 1.4.1 (<a
href="https://github.com/junrar/junrar/commits/4942838">4942838</a>)</li>
<li>bump junit-pioneer to 2.3.0 (<a
href="https://github.com/junrar/junrar/commits/75bd572">75bd572</a>)</li>
<li>bump slf4j-api from 2.0.9 to 2.0.17 (<a
href="https://github.com/junrar/junrar/commits/cd598e6">cd598e6</a>)</li>
<li>bump ch.qos.logback:logback-classic from 1.4.11 to 1.5.18 (<a
href="https://github.com/junrar/junrar/commits/666e572">666e572</a>)</li>
<li>bump com.fasterxml.jackson.core:jackson-databind (<a
href="https://github.com/junrar/junrar/commits/9258830">9258830</a>)</li>
<li>bump org.mockito:mockito-core from 5.6.0 to 5.17.0 (<a
href="https://github.com/junrar/junrar/commits/c2eeadc">c2eeadc</a>)</li>
<li>bump io.github.gradle-nexus.publish-plugin (<a
href="https://github.com/junrar/junrar/commits/777d966">777d966</a>)</li>
<li>bump org.assertj:assertj-core from 3.24.2 to 3.27.3 (<a
href="https://github.com/junrar/junrar/commits/76c8474">76c8474</a>)</li>
<li>bump com.github.ben-manes.versions from 0.50.0 to 0.52.0 (<a
href="https://github.com/junrar/junrar/commits/b6fa2a8">b6fa2a8</a>)</li>
<li>bump codecov/codecov-action from 3 to 5 (<a
href="https://github.com/junrar/junrar/commits/9c37e01">9c37e01</a>)</li>
<li>bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 (<a
href="https://github.com/junrar/junrar/commits/ea99789">ea99789</a>)</li>
<li>bump commons-io:commons-io from 2.15.0 to 2.19.0 (<a
href="https://github.com/junrar/junrar/commits/2c02c73">2c02c73</a>)</li>
<li>bump org.jreleaser from 1.9.0 to 1.18.0 (<a
href="https://github.com/junrar/junrar/commits/d588832">d588832</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="04481cf28b"><code>04481cf</code></a>
docs: update maven snapshot badge</li>
<li><a
href="beccd50700"><code>beccd50</code></a>
ci: fix failing version</li>
<li><a
href="4ccf1d295f"><code>4ccf1d2</code></a>
ci: fix failing version</li>
<li><a
href="20e9105847"><code>20e9105</code></a>
ci: use bump when computing snapshot version</li>
<li><a
href="ae8bff63dd"><code>ae8bff6</code></a>
ci: use java 21</li>
<li><a
href="0d99993301"><code>0d99993</code></a>
build: remove java toolchains and use release flag instead</li>
<li><a
href="9550e75b57"><code>9550e75</code></a>
chore(release): 7.5.6 [skip ci]</li>
<li><a
href="a1143e27d3"><code>a1143e2</code></a>
build(deps): bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310
from...</li>
<li><a
href="06ba358142"><code>06ba358</code></a>
build(deps): bump ch.qos.logback:logback-classic from 1.5.18 to
1.5.19</li>
<li><a
href="9880cc42fa"><code>9880cc4</code></a>
build(deps): bump org.mockito:mockito-core from 5.17.0 to 5.20.0</li>
<li>Additional commits viewable in <a
href="https://github.com/junrar/junrar/compare/v7.5.5...v7.5.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.junrar:junrar&package-manager=gradle&previous-version=7.5.5&new-version=7.5.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 13:41:00 +01:00
albanobattistella
ac88a952d5
Update messages_it_IT.properties (#4609)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.
2025-10-16 23:07:14 +01:00
Peter Dave Hello
42ed0f59ea
Update zh_TW Traditional Chinese locale (#4615)
# Description of Changes

Update and improve the zh-TW Traditional Chinese translation

---

## 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/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)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings
2025-10-16 23:06:02 +01:00
Balázs Szücs
42f1fd543a
refactor: remove unused imports (#4566)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/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)

- [x] 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.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-16 23:05:49 +01:00
Balázs Szücs
2ef89101c2
feat(pdf-info): refactor and add more info on attachments, images, forms, and give technical overview (#4643)
# Description of Changes

### UI and Summary Enhancements

* Added a "Technical Details" section to the PDF summary UI, displaying
information such as images, fonts, color spaces, form fields, embedded
files, JavaScript, layers, bookmarks, and multimedia. This includes new
HTML markup and corresponding translation string.
* Populated the new technical details fields in the summary using data
from the backend response, including logic to count and display images,
fonts, color spaces, form fields, embedded files, JavaScript scripts,
layers, bookmarks, and multimedia items.

### Refactor:

- Refactored getPdfInfo function (which was 400 lines) to multiple
manageable size functions

- Extract magic numbers to named constants:
  - `72` (PPI) should be a named constant like `POINTS_PER_INCH`
- `1.0f` (tolerance) should be a named constant like `DEFAULT_TOLERANCE`
- `5` (max logged errors) should be a named constant like
`MAX_LOGGED_ERRORS`
- Make the keyBuilder optimization for page prefixes effective
- Used `String.format()` for better readability in complex string
constructions
- Replace abbreviated variable names with descriptive alternatives:
  - `ap` (AccessPermission) → `accessPermission`
  - `is` (InputStream) → `inputStream` or `pdfInputStream`
- Improved attachment processing, and other features see below:



### Features:
#### Technical details overview:

<img width="658" height="737" alt="image"
src="https://github.com/user-attachments/assets/60d0658c-27f1-4a48-afbd-7f6a8594dffc"
/>

#### Form fields:

<img width="458" height="800" alt="image"
src="https://github.com/user-attachments/assets/d985b7e1-a9a2-4d27-a856-da8754fbb133"
/>

#### Embedded file new fields; MIME type, creation/modification date

<img width="506" height="794" alt="image"
src="https://github.com/user-attachments/assets/067eac9e-28b9-4659-af97-56c9a90cb0ec"
/>


#### Images:

<img width="658" height="247" alt="image"
src="https://github.com/user-attachments/assets/c915bd45-8de8-4ef0-95cc-04b2cd23bfdb"
/>

And few other more minor improvements.




<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [x] 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)

- [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/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-16 22:54:25 +01:00
Balázs Szücs
3a6c0c7722
feat(flatten): Add support for configuring rendering DPI in Flatten PDF feature (#4669)
# Description of Changes

Rendering on high DPI can needlessly increase the file size and
processing time, even when users would prefer smaller size, (with lesser
quality)

This PR adds support for configurable DPI, so that users can choose
their preferred balance between processing time/file size and quality.


**Backend logic and data model updates:**

* The `FlattenController` now processes an optional `renderDpi`
parameter from the request, using it to set the rendering DPI for each
page. It enforces minimum and maximum values based on system
configuration and ensures a sensible default if not provided.
* The `FlattenRequest` model has a new `renderDpi` field to carry the
requested DPI through the API and backend logic.

**User interface and documentation improvements:**

* The flatten form in `flatten.html` includes a new input field for DPI,
with validation and help text to guide users about its impact and usage.
* English resource messages have been updated to describe the new DPI
field and provide help text explaining its effects.

**UI:**
<img width="595" height="604" alt="image"
src="https://github.com/user-attachments/assets/f78a0401-0348-490b-920a-91475cab224b"
/>
**File size before after (100 DPI vs 500 DPI):**
<img width="493" height="141" alt="image"
src="https://github.com/user-attachments/assets/fe21bf79-a18f-4674-bbb5-c99b3d3bd7be"
/>
Sample used was originally 8 MB.

Sample used are attached here:


[image-doc-1.pdf](https://github.com/user-attachments/files/22889873/image-doc-1.pdf)

[image-doc-2.pdf](https://github.com/user-attachments/files/22889876/image-doc-2.pdf)

Strange stuff, I can personally _barely_ tell difference between 500 vs
100 DPI tbh, but the file size difference is very significant.


Closes: #4668

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-16 22:50:04 +01:00
tkymmm
dbf0a4fdf4
Update messages_ja_JP.properties (#4663)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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.
2025-10-16 22:47:29 +01:00
stirlingbot[bot]
4f9a261e4c
Update 3rd Party Licenses (#4532)
Auto-generated by stirlingbot[bot]

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-16 22:42:04 +01:00
Ludy
955a26f32b
fix(security): Harden website-to-PDF conversion (#4638)
# Description of Changes

**What was changed**
- Fetch remote HTML content via `HttpClient` before invoking WeasyPrint
to inspect and sanitize input.
- Reject conversions when downloaded HTML contains disallowed `file:`
scheme references (including encoded/obfuscated variants) using a
compiled `Pattern`.
- Write fetched HTML to a secured temporary file and pass that path to
WeasyPrint instead of the remote URL.
- Provide `--base-url` to WeasyPrint so relative resources resolve
correctly while avoiding direct remote fetching as the primary input.
- Add comprehensive unit tests:
- Ensure command invocation uses local temp HTML + `--base-url` and
cleans up temp files.
  - Verify redirect with error when disallowed content is detected.
  - Cover temp file deletion behavior and error handling paths.
- Improve resource cleanup in `finally` blocks for both temp HTML and
output PDF artifacts.

**Why the change was made**
- Prevents traversal/local file exposure risks by blocking `file:` (and
encoded equivalents) discovered in fetched HTML.
- Reduces attack surface of URL-to-PDF by avoiding direct handing of
remote URLs to the renderer and enabling pre-validation.
- Strengthens deterministic behavior of conversions and improves safety
against SSRF-like vectors.

---

## 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.
2025-10-16 22:41:04 +01:00
Ludy
bd179579e6
fix(security): harden URL reachability to block SSRF to private/reserved networks and add unit tests (#4637)
# Description of Changes

- **What was changed**
- Introduced a stricter network safety check in
`GeneralUtils.isURLReachable(...)`:
- Block resolution to local, private, link-local, multicast, and
reserved ranges for both IPv4 and IPv6 (including IPv4-mapped and
IPv4-compatible IPv6).
- Added a DNS records cap (`MAX_DNS_ADDRESSES = 20`) to mitigate DNS
answer explosions and reduce SSRF blast radius.
    - Treat DNS resolution failures as unsafe (fail closed).
- Reject empty/invalid hosts early and disallow non-HTTP(S) protocols.
- Ensure `HttpURLConnection` is properly disconnected in a `finally`
block to avoid resource leaks.
- Added comprehensive unit tests in `GeneralUtilsAdditionalTest` to
verify blocking of sensitive ranges (e.g., `127.0.0.1`, `10.0.0.0/8`,
`172.16.0.0/12`, `192.168.0.0/16`, CGNAT `100.64.0.0/10`, link-local
`169.254.0.0/16`, TEST-NETs, multicast `224.0.0.0/4`, IPv6 ULA
`fc00::/7`, and IPv4-mapped `::ffff:127.0.0.1`).
- Renamed and refactored helper logic to
`isDisallowedNetworkLocation(...)` and split out
`isSensitiveAddress(...)`, `isPrivateOrReservedIPv4(...)`,
`isUniqueLocalIPv6(...)`, and `isIPv4MappedAddress(...)` for clarity and
testability.

- **Why the change was made**
- To prevent Server-Side Request Forgery (SSRF) and related abuses in
features that fetch external URLs (e.g., website-to-PDF and similar
utilities).
- Ensures the application cannot be coerced into contacting internal
infrastructure or special-purpose address spaces.
- Adds explicit resource cleanup and safer defaults (fail closed) to
improve reliability and security.


---

## 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/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)
- [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/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.
2025-10-16 22:40:08 +01:00
stirlingbot[bot]
347aaba8b4
🌐 Sync Translations + Update README Progress Table (#4692)
### Description of Changes

This Pull Request was automatically generated to synchronize updates to
translation files and documentation. Below are the details of the
changes made:

#### **1. Synchronization of Translation Files**
- Updated translation files (`messages_*.properties`) to reflect changes
in the reference file `messages_en_GB.properties`.
- Ensured consistency and synchronization across all supported language
files.
- Highlighted any missing or incomplete translations.

#### **2. Update README.md**
- Generated the translation progress table in `README.md`.
- Added a summary of the current translation status for all supported
languages.
- Included up-to-date statistics on translation coverage.

#### **Why these changes are necessary**
- Keeps translation files aligned with the latest reference updates.
- Ensures the documentation reflects the current translation progress.

---

Auto-generated by [create-pull-request][1].

[1]: https://github.com/peter-evans/create-pull-request

---------

Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-16 22:37:00 +01:00
Ludy
dd0e8543e1
fix(multitool): avoid duplicate resource embedding on export to prevent huge PDFs (#4684)
# Description of Changes

**What was changed**
- Reworked Multi-Tool export to **group page copies per source PDF** and
reuse them during assembly.
- Eliminates repeated embedding of identical resources (fonts, XObjects,
images) that previously occurred when copying pages one-by-one.
- Keeps original vector content whenever possible instead of rasterizing
unchanged pages.
- Minor internal refactor to reduce repeated `copyPages` calls and add
pages from a pre-copied cache.

**Why the change was made**
- Users reported that exporting a PDF via Multi-Tool—without making any
edits—could inflate file size by 5x+.
- Root cause: exporting pages individually caused duplicated resources
in the output document, dramatically increasing size.
- Grouping and reusing copied pages avoids redundant embeddings and
yields output sizes much closer to the original.

Closes #4681

---

## 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/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)
- [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/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.
2025-10-16 22:36:33 +01:00
Ludy
cc1caa993f
feat(attachments): add “Extract Attachments” tool to export embedded files as ZIP (#4645)
This pull request introduces a new feature that allows users to extract
all embedded attachments from a PDF and download them as a ZIP archive.
The implementation includes backend support for extracting attachments,
a new API endpoint, updates to the service layer, internationalization
for UI strings, and a new web form for user interaction.

**New PDF Attachment Extraction Feature**

_Backend/API:_
* Added a new API endpoint `/api/v1/misc/extract-attachments` in
`AttachmentController` to extract all embedded attachments from a PDF
and return them as a ZIP archive. Returns an error if no attachments are
found.
* Implemented `extractAttachments` method in `AttachmentService` and its
interface to traverse embedded files in the PDF, collect them, and
package them into a ZIP. Handles unique filenames and file metadata.
[[1]](diffhunk://#diff-31bc10a74e0d6a01a558585a760f1861009719d76de323eedf7205f1cd6dd417R109-R266)
[[2]](diffhunk://#diff-67f2128bf0a88be44c20ca02d5b03be5496d70160377da4e66e72379e8f5ddc8R14-R15)
* Introduced `ExtractAttachmentsRequest` model to handle extraction
requests.

_User Interface:_
* Added a new web form (`misc/extract-attachments.html`) for users to
upload a PDF and download its attachments as a ZIP.
* Created a new web route and controller method to serve the extraction
form.
* Updated navigation menus to include the new "Extract Attachments"
tool.
[[1]](diffhunk://#diff-22a78471c93650a470526aa92780ba43739d475858fd528f180272039dfaa543R261-R263)
[[2]](diffhunk://#diff-0bdef49007d770c7afb60ea9c618869ad3a4e96366e82a00b9424b88cdaa3f76R296-R298)

_Internationalization & Messaging:_
* Added English and German translations for all new UI elements and
error messages related to attachment extraction.
[[1]](diffhunk://#diff-ee1c6999a33498cfa3abba4a384e73a8b8269856899438de80560c965079a9fdR236)
[[2]](diffhunk://#diff-482633b22866efc985222c4a14efc5b7d2487b59f39b953f038273a39d0362f7R236)
[[3]](diffhunk://#diff-ee1c6999a33498cfa3abba4a384e73a8b8269856899438de80560c965079a9fdR643-R646)
[[4]](diffhunk://#diff-482633b22866efc985222c4a14efc5b7d2487b59f39b953f038273a39d0362f7R643-R646)
[[5]](diffhunk://#diff-ee1c6999a33498cfa3abba4a384e73a8b8269856899438de80560c965079a9fdR1342-R1347)
[[6]](diffhunk://#diff-482633b22866efc985222c4a14efc5b7d2487b59f39b953f038273a39d0362f7R1342-R1347)

These changes together provide a seamless way for users to extract and
download all embedded files from a PDF document.

## 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/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)
- [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/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.
- [ ]
2025-10-16 22:23:24 +01:00
Balázs Szücs
614d410dce
feat(conversion): add PDF to Vector Image conversions (#4651)
# Description of Changes


This pull request adds support for converting between PDF and vector
formats (EPS, PS, PCL, XPS) using Ghostscript, including both backend
API endpoints and frontend UI integration. It introduces new
controllers, request models, configuration, and user interface elements
for these conversion features.

### Backend
* Added `PdfVectorExportController` with endpoints for converting PDF to
vector formats and vector formats to PDF, using Ghostscript for
processing.
(`app/core/src/main/java/stirling/software/SPDF/controller/api/converters/PdfVectorExportController.java`)
* Introduced `PdfVectorExportRequest` model to support new conversion
options and parameters.
(`app/core/src/main/java/stirling/software/SPDF/model/api/converters/PdfVectorExportRequest.java`)
* Added a utility method for Ghostscript conversion exceptions.
(`app/common/src/main/java/stirling/software/common/util/ExceptionUtils.java`)

### Configuration
* Registered new endpoints and alternatives for PDF/vector conversion in
the `EndpointConfiguration`.
(`app/core/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java`)

### Frontend
* Added Thymeleaf templates for "PDF to Vector" and "Vector to PDF"
conversion forms.
(`app/core/src/main/resources/templates/convert/pdf-to-vector.html`,
`app/core/src/main/resources/templates/convert/vector-to-pdf.html`)
* Integrated new conversion tools into the navigation bar and feature
groups.
(`app/core/src/main/resources/templates/fragments/navElements.html`)
* Added controller routes for the new conversion forms.
(`app/core/src/main/java/stirling/software/SPDF/controller/web/ConverterWebController.java`)

### UI
<img width="629" height="551" alt="image"
src="https://github.com/user-attachments/assets/37491db7-1ae8-47d4-b69b-412bf7b02acf"
/>
<img width="629" height="551" alt="image"
src="https://github.com/user-attachments/assets/b33d3d40-5f26-415f-bd60-467f23701003"
/>




Closes: #4491

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/devGuide/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/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-16 22:22:36 +01:00
stirlingbot[bot]
77fef2fce3
🌐 Sync Translations + Update README Progress Table (#4607)
### Description of Changes

This Pull Request was automatically generated to synchronize updates to
translation files and documentation. Below are the details of the
changes made:

#### **1. Synchronization of Translation Files**
- Updated translation files (`messages_*.properties`) to reflect changes
in the reference file `messages_en_GB.properties`.
- Ensured consistency and synchronization across all supported language
files.
- Highlighted any missing or incomplete translations.

#### **2. Update README.md**
- Generated the translation progress table in `README.md`.
- Added a summary of the current translation status for all supported
languages.
- Included up-to-date statistics on translation coverage.

#### **Why these changes are necessary**
- Keeps translation files aligned with the latest reference updates.
- Ensures the documentation reflects the current translation progress.

---

Auto-generated by [create-pull-request][1].

[1]: https://github.com/peter-evans/create-pull-request

---------

Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-16 22:21:01 +01:00
OUNZAR Aymane
9ea0edccde
A fix for the bug : Extract Pages produce output pdf of same size (issue #1480) (#4636)
# Description of Changes

<!--
Please provide a summary of the changes, including:

Previously, the extraction logic reused the same PDF document instance.
It deleted all existing pages, then re-added only the pages that needed
to be extracted. However, some PDFs define a shared Resources dictionary
at the document level. In those cases, even after page deletion, the
shared resources remained, leading to incorrect or bloated output.

The updated implementation now creates a new PDF document based on the
old document. It copies only the selected pages from the original
document into this new file. This ensures no leftover shared resources
or unwanted metadata are carried over from the source PDF.

Closes #1480 
-->

---

## 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/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)
- [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/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)

- [x] 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: YAOU Reda <yaoureda24@gmail.com>
2025-10-16 22:19:05 +01:00
ConnorYoh
1a3552d1f7
Dynamic tracking services (#4690)
Added bean for both scarf and posthog
followed documentation at
https://docs.stirlingpdf.com/analytics-telemetry

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
2025-10-16 12:21:52 +01:00
Balázs Szücs
06efab5cb2
fix(sanitize): fix JavaScript handling, embedded file sanitization (#4652)
# Description of Changes

### Fixes
- Added document-level JavaScript removal: Now removes OpenAction and
catalog additional actions (WC, WS, DS, WP, DP) that execute on document
open, save, print, and close events
- Added page-level JavaScript removal: Removes page open/close actions
(O, C) that were previously missed
- Added annotation additional actions removal: Removes all 10 annotation
event handlers (Bl, D, E, Fo, PC, PI, PO, PV, U, X) for mouse/focus
events
- Fixed embedded file removal: Corrected implementation to use
`catalog.getNames().setEmbeddedFiles(null)` instead of incorrectly
targeting page resources

### Verification:

Before (after embedded file "removal"):
<img width="706" height="671" alt="image"
src="https://github.com/user-attachments/assets/7d10e1ba-78bc-4094-b28a-0eae3613db3c"
/>
After:
<img width="706" height="671" alt="image"
src="https://github.com/user-attachments/assets/b278c2a6-1605-483f-b39c-1c3aa047acc2"
/>


<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/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)

- [x] 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.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-11 18:37:58 +01:00
Balázs Szücs
085b8795d5
feat(crop): Crop remove outside text (#4499)
# Description of Changes

This PR adds option to remove text outside crop area via Ghostscript.
### Crop feature enhancements

- Added a checkbox to the `crop.html` template and a corresponding label
in the English properties file to allow users to select "Remove text
outside crop (retains images)" when cropping PDFs.
- Updated the `CropPdfForm` model to include a new boolean property
`removeDataOutsideCrop` to capture the user's selection.
<img width="1418" height="815" alt="image"
src="https://github.com/user-attachments/assets/47785372-7609-4637-ab3b-f05ab6d95957"
/>


### Backend logic changes

- Modified the `CropController` so that if `removeDataOutsideCrop` is
true, cropping is performed using a two-step process: first setting the
crop box with PDFBox, then using Ghostscript to remove data outside the
crop box. Otherwise, the crop is performed using only PDFBox.
- Added necessary imports for handling files, paths, and process
execution to support the new Ghostscript-based cropping workflow.

### Endpoint configuration

- Registered the new "crop" endpoint under the "Ghostscript" group in
the endpoint configuration, enabling routing for the enhanced cropping
feature.

### UI
<img width="671" height="867" alt="image"
src="https://github.com/user-attachments/assets/ad01fcd4-343b-40e8-9345-135bdf746ca4"
/>

### Sample files/Verification
Before:
<img width="969" height="747" alt="image"
src="https://github.com/user-attachments/assets/d5a205f7-0aaf-4990-9b24-43e9ef9cf716"
/>

After:
<img width="1165" height="690" alt="image"
src="https://github.com/user-attachments/assets/7c73e35b-c52b-4be2-a892-72f0125f66b4"
/>

See for yourself with:

[true-pdf-sample-1_cropped.pdf](https://github.com/user-attachments/files/22546716/true-pdf-sample-1_cropped.pdf)
other sample PDF:

[output.pdf](https://github.com/user-attachments/files/22546785/output.pdf)

Closes #2652

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/devGuide/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/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-11 18:35:24 +01:00
Balázs Szücs
fda1d6bc73
fix(repair): suppress corrupted PDF error/warning banner on repair page (#4434)
# Description of Changes

Updated JS/HTML to ignore PDF corruption warning on repair-pdf html,
since if user is already there, it may be safely assumed that the user
is well-aware about said PDF corruption, and does not actually benefit
from the information

Closes:  #4432

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## 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/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)
- [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/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)

- [x] 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.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-11 18:23:44 +01:00