Hi.

 

I am not an expert, but probably you need to set the font for the form field to 
one that supports Unicode or just the language that this character belongs to.

I cannot remember the exact code for this right now, but there should be 
samples online.

 

I hope this helps. J

 

 

From: Eric Chow [mailto:eric...@gmail.com] 
Sent: Friday, July 10, 2015 11:09 AM
To: Post all your questions about iText here
Subject: [iText-questions] Cannot show special character in acro form field!

 

Hello,

 

I tried to use the following code to set form field value with iText but it 
could not show the character ӧ. The test-form-fill.pdf is created by Adobe 
LifeCycle Form Designer. Please help!

 

 

InputStream is = new FileInputStream("doc/test-form-fill.pdf");

OutputStream os = new FileOutputStream("doc/test-form-fill-done.pdf");

                                    

PdfReader reader = new PdfReader(is);

                                    

PdfStamper stamper = new PdfStamper(reader, os);

                                    

                                    

AcroFields form = stamper.getAcroFields();

                                     

form.setField("field1", "ӧ11111");

 

stamper.setFormFlattening(true);

stamper.close();

reader.close();

                                    

                                    

is.close();

                                    

os.close();

 

 

 

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to