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

RTL reverse the Numbers (BUG) #3224

Closed
liorokach opened this issue Aug 2, 2021 · 2 comments · May be fixed by #3171
Closed

RTL reverse the Numbers (BUG) #3224

liorokach opened this issue Aug 2, 2021 · 2 comments · May be fixed by #3171

Comments

@liorokach
Copy link

liorokach commented Aug 2, 2021

Hello,
Numbers are always left to right...that just how numbers like.
The Question is why in RTL the numbers flipped and shown in RTL? that bug is probably started somewhere between 1.5.3 and 2.3.1.

Im using jsPDF + jspdf-autotable to create a pdf file in RTL- (i add hebrew font as should and it works just fine).
In my old system i'm using jsPDF - V1.5.3 and everything works just fine.
Now i'm trying to create the same pdf export - the different is only that i use React and different version of jsPDF(the old system was vanilla js).
Using jsPDF - V2.3.1(can't work with V1.5.3 - has some errors when start react).
In my output numbers get flipped(the RTL for some reason flip them - this behaviour is not exists in my old system).
As you can see here: the first column is dates in august(should be "02/08 | 03/08 ......")
flipped

Here is my code - but again - the same code works fine with jsVanilla and old version 1.5.3.

var doc = new jsPDF({'unit':'px',format:'a4'}); doc.setProperties({ title: 'example' }); doc.setFont("VarelaRound-Regular","normal"); doc.setFontSize(6); doc.setR2L(true); doc.autoTable({ head: thead, body: tableBody, startY: 30, headStyles: {font: "SecularOne-Regular",fontStyle:"normal",fontSize:fontSize + 1}, bodyStyles: {lineWidth:0.2}, styles: {textColor:[1,1,1],halign:'center',font: "VarelaRound-Regular",fontStyle:"normal",fontSize:fontSize,cellPadding:{top: 2, right: 1, bottom: 2, left: 1}} });

Please help me:)
Maybe something has changed between the versions in the RTL code?

@liorokach liorokach changed the title RTL flipped the numbers as well RTL doing a reverse on Numbers (BUG) Aug 3, 2021
@liorokach liorokach changed the title RTL doing a reverse on Numbers (BUG) RTL reverse the Numbers (BUG) Aug 3, 2021
@HackbrettXXX
Copy link
Collaborator

I think that's the bug that's supposed to be fixed in #3171.

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants