سؤال

I embedded TrueType fonts in pdf file according to the Adobe Manual:

7 0 obj 
<<
/BaseFont /Arial
/FirstChar 32
/LastChar 126
/Subtype /TrueType
/FontDescriptor 8 0 R
/Widths 59 0 R
/Type /Font
>>

It works perfectly in most of PDF viewers such Evince, Xournal, PDF Editor, etc; but it does not work in Adobe Reader XI. It simply does not show any text (displaying drawings). In the PDF properties, it does not have my embedded font. It seems, Adobe Reader is unable to find the embedded font. But what is the difference of Adobe Reader with other PDF viewers.

UPDATE: Initially, I copied the text from PDF manual and the illegal character was Unicode minus. Here is an updated version of the file. Still,it does not show the embedded font, but the default alternative font.

PDF File

هل كانت مفيدة؟

المحلول

In addition to the font descriptor corruptness, the FontFile2 stream dictionary is incomplete:

8 0 obj 
<<
[...]
/FontFile2 10 0 R
[...]
>> 
endobj 
10 0 obj 
<<
/Length 29061
>>
stream 
[...]

According to the specification (ISO 32000-1:2008) the Length1 entry is missing:

(Required for Type 1 and TrueType fonts) The length in bytes of the clear-text portion of the Type 1 font program, or the entire TrueType font program, after it has been decoded using the filters specified by the stream’s Filter entry, if any.

نصائح أخرى

There might be other issues, but at first sight I can see that you font descriptor is corrupt:

8 0 obj 
<<
/FontName /Acens
/StemV 105
/Leading 83
/FontFile2 10 0 R
/Ascent 720
/Flags 262178
/XHeight 394
/AvgWidth 478
/Descent −270
/ItalicAngle 0
/StemH 45
/MaxWidth 1212
/MissingWidth 255
/FontBBox [−177 −269 1123 866] <- This guy here does not look very well
/Type /FontDescriptor
/CapHeight 660
>>
endobj 

Most probably all the readers you have tried except Acrobat are just ignoring the issue and assuming some kind of "default" values.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top