* verifyCerts
* cert info
* Hardening suggestions for Stirling-PDF / certValidate (#2395)
* Protect `readLine()` against DoS
* Switch order of literals to prevent NullPointerException
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
* some basic html excaping and translation fixing
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: a <a>
* Add separate drag and drop area for file choosers
- Add separate drag and drop area for file choosers
### Why?
Previously, when there were multiple file choosers in the same page, if you attempted to drag and drop any files, they would be added to both file choosers as it was designed at first to handle 1 file chooser present, now that we have multiple ones, it is necessary to adapt our design to match the changing functionality.
### Can you not preserve the old overlay when there's only one file chooser present?
Yes, we can, but imagine as a user, you try to drag and drop a file in one page and the fields turn into drag and drop areas then you go to another page and try to drag and drop again but you encounter the old overlay instead, as a user you might get confused and ask yourself "What changed?" or if a user is telling another user the steps to drag and drop files and he didn't know about this case, then it would still be confusing, thus consistency is preferred in this case.
* Update file chooser UI
* Add support for listing and removing selected files and their file icons
- Selected files are listed below the file chooser in a selected files container.
- Users can now remove uploaded/selected files.
- Hide selected files container/box unless there are files selected/uploaded.
- Add separate overlay for each drag & drop area.
## FAQ:
- Why did you assign a unique id to each file? isn't the filename enough?
= Because a user might upload multiple files with the same name, if the user wanted to remove one of them, how would we differentiate between them? we won't be able to unless we assign an identifier, you might argue "we remove based on the filename and size", then what if the user uploaded the same file more than once (intentionally), then we would accidentally remove all the files even though that is not what the user wanted, so going with unique ID approach would prevent this issue/problem from occurring in the first place.
* Rename remove-file css class to remove-selected-file
- Rename remove-file css class to remove-selected-file to avoid css conflict with remove-file in merge.css
* Use input element to dispatch event on file removal
Use the correct element to dispatch "file-input-change" (input element is the correct one).
* Adapt file chooser UI to themes
- Adapt file chooser UI to themes by adjusting their font colors and background colors.
- Make text more visible in overlay by increasing the font size by 0.1rem and setting font weight to 550.
* Remove extra overlay border
- Removing overlay's border as it is unnecessary and only causing a double border issue on the file input container.
* Remove Browse button, highlight file chooser and make it clickable
- Remove browse button.
- Make the entire file chooser container clickable.
- Add glowing effect on hover for file chooser.
- Change color of file chooser on hover.
* Replace crypto.randomUUID() with UUID.uuidv4()
- Replace crypto.randomUUID() with UUID.uuidv4() as crypto.randomUUID() is only supported in secured contexts such as localhost 127.0.0.1 and over HTTPS
* Fix merge file removal not being reflected in file chooser
- Files removed from the list in merge page would now be reflected in the file chooser's container.
* Make inputElement optional in removeFileById
- Make inputElement optional in removeFileById, this way we could control changing inputElements files.
* Add translation support to file chooser
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* 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>
* fix signature logo not loading and add option to disable it
* Hardening suggestions for Stirling-PDF / fix-sig-logo (#2144)
Modernize and secure temp file creation
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
* Implement Diff.js
* Compare feature - add service worker and improve efficiency for large files
* Compare - messages updated to be compatable with language packs
* Compare - Acknowledge Diff.js usage
* Add message warning there is no text in uploaded pdf to messages file
---------
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>
* Added variables
* Added functionality to add font size and font type in both frontend and backend
* new changes suggested has been added
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* Add PDF to WebP
* add swagger param
* back
* creates a custom image for Docker from pymupdf
* Converting with pdf2image and Pillow instead of pymupdf
* webp remove to pdf-to-img
* remove mupdf
* Implemented PdfImageRemovalService.java and PdfImageRemovalController.java. Image can be removed testing using Postman, but the file size doesn't change.
* Fix removal logic in service file to decrease file size.
* Implement "Remove Image" feature on the website
Updated the front-end code to integrate the "Remove Image" feature. The new functionality is now fully operational on the website, allowing users to remove images as expected.
* Add comments to PdfImageRemovalController and PdfImageRemovalService.
* Change the google material icon in navbar, homepage and remove-image-pdf.html.
* Add a checkbox to WatermarkController to convert the pdf to pdf-image
* 381: Fix messages_en_GB
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* preparing to switch to a new database version
* add PreAuthorize
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* Update compare.html
* Update compare.html
* Conform to text requirements
Changed text in some labels to conform to Thymeleaf format.
* Add GB to th:text for label
* Add ODD_EVEN_MERGE sort type
* Add process method to merge odd and even PDF pages
* Add test cases for Odd-Even merge method
* Add Odd-Even Merge mode in PDF Organizer webpage
This also add a new translatable text message variable pdfOrganiser.mode.10 with translation for english and german
* Add ODD_EVEN_MERGE documentation to RearrangePagesRequest
* Add english translation for pdfOrganiser.mode.10
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>