# Description of Changes
### Summary
This PR improves how Stirling-PDF handles the `context-path`
configuration in both backend and frontend components. It ensures proper
URL generation when a custom `context-path` is set in the application
properties. Additionally, it fixes static asset loading issues related
to relative paths.
### Changes Implemented:
- **Backend Enhancements:**
- Introduced `contextPathStatic` as a static variable in
`SPDFApplication.java` to store the configured
`server.servlet.context-path`.
- Modified log outputs and UI initialization URLs to include
`contextPathStatic`.
- Registered `contextPath` as a Spring Bean in `AppConfig.java` to make
it accessible in templates.
- **Frontend Fixes:**
- Updated JavaScript files (`downloader.js`, `home.js`) to dynamically
retrieve and use `contextPath`.
- Adjusted Thymeleaf template files (`navbar.html`, `home.html`,
`merge-pdfs.html`) to reference `contextPath` correctly.
- Fixed incorrect static file paths (`pdf.worker.mjs`, `pdf.mjs`) by
replacing absolute paths (`/`) with relative ones (`./`).
### Why These Changes?
- Fixes issues where deployments under subpaths (e.g.,
`example.com/stirling-pdf/`) resulted in incorrect asset and navigation
links.
- Ensures compatibility with different deployment configurations where
`context-path` is not `/`.
### Challenges Encountered
- Ensuring all JavaScript and template references were correctly updated
to use `contextPath` dynamically.
- Maintaining backward compatibility for deployments that use `/` as the
context path.
Closes#3193#3181
---
## 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/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/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/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/DeveloperGuide.md#6-testing)
for more details.
# Description
## Manual Redaction:
- ### Text Selection-based redaction:
-

- Users can now redact currently selected text by selecting the text
then clicking `ctrl + s` shortcut or by pressing on **apply/save/disk
icon** in the toolbar.
- Users can delete/cancel the redacted area by clicking on the box
containing the text, then clicking on `delete/trash` icon or by using
the shortcut `delete`.
- Users can customize the color of the redacted area/text (after the
redaction was applied) by simply clicking on the box containing the
text/area then clicking on the `color palette` icon and choosing the
color they want.
- Users can choose to select the color of redaction before redacting
text or applying changes (this only affects newly created redaction
areas, to change the color of an existing one; check the previous bullet
point).
- ### Draw/Area-based redaction:
-

- Users can now redact an area in the page by selecting the then
clicking `ctrl + s` shortcut or by pressing on **apply/save/disk icon**
in the toolbar.
- Users can delete/cancel the redacted area by clicking on the drawn
box, then clicking on `delete/trash` icon or by using the shortcut
`delete` (requires temporarily turning off drawing mode).
- Users can customize the color of the redacted area (after the
redaction was applied) by simply clicking on the box containing the area
then clicking on the `color palette` icon and choosing the color they
want.
- Users can choose to select the color of redaction before drawing the
box or applying changes (this only affects newly created redaction
areas, to change the color of an existing one; check the previous bullet
point).
- ### Page-based redaction:
-

- Users can now redact **ENTIRE** pages by specifying the page
number(s), range(s) or functions.
- Users can customize the color of page-based redaction (doesn't affect
text-based nor draw-based redactions).
### Redaction modes:
There are three modes of redaction/operation currently supported
- Text Selection-based redaction (TEXT)
- Draw/Area-based redaction (DRAWING)
- None - by simply not choosing any of the above modes (NONE).
## How to use:
- **Text Selection-based redaction:** click on this icon in the toolbar

to enable `text-selection redaction mode` then select the text you want
to redact then press `ctrl + s` or click on the disk/save icon
.
- **Draw/Area-based redaction:** click on this icon in the toolbar

to enable `draw/area-based redaction` then `left mouse click (LMB)` on
the starting point of the rectangle, then once you are satisfied with
the rectangle's placement/dimensions then `left mouse click (LMB)` again
to apply the redaction.
- **Example:** `Left mouse click (LMB)` then move mouse to the right
then bottom then `Left mouse click (LMB)`.
- Note: Red box/rectangle borders indicate that you have not yet saved
(you need to left click on the page to save)

once saved the borders will become green

(they also become clickable/hover-able when drawing mode is off).
- **Page-based redactions:**: Insert the page number(s), range(s) and/or
functions (separated by `,`) then select your preferred color and click
on `Redact` to submit.

- **Color Customizations:**
- You can change the redaction color for new redactions by clicking on
this icon in the toolbar
.
- You can change the redaction color for existing redactions by hovering
over the redaction box then clicking on it (`Left mouse click LMB`) then
clicking on color palette (highlighted in red in the picture)

then select your preferred color.
- **Deletions:**
- You can delete a redacted area by hovering over the redaction box then
clicking on it (`Left mouse click LMB`) then clicking on the trash icon
(highlighted in red in the picture)
.
## Card in the home page:

Closes#465
## 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
- [ ] 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/)
- [ ] 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)
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
* 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 feautre group header fragment for homepage.
* Add feature group headers to feature groups.
* Style feature groups.
* Add collapsing/expanding functionality as well as a favorites section.
* Cards are now sorted in the order of update link > favorite > alphabetical on the homepage.
* Decrease space between section title and cards.
* Add filtering buttons and view options to homepage.
* Hide list view button in preparation for release.
---------
Co-authored-by: FiratUsta <ahmetfiratusta@gmail.com>
* 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.
* UI: settings show/hide update display
This PR replaces the PR #1003
In this PR, the visual for available update is added to the foreground.
There are new settings to generally show/hide the update display, and only administrators receive the update display.
* change to `Bean`
* Update AppUpdateShowService.java
* add update message
* revision service
* change shouldShow
* Update githubVersion.js
* rm folder
* Update AppUpdateService.java