Previous | Next | (P-PDF) What's Wrong with my PDF?
Topic: Adobe PDF Reader won・t display the characters from the Symbol font
Conf: (P-PDF) What's Wrong with my PDF?, Msg: 171177
Date: 8/18/2009 06:35 PM
My program converts text with different fonts to PDF file. I have no problem converting text with regular true type fonts to PDF, but I have difficulties converting characters from the Symbol font to PDF. The Adobe PDF Reader won・t display the characters.
For example, if I convert the degree symbol char (character code 176 or 0xB0) from the Symbol font character set, my PDF file would look something like this:
11 0 obj
/DescendantFonts [12 0 R]
12 0 obj
/CIDSystemInfo 13 0 R
/FontDescriptor 14 0 R
13 0 obj
/Ordering(Identity) /Registry(Adobe) /Supplement 0
14 0 obj
/FontBBox [ 0 -220 1113 1005 ]
/FontFile2 17 0 R
17 0 obj
Notice the program didn・t write out the /ToUnicode and /CIDSet sections, because the PDF format specification document says they are optional.
I suspect the /FontFile2 object (17 0 obj) isn・t written correctly. I use the GetFontData call to get the font data, and then compress it and write it out. The uncompressed size of the Symbol font (/Length1) is 70128, and this could be verified by checking the file size of the actual Symbol font file from \Windows\Fonts folder. So it seems correct. However, if I use the Word program to save the same character from the Symbol font to PDF, and then check the PDF file, its FontFile2 object shows the /Length1 to be 23252.
I don・t know why Word program results in the /Length1 to be 23252 while my program results in /Length1 to be 70128.
Is the Symbol font program written out differently than other font programs?
Could somebody show me some sample code or explain how to correctly write out the characters from the Symbol font program, especially, how to write out the Symbol font program itself?
Thanks in advance!