mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-07-23 13:45:21 +00:00
feat: add Thai language support and corresponding font for watermarking (#3819)
# Description of Changes This pull request adds support for Thai language in the watermark functionality. ### Backend updates: * [`stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java`](diffhunk://#diff-73e8448c42af57bb0549146473b5e7edc063533694813dfda7214e51005a90daR173-R175): Added a new case for "thai" in the `addTextWatermark` method to use the `NotoSansThai-Regular.ttf` font for Thai text. ### Frontend updates: * [`stirling-pdf/src/main/resources/templates/security/add-watermark.html`](diffhunk://#diff-dc75a6b50ba2a29c6cb17f0cfa65e4ffac88102d5834ea40fc9d9b3b4d00f8f3R41): Added a new option for Thai language (`ไทย`) in the language dropdown menu for watermark customization.  ### Sample PDF:  [dummy_watermarked.pdf](https://github.com/user-attachments/files/20903700/dummy_watermarked.pdf) Closes #3810 --- ## 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) - [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/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
parent
1e17242023
commit
212d4d0dcb
@ -170,6 +170,9 @@ public class WatermarkController {
|
||||
case "chinese":
|
||||
resourceDir = "static/fonts/SimSun.ttf";
|
||||
break;
|
||||
case "thai":
|
||||
resourceDir = "static/fonts/NotoSansThai-Regular.ttf";
|
||||
break;
|
||||
case "roman":
|
||||
default:
|
||||
resourceDir = "static/fonts/NotoSans-Regular.ttf";
|
||||
|
Binary file not shown.
@ -38,6 +38,7 @@
|
||||
<option value="japanese">日本語</option>
|
||||
<option value="korean">한국어</option>
|
||||
<option value="chinese">简体中文</option>
|
||||
<option value="thai">ไทย</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="watermarkTextGroup" class="mb-3">
|
||||
|
Loading…
x
Reference in New Issue
Block a user