Hi,

I have a question about subset embedding fonts. I am very lost with this so
I will try to explain my problem as well as I can.
I want to extract text from an existing pdf file, and I use PrintStream to
print in a txt file the content stream using Mr.Bruno class Climbing The
Tree.
This txt could be :
q
36 890 Td
/F1 8 Tf
BT
[(\134hello)]TJ
ET
...
so I create a font using the class BaseFont and I search in the pdf font
dictionary what FontName the key F1 has to be able to search in my file
fonts one that match with this FontName (I know it is not the best way
because I won't have the same font characteristics).
I use the method PdfContentByte.showtext(PdfTextArray string) after I create
the BaseFont, where string = "\134hello". It works ok when the font is full
embedded, because I know which is the encoding.
When I have subset embedded fonts in some cases when printing the code
character \134 this not match with the glyph it should be, because I have an
array Differences in the font dictionary and if I understand it correctly,
if the name of a glyph appears in this array it means that its code
character will be like in the array not the code character in the font file.

My question is if it exists any way I can print the correct glyph, I would
have to search the name of the glyph in the font file and change \134 for
the code glyph in the font file? but it would be impossible because I dont
know the name of the glyph I only know the code glyph \134 and this code in
the array could have many glyph names...

Sorry I must admit I am very lost with embedded fonts and maybe all I said
has no sense, but I hope anyone can tell me any clue.

Thanks in advance
Laura
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to