Centering a multiline rotated text isn't working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 31.3k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
In an Ionic/Angular app, I have a multiline text that is rotated with 45 degree, and when the text has the property align: 'left', the export is working fine. But once I change this property to align: 'center', the result is inappropriate, and the second line of the text moves to the very bottom-left corner of the page.
This is a stackblitz example, where the text has the property align: 'center', and rotated with 45 degree.
Please note that:
- The same problem happens when the alignment is set to
right. - With non rotated text, everything works fine, whatever the value of
alignis. - In my example I am using the version
2.2.0ofjspdfsince2.3.1isn't working on stackblitz. But in my development environment I am using2.3.1, and I am facing the same problem.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz example and reproduce the multiline text behavior in jsPDF 2.2.0, then compare it with 2.3.1 if available. Check rotated text using left, center, and right alignment; done means centered and right-aligned multiline text remains positioned correctly instead of moving the second line to the page corner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100