Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.75k stars 647 forks source link

Arabic text with numbers, numbers gets reversed. #1450

Open mohammed-bahumaish opened 1 year ago

mohammed-bahumaish commented 1 year ago

What were you trying to do?

Writing Arabic text line with numbers.

How did you attempt to do it?

I embedded a custom font like the following https://github.com/Hopding/pdf-lib#fonts-and-unicode.

What actually happened?

When an Arabic text line has numbers like سعر 12345

What did you expect to happen?

What gets generated in the pdf is سعر 54321 numbers gets reversed.

How can we reproduce the issue?

live demo

Embeding Arabic font like https://github.com/Hopding/pdf-lib#fonts-and-unicode. Then generate a pdf with Arabic text and numbers سعر 12345 by page.drawText

Version

1.17.1

What environment are you running pdf-lib in?

Browser

Checklist

Additional Notes

No response

Subhajitdas298 commented 10 months ago

Same issue here? Any solution?

Simolation commented 1 month ago

Did anyone find a solution for that?

mrnoobnoobies commented 1 month ago

any solution?