-
1. Re: Convert text file into pdf with hebrew charcters
lrosenth Dec 9, 2013 1:04 PM (in response to Hezi)Given that WinAnsiEncoding does NOT support Hebrew – that won't work.
You will need to do a full embed of the font and use either a custom encoding or CIDFont.
Details in ISO 32000-1:2008
-
2. Re: Convert text file into pdf with hebrew charcters
Hezi Dec 10, 2013 2:24 AM (in response to lrosenth)Can you post me an example how to embeded Hebrew font?
-
3. Re: Convert text file into pdf with hebrew charcters
Test Screen Name Dec 10, 2013 6:38 AM (in response to Hezi)I recommend you read and reread 32000-1 until an example is superfluous. I do not post examples as policy because it may lead to trying to implement before a full understanding.
If you have any issues with the detail or understanding of 32000-1, we can try to help with that.
-
4. Re: Convert text file into pdf with hebrew charcters
Hezi Dec 11, 2013 4:37 AM (in response to Test Screen Name)Well, I reread it.
I understand I can not use winansi. and I have to embed winsows-1255 or iso-8859-8.
But I can not understand How to embed the encoding in my code?
Help needed
Hezi
-
5. Re: Convert text file into pdf with hebrew charcters
lrosenth Dec 11, 2013 4:54 AM (in response to Hezi)Well, you can't use Windows-1255 or ISO 8859-8 either. You will need to create a custom encoding along with your embed.
Implementation details are very tied to available technology that you may have. Are you running on an OS platform that has APIs for getting/managing fonts? If not, can you use open source solutions that would help you here?
-
6. Re: Convert text file into pdf with hebrew charcters
Hezi Dec 11, 2013 5:05 AM (in response to lrosenth)Hi,
I am running on Windows Server 2008.
Yes, I can use an open source solution, that woukd be very helpful
With Regards,
Hezi
-
7. Re: Convert text file into pdf with hebrew charcters
lrosenth Dec 11, 2013 5:09 AM (in response to Hezi)Then why not just use one of the myriads of existing open source solutions/libraries for PDF generation that already do font embedding (and much more) for you??
-
8. Re: Convert text file into pdf with hebrew charcters
Hezi Dec 11, 2013 5:12 AM (in response to lrosenth)I did not find that convert from test file to pdf with Hebrew font support.
do you have a link for a solution?
How can I get a font in my code?
-
9. Re: Convert text file into pdf with hebrew charcters
Test Screen Name Dec 11, 2013 6:13 AM (in response to Hezi)With respect, I don't think you can have looked very hard for a solution if you cannot find one which does this. However the focus of this group is writing your own code, so....
The Encoding is almost the smallest part of the problem, but the approach is as follows.
Assuming you are NOT using a CID font, the Encoding is an array of names which you generate with Differences etc. The names are standardised, and listed in the "Adobe Glyph List". I assume you have the Unicode values for Hebrew; you can convert the Unicode values to names using the list.
These names must match the encoding actually used in the font. You must embed the font for non-Latin characters (except CJKV). You CANNOT use a non-embedded font. You CANNOT just apply a Hebrew encoding to a standard font like Helvetica. Type 1 fonts are simplest if you can source 1, you should find the encoding if you open it in a text editor (but do NOT save any edits it will break the font).
-
10. Re: Convert text file into pdf with hebrew charcters
Test Screen Name Dec 11, 2013 8:29 AM (in response to Test Screen Name)I have another note which may be useful to you. There are things in PDF that seem simple, such as setting simple text in a non-embedded font using WinANSI encoding. Implementers often make the mistake of assuming that varying this will be almost as simple. In fact, there are many points where an imlementation increases in complexity by an order of magnitude or two. There are a number of key points of that with fonts. These include: first level:
- using non-embedded CJKV fonts
- using embedded Latin1 fonts available in type 1
Second level:
- using other font formats to embed
- using non-Latin single byte fonts
Third level:
- Using multibyte fonts
- Providing language independent Unicode support
These stretch something an experienced programmer could throw together in a day into something that will take many months of detailed research.
I point this out for you to evaluate the relative costs of implementation versus finding an existing solution



