New Forum | Previous | Next | (P-PDF) Developers
Topic: Insert Unicode to PDF
Conf: (P-PDF) Developers, Msg: 110056
Date: 4/21/2004 01:10 AM
I am trying to insert unicode text, using unicode fonts into pdf. I am using Adobe PDFL6.01
Beside one font which I was able to insert properly (I see good results - pushkin.ttf), with all other fonts (unicode) I see "??" in my output PDF instead of the characters.
This is what I am doing:
1. Font creation.
I am looking for system font matching a unicode font name (e.g. Arial Unicode MS), and than creating a PDEFont from PDESysFont. I than embbed this font according to embbeding permission (full embbed, subset or none. etc.)
2. Text creation
I get ASText for unicode values I have. Than get best encoding and than the string for the encoding.
Than passing the string value to PDETextAdd(..) function
asText = ASTextFromUnicode ((const ASUns16*)pContent, kUTF16HostEndian);
ASHostEncoding encoding = ASTextGetBestEncoding (asText, (ASHostEncoding)PDGetHostEncoding());
const char *szEncoded = ASTextGetEncoded (asText, encoding);
What am I doing wrong ?
Why I see good results with one font and not other unicode fonts?
Is any additional work need to be done in font creation area ? text creation area ?