# Description
1. **Conditional Support for DatabaseController**:
- The `DatabaseController` is now annotated with
`@Conditional(H2SQLCondition.class)` to ensure it is only available for
H2SQL database setups.
- This prevents unnecessary exposure of endpoints when the application
is configured for H2SQL.
2. **Database Web Template Adjustments**:
- The UI elements related to database management are conditionally
hidden when the database type is not supported (e.g., `databaseVersion
== 'Unknown'`).
- Improves user experience by avoiding unsupported operations for
non-H2SQL or unknown databases.
3. **Model Attribute Updates**:
- Added a check in `DatabaseWebController` to set an informational
message (`notSupported`) when the database version is unknown.
4. **H2 Database Compatibility**:
- Additional adjustments to ensure the application gracefully handles
H2-specific functionality without affecting other database
configurations.
5. **Build File Updates**:
- Updated the `build.gradle` file to exclude `H2SQLCondition` and
related controllers when specific configurations (e.g., security or
database type) are disabled.
### Benefits:
- Enhances application flexibility by adapting to the configured
database type.
- Improves user feedback with clear messaging and UI adjustments for
unsupported operations.
- Prevents accidental exposure of database endpoints in H2SQL setups.
## Checklist
- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have performed a self-review of my own code
- [ ] I have attached images of the change if it is UI based
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] If my code has heavily changed functionality I have updated
relevant docs on [Stirling-PDFs doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
- [x] My changes generate no new warnings
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
# Description
Implemented custom page selection for the pdf-to-image feature, allowing
users to specify which PDF pages to convert to images.
1. Variable Renaming: Changed singleOrMultiple to imageResultType
because it supports three options: single, multiple, and custom.
2. New Field: Added pageNumbers to accept user-defined page selections.
This field appears only when custom is selected in the UI.
3. New Method: Added getPageIndicesToConvert to process and validate the
specified page numbers.
4. Method Update: Updated convertFromPdf to handle custom page numbers,
ensuring only selected pages are converted.
5. Translation Properties: Added two new English translation properties,
custom and customPageNumber, to all language files with placeholder
values. These will need to be translated into country-specific languages
in the future.
Note: If an invalid page number is provided (zero, negative, or exceeds
page count), a single image containing all PDF pages is generated.
Closes#918
## Checklist
- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have performed a self-review of my own code
- [x] I have attached images of the change if it is UI based
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] If my code has heavily changed functionality I have updated
relevant docs on [Stirling-PDFs doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
- [x] My changes generate no new warnings
- [x] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
![Screenshot 2025-01-02 at 12 31
29 AM](https://github.com/user-attachments/assets/c4ba3f31-5dd6-4a17-991e-51b86c2eb466)
![Screenshot 2025-01-02 at 12 31
49 AM](https://github.com/user-attachments/assets/3e800a95-2088-4f69-8a01-bd03d7b9e471)
---------
Co-authored-by: Sai Kumar J <saikumar@Sais-MacBook-Air.local>
Co-authored-by: Ludy <Ludy87@users.noreply.github.com>
Co-authored-by: saikumar <saikumar.jetti@gmail.com>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* added custom color selection for Watermark
* using the same translation as AddStampRequest.customColor for the new watermark.customColor
* fixed the space issue between words
* Implement Command class for Command Pattern
Created a base `Command` class to implement the **Command Pattern**. This class provides a skeletal implementation for `execute`, `undo`, and `redo` methods.
**Note:** This class is intended to be subclassed and not instantiated directly.
* Add undo/redo stacks and operations
* Use rotate element command to perform execute/undo/redo operations
* Handle commands executed through events
- Add "command-execution" event listener to execute commands that are not invoked from the same class while adding the command to the undo stack and clearing the redo stack.
* Add and use rotate all command to rotate/redo/undo all elements
* Use command pattern to delete pages
* Use command pattern for page selection
* Use command pattern to move pages up and down
* Use command pattern to remove selected pages
* Use command pattern to perform the splitting operation
* Add undo/redo functionality with filename input exclusion
- Implement undo (Ctrl+Z) and redo (Ctrl+Y) functionality.
- Prevent undo/redo actions when the filename input field is focused.
- Ensures proper handling of undo/redo actions without interfering with text editing.
* Introduce UndoManager for managing undo/redo operations
- Encapsulate undo/redo stacks and operations within UndoManager.
- Simplify handling of undo/redo functionality through a dedicated manager.
* Call execute on splitAllCommand
- Fix a bug that caused split all functionality to not work as execute() wasn't called on splitAllCommand
* Add undo/redo buttons to multi tool
- Add undo/redo buttons to multi tool
- Dispatch an event upon state change (such as changes in the undo/redo stacks) to update the UI accordingly.
* Add undo/redo to translations
* Replace hard-coded "Undo"/"Redo" with translation keys in multi tool
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* Multitool - Select multiple pages for rotation tool
* Multitool multi select delete feature
* Multitool multi select UI improvements and big fixes
* Multitool multi select select all and UI improvements
* Multi tool multi select, download selected, clean up and bug fixes
* Groundwork for multiselect drag and drop
* Multi select drag and drop finalised
* Update translation files
Signed-off-by: GitHub Action <action@github.com>
* Turn off select mode after multidrag
---------
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update messages_ca_CA.properties
Partial Catalan Translation Contribution for Stirling PDF
Hi,
I’ve completed a partial Catalan translation for Stirling PDF, covering all strings up to the Pipeline section. I focused on maintaining consistency in terminology to ensure a smooth user experience in Catalan.
* Update messages_ca_CA.properties
Update on Catalan Translation Verification – Test 2 Passed
Hi [Developer’s Name],
I’ve now completed the verification for Test 2 and ensured that all keys in messages_en_GB.properties align with those in messages_ca_CA.properties. The files should now be fully synchronized with no missing or extra keys.
I’ll proceed to re-run the tests to confirm everything is in order.
Please feel free to review the updated pull request, and let me know if there’s anything further you’d like me to adjust.
Thank you for your support!
Best regards,
* Catalan Translation - Stirling PDF String Updates
Hi,
I have worked on the Catalan translation for some of the text strings in the Stirling PDF project. Attached are my contributions, which include the relevant strings for various parts of the system. I’ve made a few small adjustments to ensure the translation is as accurate and coherent as possible in technical contexts.
Changes made:
1. Translation of strings related to PDF manipulation tools (e.g., Add Watermark, Split PDF, etc.).
2. Adjustments of terms for better accuracy, such as using “Eliminar” instead of “Treure” or “Esborrar”.
3. Review of technical translations to ensure consistency, such as using “Nombre” instead of “Quantitat” for referring to the number of documents or pages.
Attached are the modified strings for your review:
• [Attach the modified strings file]
If you have any questions or need further adjustments, I’m happy to help.
Thank you for your attention and for all your work on the project!
Best regards,
* Catalan Translation - Stirling PDF String Updates
Hi,
I have worked on the Catalan translation for some of the text strings in the Stirling PDF project. Attached are my contributions, which include the relevant strings for various parts of the system. I’ve made a few small adjustments to ensure the translation is as accurate and coherent as possible in technical contexts.
Changes made:
1. Translation of strings related to PDF manipulation tools (e.g., Add Watermark, Split PDF, etc.).
2. Adjustments of terms for better accuracy, such as using “Eliminar” instead of “Treure” or “Esborrar”.
3. Review of technical translations to ensure consistency, such as using “Nombre” instead of “Quantitat” for referring to the number of documents or pages.
Attached are the modified strings for your review:
• [Attach the modified strings file]
If you have any questions or need further adjustments, I’m happy to help.
Thank you for your attention and for all your work on the project!
Best regards,
* Catalan Translation - Stirling PDF String Updates
Hi,
I have worked on the Catalan translation for some of the text strings in the Stirling PDF project. Attached are my contributions, which include the relevant strings for various parts of the system. I’ve made a few small adjustments to ensure the translation is as accurate and coherent as possible in technical contexts.
Changes made:
1. Translation of strings related to PDF manipulation tools (e.g., Add Watermark, Split PDF, etc.).
2. Adjustments of terms for better accuracy, such as using “Eliminar” instead of “Treure” or “Esborrar”.
3. Review of technical translations to ensure consistency, such as using “Nombre” instead of “Quantitat” for referring to the number of documents or pages.
Attached are the modified strings for your review:
• [Attach the modified strings file]
If you have any questions or need further adjustments, I’m happy to help.
Thank you for your attention and for all your work on the project!
Best regards,
* Catalan Translation - Stirling PDF String Updates
* 📝 Sync README
> Made via sync_files.yml
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update messages_ca_CA.properties
Partial Catalan Translation Contribution for Stirling PDF
Hi,
I’ve completed a partial Catalan translation for Stirling PDF, covering all strings up to the Pipeline section. I focused on maintaining consistency in terminology to ensure a smooth user experience in Catalan.
* Update messages_ca_CA.properties
Update on Catalan Translation Verification – Test 2 Passed
Hi [Developer’s Name],
I’ve now completed the verification for Test 2 and ensured that all keys in messages_en_GB.properties align with those in messages_ca_CA.properties. The files should now be fully synchronized with no missing or extra keys.
I’ll proceed to re-run the tests to confirm everything is in order.
Please feel free to review the updated pull request, and let me know if there’s anything further you’d like me to adjust.
Thank you for your support!
Best regards,
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* fix: use gs to convert to pdfa and return output by reading file as bytes
* feat: update translation files for pdfToPDFA.credit
* Hardening suggestions for Stirling-PDF / fix_pdfa_conversion (#1908)
Switch order of literals to prevent NullPointerException
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
* Add image support to multi-tool page
Related to #278
* changes to support image types
* final touches
* final touches
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* final touches
Signed-off-by: a <a>
* Update translation files (#1888)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
---------
Signed-off-by: a <a>
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: a <a>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
* preparing to switch to a new database version
* add PreAuthorize
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>