Skip to content

How to change document text encoding or specify encoding of rendered text #239

Closed Answered by gettalong
PetrKaleta asked this question in Q&A
Discussion options

You must be logged in to vote

So, the first error you get Type1 encoding has no codepoint for ecaron (HexaPDF::Error) is expected since the default encoding used by HexaPDF (which is not related to any encoding used in an opened PDF) just doesn't contain that codepoint.

As you found out you can work around this by using the custom_encoding: true option. When I reproduce this I get the following result (in various viewers like okular, evince and Adobe Reader)

It also works with mupdf on Android. So my guess is that the viewer you are using on Android can't handle non-standard Type1 encodings.

What you can try is using a TrueType font instead. This will also allow you to display much more characters.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by PetrKaleta
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants