Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

added support for new line break in stampController #2370

Conversation

saikumarjetti
Copy link
Contributor

Description

This PR fixes the issue where the stampText feature was showing "\n" as plain text instead of interpreting it as line breaks.

Summary of Changes:

  • Added support for handling line breaks in stampText, splitting the input text into multiple lines wherever \n is encountered.
  • Calculated line height using the font's ascent and descent metrics, ensuring proper spacing between lines regardless of font size or style.

Closes #(2345)

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:S This PR changes 10-29 lines, ignoring generated files. Bug Something isn't working labels Nov 30, 2024
@github-actions github-actions bot added Java Pull requests that update Java code Back End Issues related to back-end development API API-related issues or pull requests labels Nov 30, 2024
@Frooodle Frooodle merged commit 3c0a807 into Stirling-Tools:main Dec 2, 2024
2 checks passed
@saikumarjetti saikumarjetti deleted the Support-for-line-breaks-with-stamps branch December 2, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API-related issues or pull requests Back End Issues related to back-end development Bug Something isn't working Java Pull requests that update Java code size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants