Open
Description
Using the html method with HTML element RTL text will result in reversed text for example:
אב -> בא
This can be solved with function before cloning the element or option on the method.
At the moment i solved it with regex + string.replace method,
but that can become an issue in large text.
Activity
[-][feature] Reverse the text in the HTML element while using html method [/-][+]Reverse the text in the HTML element while using html method [/+]HackbrettXXX commentedon Feb 17, 2021
Thanks for the report. Could you check, if this is an issue of html2canvas? To do this, render your HTML markup with html2canvas into an HTML canvas.
nivb52 commentedon Feb 19, 2021
I did check html2canvas, it was printed properly. (i didn't use there package because the resolution was trouble and playing with the numbers was like a guessing game).
HackbrettXXX commentedon Feb 19, 2021
Thanks for checking. Then this is a bug in jsPDF. Could you investigate what's causing it any maybe prepare a pull request?
nivb52 commentedon Feb 19, 2021
okay, I will keep you posted.
ronbiter commentedon May 24, 2021
hey, anything new on this issue? could really use the rtl support for mixed content (I have content written in hebrew + english + numbers) and in the pdf its not printed correctly.
tried to use
setR2L(true)
, it fixed the hebrew but revesed the numbers and the enlish contentnivb52 commentedon May 30, 2021
Sorry, I didn't got to it yet. In the meantime, if it is a short document (less than 10- 20 pages) and you don't have Hebrew and English in the same word you can flip the Hebrew words with simple split,reverse, join.
HackbrettXXX commentedon Sep 14, 2021
Related to #3171.