I am trying to embed truetype fonts in PDF using a java application. I
try to read the whole TTF file and write it out as a stream in the out
pdf file. So when i open the pdf file, it displays the following error
message: "cannot extract embedded font timesnewromanPSMT. Some
characters may not print or display correctly".
Here is a snap shot of my PDF file:
************************************************************************************************************
2 0 obj
<</Filter [/ASCII85Decode /FlateDecode ] /Length1 409280 >>stream
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWHAT
TO ADD HERE ????? xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
endstream
endobj
3 0 obj
<</Type /FontDescriptor /CapHeight 699 /FontFile2 2 0 R /Ascent 693
/ItalicAngle 0 /FontBBox [-568 -306 2000 1006 ] /Descent -215
/StemV 80 /FontName /TimesNewRomanPSMT /Flags 32 >>endobj
4 0 obj
<</Type /Font /CIDSystemInfo <</Ordering (UCS) /Supplement 0
/Registry (Adobe) >>/BaseFont /TimesNewRomanPSMT /FontDescriptor 3 0
R /Subtype /CIDFontType2 >>endobj
5 0 obj
<</Type /Font /DescendantFonts [4 0 R ] /BaseFont
/TimesNewRomanPSMT /Encoding /Identity-H /Subtype /Type0 >>endobj
*************************************************************************************************************
It shows that the stream i am embedding is incorrect. So I now have a
TTF File reader that can read different tables of a ttf file. So what i
need to know is what will be the exact bytes that will be required to
be written in the output PDF file as a stream that will make it work?
Also, please let me know how to embed a subset of the font. I mean, if
I use characters with unicode values 1731 and 1732, I dont want to add
the rest of the glyph information. In that case how will the stream be
different than embedding the whole font.
Thanks in advance,
Babz
Embedded fonts are not "in the clear". Beyond that, your
problem/question is an Acrobat/PDF question rather than being font
related. Think of it as "embedding" a font in a zip file - definitely
not font related. Somewhere there's a large specification for the pdf
format. YOu might ask in the appropriate Adobe forum:
http://www.adobe.com/support/forums/index.html
- Character
-