You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to display french and arabic text in a pdf using Lopdf but the accents in the french text is displayed in random symbols and all letter in the arabic text are displayed in rectangles.
When rendering text, the parameter to Tj is normally not text, but some indices that are only valid for this PDF file.
The indices are then looked up in the cmap of the font (which you would also have to create).
The cmap then maps character IDs (CIDs) to glyph IDs (GIDs) in the font.
Some explanation on the difference between character and glyph from the PDF spec:
A character is an abstract symbol, whereas a glyph is a specific graphical rendering of a character.
lopdf does not offer an interface at the moment that would make this process easier.
Hello,
I'm trying to display french and arabic text in a pdf using Lopdf but the accents in the french text is displayed in random symbols and all letter in the arabic text are displayed in rectangles.
Sample of my code:
Using:
lopdf = "0.32.0"
MacOS: v12.7.3
rustc 1.79.0 (129f3b996 2024-06-10)
Any idea how to fix this? Thank you so much!
The text was updated successfully, but these errors were encountered: