Text Misalignment for Arabic in PDF Editor Using pdf-lib #1743
Unanswered
Shaheer388
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Fabric.js on the frontend for a PDF editor, and pdf-lib to apply fields to the PDF for later retrieval. Everything works fine with English text. However, when using Arabic text, it shifts downward from its intended position and appears cropped.
I tried vertical alignment, but only horizontal alignment works when using
field.setAlignment(TextAlignment.Center)
. I need the Arabic text to be fully visible and not cropped.Any suggestions would be greatly appreciated. Thanks in advance!
With Fabric.js:

With pdf-lib:

Code:
Beta Was this translation helpful? Give feedback.
All reactions