Justify text alignment using jsPDF
See original GitHub issueHi All,
May I just ask if the justify alignment is possible using jsPDF? Especially, when I used the split_text_to_size.js
plugin.
Below is the method that I used to fit my long texts in the pdf. `function getSplitText(text, doc){ var maxLength = doc.internal.pageSize.width - 60;
var splitText = doc.splitTextToSize(text, maxLength);
return splitText;
}`
They are currently aligned LEFT.
Thank you very much!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
jsPDF justify text - javascript - Stack Overflow
In jspdf. js (L:1413) I have added this code: if (align) { ... else if (align === 'justify') { left = x; }...
Read more >Justify text alignment using jsPDF · Issue #1245 - GitHub
Hi All, May I just ask if the justify alignment is possible using jsPDF? Especially, when I used the split_text_to_size.js plugin.
Read more >How to align text in center using jspdf? - Coders Diaries
I am using jsPDF for my project where have to create a PDF from user submitted data. I want to align text in...
Read more >change font face, fontsize, text align and rotated text in jspdf
Learn how to change font face, fontsize, text align and rotated text in jspdf.Gears List:Apple AirPods Pro: https://amzn.to/3QYEKtjFire TV ...
Read more >how to align text in center using jspdf
Using a style sheet property. You can center text with CSS by specifying the text-align property of the element to be centered.. Centering...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JPaulPunzalan not sure about justified text but the text can be centred by using doc.text(text,left,top,‘center’)
#1016