Am Donnerstag, den 30.03.2006, 15:19 +0100 schrieb Paulo Soares:
> This is an example of Acrobat not following their own specifications. Your
> embedded font uses what is called "StandardEncoding" and in this encoding the
> char "ü" is not defined. Acrobat doesn't care and puts the char anyway
> probably checking the actual embedded font.The simplest way to fix this:
>
> PdfReader pdf = new PdfReader("C:\\VorlageOnline.pdf");
> PdfStamper stp = new PdfStamper(pdf, new FileOutputStream("c:\\out.pdf"));
> AcroFields af = stp.getAcroFields();
> BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\l_10646.ttf",
> BaseFont.IDENTITY_H, true);
> af.addSubstitutionFont(bf);
> af.setField("field1","This is a Test Müller");
> stp.close();
>
> Paulo
>
hey Paulo, you are the greatest. Thanks for the solution.
The only thing what doesnt work is the german sharp s at \u00df. I will
try to figure out why this is so, or do you have a answer to this
question ?
Volker
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions