pdf-lib icon indicating copy to clipboard operation
pdf-lib copied to clipboard

Arabic text with numbers, numbers gets reversed.

Open mohammed-bahumaish opened this issue 1 year ago • 3 comments

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

  • [x] My report includes a Short, Self Contained, Correct (Compilable) Example.
  • [X] I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

No response

mohammed-bahumaish avatar Apr 29 '23 01:04 mohammed-bahumaish

Same issue here? Any solution?

Subhajitdas298 avatar Nov 09 '23 13:11 Subhajitdas298

Did anyone find a solution for that?

Simolation avatar Jul 23 '24 13:07 Simolation

any solution?

mrnoobnoobies avatar Aug 03 '24 15:08 mrnoobnoobies