Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

Using external font file in a pdf document

$
0
0

Hello,

 

I try to create programmatically a pdf file which whould use an external ttf file. Right now my soft generates something like this:

3 0 obj

<</Type /Pages/Count 1/Kids[5 0 R ]/Resources<</Font<</F1 7 0 R>>>>>>

endobj

7 0 obj

<</Type /Font/Subtype /Type0/Encoding /Identity-H/BaseFont /TimesNewRomanPSMT/DescendantFonts [8 0 R]>>

endobj

8 0 obj

<</Type /Font/Subtype /CIDFontType2/BaseFont /TimesNewRomanPSMT/CIDToGIDMap /Identity/FontDescriptor 9 0 R/DW 1000/W [1[722]2[610]3[443]4[389]5[277]0[777]]/CIDSystemInfo <</Ordering (Identity)/Registry (Adobe)/Supplement 0>>>>

endobj

9 0 obj

<</Type /FontDescriptor/FontName /TimesNewRomanPSMT/StemV 80/Descent -216/Ascent 891/CapHeight 662/Flags 32/ItalicAngle 0/FontBBox [-568 -306 2000 1007]/FontFile2 10 0 R>>

endobj

10 0 obj

<</Length 13 0 R/Length1 13 0 R/Filter /FlateDecode /F times.ttf>>stream

endstream

endobj

13 0 obj

836380

endobj

 

The times.ttf is in the same folder as a pdf. The document opens without error though the rendered text is completely different from that it suppose to be. I didn't find a good exemple in PDF spec and probably I intrepret it in a wrong way. I would be very thankful for any clue what is wrong in my code or a sample how could it be done correctly.

thanks in advance


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>