Hi - just to report back, encoding using a new font works perfectly,
and best results are achieved with Arial Unicode MS which seems to
have extensive character set support. Thanks!

I suspect that the encoding function should really check all known
names rather than accepting the first and failing when it is not
found, but I don't have time to modify the source code at this point
to check this theory out.

Once again, thanks for all the great help.

Malcolm.





On 15 February 2018 at 16:47, Tilman Hausherr <thaush...@t-online.de> wrote:
> See https://pdfbox.apache.org/2.0/faq.html#fontencoding , please try with a
> new font instead of the existing font.
>
> 041E has two names in the Adobe glyphlist, "Ocyrillic" and later
> "afii10032". Ocyrillic comes first, so that one is used.
>
> Tilman
>
>
> Am 15.02.2018 um 09:27 schrieb Malcolm Vincent:
>>
>> Hi,
>>
>> Is there anything special you need to be aware of when using
>> PDFont.encode(unicode-string)
>>
>> I have a PDF with a font resource and when adding to an existing PDF
>> PDFont.encode("unicode string") seems to be throwing a character not found
>> exception.
>>
>> Exception 'U+041E ('Ocyrillic') is not available in this font's encoding:
>> WinAnsiEncoding with differences' : MyriadPro-Light
>>
>> But when I look at the font in the debugger I can see
>>
>> code 18
>> glyphname "afii10032"
>> unicode character "O"
>> glyph "O"
>>
>> and I verified that O by hex'ing it and I get D0 9E which is unicode for
>> U+041E
>>
>> Any help would be appreciated!
>>
>> Cheers
>> Malcolm
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to