mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
e7631cf80c
197 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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>
|
||
|
|
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. |
||
|
|
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.
|
||
|
|
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. |
||
|
|
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.
|
||
|
|
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> |
||
|
|
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. |
||
|
|
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> |
||
|
|
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> |
||
|
|
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("userName")</code>, but can now be done with <code>Path.of("userName")</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> { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [{ </tr></table> </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
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> |
||
|
|
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> |
||
|
|
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 |
||
|
|
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. [](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> |
||
|
|
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=" |
||
|
|
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. |
||
|
|
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=" |
||
|
|
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. |
||
|
|
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 |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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. |
||
|
|
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> |
||
|
|
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. |
||
|
|
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.
|
||
|
|
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> |
||
|
|
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. |
||
|
|
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. - [ ] |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
60c7ba40a6
|
fix(scale): Throw exceptions for invalid page size instead of returning null in getTargetSize method (#4460)
# Description of Changes
Fixed getTargetSize to never make an early null return, instead throw an
appropriate customException when the submitted doc has 0 pages.
### Why this change was made:
- If getTargetSize returned null, the call targetSize.getWidth() would
throw a NullPointerException immediately.
- PDDocument.getNumberOfPages() can be 0 e.g., new PDDocument() or a
loader/factory that produced an empty document for a malformed or
partial upload, or a custom pdfDocumentFactory that creates an empty
document in some error paths.
- Replacing the null return with throw
ExceptionUtils.createInvalidPageSizeException("KEEP"): it fails fast
with a clear error instead of producing an NPE.
<!--
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>
|
||
|
|
13a6fb9cfe
|
Update Hungarian translations for improved consistency and clarity. (#4623)
# Description of Changes Re-read the translations, translated some missing ones, improved some translations, and fixed my previous missing of inconsistent (grammatically both correct) translation. <!-- 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> |
||
|
|
df870e6902
|
fix(replace-and-invert-color): preserve original filename with '-inverted.pdf' suffix for output (#4594)
# Description of Changes As the PR name suggests, replace-and-invert-color returned files _only_ named inverted.pdf instead of original name + inverted.pdf. <!-- 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> |
||
|
|
599beb7912
|
feat(pdf-to-cbr): integrate RAR for CBR output generation (#4626)
# Description of Changes This pull request introduces full support for generating true CBR (Comic Book RAR) archives from PDF files using the local RAR CLI ### CBR Conversion Implementation: - Refactored `PdfToCbrUtils.java` to generate image files for each PDF page, invoke the RAR CLI to create a `.cbr` archive, and clean up temporary files after conversion.. ### Dependency & Endpoint Management: - Added RAR as a required external dependency in `ExternalAppDepConfig.java` and checks for its availability, disabling related endpoints if missing. - Registered new endpoints under the "RAR" group in `EndpointConfiguration.java` and updated group validation logic. ### Controller and API Updates: - Updated the API controller to clarify that the output is a true CBR archive created with RAR, not ZIP-based. - Modified the web controller to check for endpoint availability and return a 404 error if the CBR conversion feature is disabled. ### Sample logs/verification: Conversion command > 23:12:41.552 [qtp1634254747-43] INFO s.s.common.util.ProcessExecutor - Running command: rar a -m5 -ep1 output.cbr page_001.png > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - RAR 7.12 Copyright (c) 1993-2025 Alexander Roshal 23 Jun 2025 > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - Trial version Type 'rar -?' for help > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - Evaluation copy. Please register. > 23:12:41.571 [Thread-25] INFO s.s.common.util.ProcessExecutor - > 23:12:41.572 [Thread-25] INFO s.s.common.util.ProcessExecutor - Creating archive output.cbr > 23:12:41.578 [Thread-25] INFO s.s.common.util.ProcessExecutor - > 23:12:41.587 [Thread-25] INFO s.s.common.util.ProcessExecutor - Adding page_001.png OK > 23:12:41.587 [Thread-25] INFO s.s.common.util.ProcessExecutor - Done Verification whether its RAR (not included in the code; was to verify whether the code works) > ~/Downloads > ❯ unrar l lorem-ipsum_converted.cbr > > UNRAR 7.12 freeware Copyright (c) 1993-2025 Alexander Roshal > > Archive: lorem-ipsum_converted.cbr > Details: RAR 5 > > Attributes Size Date Time Name > ----------- --------- ---------- ----- ---- > -rw-r--r-- 105955 2025-10-07 23:12 page_001.png > ----------- --------- ---------- ----- ---- > 105955 1 Logs on startup with no RAR CLI > INFO:unoserver:Started. > 12:09:16.592 [main] INFO s.s.p.s.configuration.DatabaseConfig - Using default H2 database > INFO:unoserver:Server PID: 46 > 12:09:21.281 [main] INFO s.s.c.config.TempFileConfiguration - Created temporary directory: /tmp/stirling-pdf/stirling-pdf > 12:09:21.329 [main] WARN s.s.SPDF.config.ExternalAppDepConfig - Missing dependency: rar - Disabling group: RAR (Affected features: Pdf/cbr, PDF To Cbr) > 12:09:22.066 [main] INFO s.s.S.config.EndpointConfiguration - Disabled tool groups: RAR (endpoints may have alternative implementations) > 12:09:22.066 [main] INFO s.s.S.config.EndpointConfiguration - Disabled functional groups: enterprise > 12:09:22.066 [main] INFO s.s.S.config.EndpointConfiguration - Total disabled endpoints: 3. Disabled endpoints: pdf-to-cbr, pdf/cbr, url-to-pdf > 12:09:22.407 [main] INFO s.s.p.s.service.DatabaseService - Source directory does not exist: configs/db/backup > 12:09:23.092 [main] INFO s.software.common.util.FileMonitor - Monitoring directory: ./pipeline/watchedFolders > 12:09:23.721 [main] INFO s.s.c.service.TempFileCleanupService - Created LibreOffice temp directory: /tmp/stirling-pdf/stirling-pdf/libreoffice <!-- 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> |
||
|
|
0a02e3e231
|
build(deps): bump io.micrometer:micrometer-core from 1.15.3 to 1.15.4 (#4420)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.15.3 to 1.15.4. <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.4</h2> <h2>🐞 Bug Fixes</h2> <ul> <li>NettyAllocatorMetrics should not prevent collecting executors <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6641">#6641</a></li> <li>[JOOQ] MetricsDSLContext - fetchExists doesn't report provided tags <a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6583">#6583</a></li> </ul> <h2>📔 Documentation</h2> <ul> <li>add compatibility note for jOOQ overload delegation <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6681">#6681</a></li> </ul> <h2>🔨 Dependency Upgrades</h2> <ul> <li>Bump dropwizard-metrics from 4.2.33 to 4.2.36 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6677">#6677</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/HeeChanN"><code>@HeeChanN</code></a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
c229fff250
|
feat(i18n): add German translations for CBR/CBZ comic conversion tools (#4597)
# Description of Changes - Added missing German translations for **CBR ⇄ PDF** and **PDF ⇄ CBR** conversions. - Improved and localized existing CBZ translation strings for better consistency. - Added new UI labels such as optimization hints and DPI explanations for comic-related tools. --- ## 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. |
||
|
|
6364f0d001
|
Update Hungarian translations (#4573)
# Description of Changes Updated new strings to hungarian like CBZ converter related stuff, Invalid URL etc... <!-- 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: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> |
||
|
|
b9fdd8823e
|
🌐 Sync Translations + Update README Progress Table (#4606)
### 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> |
||
|
|
d2ffef215a
|
🌐 Update messages_ru_RU.properties (#4577)
Updated Russian translation |
||
|
|
3476c36a2a
|
fix(scanner-effect): lower default DPI in ScannerEffectRequest (#4565)
# Description of Changes On High preset the Scanner-effect request was blocked on default since max DPI is 500. This meant if users **tried** to use Scannereffect on default DPI limit, and default ScannerEffect setting then they would get error. This update lowers default high preset's DPI to 300 so that is under the default limit. <!-- 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> |
||
|
|
24cb3252a4
|
Update messages_it_IT.properties (#4563)
# 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. |
||
|
|
ec1ac4cb2d
|
feat(cbr-to-pdf,pdf-to-cbr): add PDF to/from CBR conversion with ebook optimization option (#4581)
# Description of Changes This pull request adds support for converting CBR (Comic Book RAR) files to PDF, optimizes CBZ/CBR-to-PDF conversion for e-readers using Ghostscript, and improves file type detection and image file handling. It introduces the `CbrUtils` and `PdfToCbrUtils` utility classes, refactors CBZ conversion logic, and integrates these features into the API controller. The most important changes are grouped below. ### CBR Support and Conversion: - Added the `com.github.junrar:junrar` dependency to support RAR/CBR archive extraction in `build.gradle`. (https://github.com/junrar/junrar and https://github.com/junrar/junrar?tab=License-1-ov-file#readme for repo and license) - Introduced the new utility class `CbrUtils` for converting CBR files to PDF, including image extraction, sorting, and error handling. - Added the `PdfToCbrUtils` utility class to convert PDF files into CBR archives by rendering each page as an image and packaging them. ### CBZ/CBR Conversion Optimization: - Refactored `CbzUtils.convertCbzToPdf` to support optional Ghostscript optimization for e-reader compatibility and added a new method for this. - Added `GeneralUtils.optimizePdfWithGhostscript`, which uses Ghostscript to optimize PDFs for e-readers, and integrated error handling. ### API Controller Integration: - Updated `ConvertImgPDFController` to support CBR conversion, CBZ/CBR optimization toggling, and Ghostscript availability checks. ### Endpoints <img width="1298" height="522" alt="image" src="https://github.com/user-attachments/assets/144d3e03-a637-451a-9c35-f784b2a66dc1" /> <img width="1279" height="472" alt="image" src="https://github.com/user-attachments/assets/879f221d-b775-4224-8edb-a23dbea6a0ca" /> ### UI <img width="384" height="105" alt="image" src="https://github.com/user-attachments/assets/5f861943-0706-4fad-8775-c40a9c1f3170" /> ### File Type and Image Detection Improvements: - Improved file extension detection for comic book files and image files in `CbzUtils` and added a shared regex pattern utility for image files. ### Additional notes: - Please keep in mind new the dependency, this is not dependency-free implementation (as opposed to CBZ converter) - RAR 5 currently not supported. (because JUNRAR does not support it) - Added the new ebook optimization func to GeneralUtils since we'll soon (hopefully) at least 3 book/ebook formats (EPUB, CBZ, CBR) all of which can use it. - Once again this has been thoroughly tested but can't share actual "real life" file due to copyright. Closes: #775 <!-- 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 - [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) - [ ] 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> |
||
|
|
fd95876d8f
|
feat(merge): use metadata for sortByDate (#4461)
# Description of Changes Follow-up for: https://github.com/Stirling-Tools/Stirling-PDF/issues/4233#issuecomment-3299735631 Please read thread there. ### Quick summary: - Paths/BasicFileAttributes for getting creaton/modifcation date ALWAYS resulted on 0 - Comporator, therefore always merged in the order it was handed to it - -\> when calling this was not an issue because front-end arranged the files on right sortByDate - -\> when calling from API however, due to this, it wasn't working ### Fix: - Rely on PDF/XMP metadata on the back-end for merging, while that is also not completely reliable still better Closes: #4233 <!-- 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> |
||
|
|
b661eb8ff0
|
refactor: Replace manual resource handling with try-with-resources (#4593)
# Description of Changes
Explanation on try-with-resource:
> Many resources in Java need be closed after they have been used. If
they are not, the garbage collector cannot reclaim the resources'
memory, and they are still considered to be in use by the operating
system. Such resources are considered to be leaked, which can lead to
performance issues.
>
> Java 7 introduced the try-with-resources statement, which guarantees
that the resource in question will be closed.
>
> try (InputStream input = Files.newInputStream(path)) {
> // "input" will be closed after the execution of this block
> }
>
> This syntax is safer than the traditional method using try, catch, and
finally and hence should be preferred.
https://rules.sonarsource.com/java/tag/java8/RSPEC-2093/
<!--
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>
|