You need AcroFields.addSubstitutionFont(). Use a font and encoding adequate, 
for example arial.ttf and Identity-H.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Levent Aksu
> Sent: Wednesday, August 13, 2008 12:46 PM
> To: [email protected]
> Subject: [iText-questions] form fill
>
> Hello,
> I am new to iText and I would like to begin with a big "thank you" to
> the creators of this useful tool.
> I have a problem with filling the forms with Turkish
> characters. In the
> big picture I am trying to generate a multi-page document by using a
> one-page template. Filling out the template page per database row and
> adding to the resulting document as described in the book. No problems
> with the logic but I simplified the problem by using the simplest form
> with the simplest form-filling program:
>
>             PdfReader reader = new
> PdfReader("/home/levent/Desktop/payslip/simple.pdf");
>
>             PdfStamper stamper = new PdfStamper(reader, new
>
> FileOutputStream("/home/levent/Desktop/payslip/simple_filled.pdf"));
>             AcroFields form = stamper.getAcroFields();
>             form.setField("x","ABC-ÇİĞÖŞÜçığöşü");
>             stamper.setFormFlattening(true);
>
>             stamper.close();
>
>
> If I turn off flattening, I have everything as expected. But if I
> flatten, I get my Turkish specific characters lost. They are: I-dot,
> G-breve, S-cedilla, dotless-i, g-breve, s-cedilla.
> I have prepared the template pdf document with OpenOffice.
> I have done some reading in the forum and tried out a number of things
> but could not solve the problem. I tried for example exporting the pdf
> from OOO-Writer running in Windows and Linux and using different fonts
> from both platforms. A number of readers besides acrobat like
> evince and
> foxit but no way.
> What I was unable to try was using another editor other than
> OOO-Writer
> and suspect that it may contain the culprit.
> What would you suggest?


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to