Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Text color selection for watermark #2415

Merged

Conversation

saikumarjetti
Copy link
Contributor

@saikumarjetti saikumarjetti commented Dec 7, 2024

Description

This PR addresses Feature Request #369 by adding the ability for users to select a custom text color for watermarks in PDF documents.

Key Changes

WatermarkController.java

  • Added customColor support in the addWatermark method.
  • Updated logic to apply the custom color to watermark text.

AddWatermarkRequest.java

Introduced customColor field with a default value of #d3d3d3.

Localization

Added watermark.customColor key to all existing Localization files with values matching addWatermarkRequest.customColor to ensure consistency across languages.

add-watermark.html

  • Included a color picker for customColor in the UI.
  • Added JavaScript to update the color picker’s background based on user selection.

Screenshot 2024-12-07 at 5 34 06 PM

Closes #369

Checklist

  • I have read the Contribution Guidelines
  • I have performed a self-review of my own code
  • 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
  • My changes generate no new warnings
  • I have read the section Add New Translation Tags (for new translation tags only)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Dec 7, 2024
@github-actions github-actions bot added Java Pull requests that update Java code Front End Issues or pull requests related to front-end development Back End Issues related to back-end development Translation API API-related issues or pull requests labels Dec 7, 2024
Copy link
Contributor

github-actions bot commented Dec 7, 2024

🚀 Translation Verification Summary

🔄 Reference Branch: pr-branch

📃 File Check: messages_ar_AR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_az_AZ.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_bg_BG.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ca_CA.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_cs_CZ.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_da_DK.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_de_DE.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_el_GR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_en_US.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_es_ES.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_eu_ES.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_fr_FR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ga_IE.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_hi_IN.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_hr_HR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_hu_HU.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_id_ID.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_it_IT.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ja_JP.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ko_KR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_nl_NL.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_no_NB.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_pl_PL.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_pt_BR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_pt_PT.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ro_RO.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_ru_RU.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_sk_SK.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_sr_LATN_RS.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_sv_SE.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_th_TH.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_tr_TR.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_uk_UA.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_vi_VN.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_zh_CN.properties

  1. Test Status:Passed
  2. Test Status:Passed

📃 File Check: messages_zh_TW.properties

  1. Test Status:Passed
  2. Test Status:Passed

✅ Overall Check Status: Success

Thanks @saikumarjetti for your help in keeping the translations up to date.

@Frooodle Frooodle merged commit b47df3d into Stirling-Tools:main Dec 7, 2024
8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
API API-related issues or pull requests Back End Issues related to back-end development enhancement New feature or request Front End Issues or pull requests related to front-end development Java Pull requests that update Java code size:M This PR changes 30-99 lines, ignoring generated files. Translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] - Text color selection (Watermark)
2 participants