Use AcroFields.addSubstitutionFont() with a font containing the needed
glyphs.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, January 16, 2008 11:10 PM
> To: [email protected]
> Subject: [iText-questions] Japanese characters not shown in 
> stamped PDF
> 
> 
> Hi, 
> I try to convert XML file to PDF and content of XML file is 
> UTF-8 using Java and itext library. 
> Environment - Windows XP/Windows 2003 
> 
> I prepared PDF file in  Adobe LiteCycle Designer as Adobe 
> form, added fields, set them as ready only. 
> I used the sample of itext code to stamp content in the PDF 
> file and everything worked fine. 
> When I tried to do the same with Japanese characters, I got issues. 
> 1. I used Arial font in the field, the code ran fine but 
> content is not displayed. 
> 2. I modified the code and added 
> BaseFont bf = 
> BaseFont.createFont("c:\\windows\\fonts\\msgothic.ttc,1", 
> BaseFont.IDENTITY_H, BaseFont.EMBEDDED); 
> or 
> BaseFont bf = 
> BaseFont.createFont("c:/windows/fonts/arialuni.ttf", 
> BaseFont.IDENTITY_H, BaseFont.EMBEDDED); 
> (both fonts are present), 
> and 
> 
> form1.setFieldProperty("who", "textfont", bf, null);         
> form1.setField("who", nodeValue); 
> 
> the result - Japanese characters are not displayed. 
> 
> 3. I modified  Adobe form and select Arial Uni or MS Gothic 
> fonts but the code fails , sending  Document exception 
> 
> Font 'KozMinPro-Regular' with 'UniJIS-UCS2-H' is not recognized.. 
> 
> 
> Font 'HYSMyeongJoStd-Medium' with 'UniKS-UCS2-H' is not recognized.. 
> 
> 4.   I modified  Adobe form and select  Helvetica font  - the 
> code works but Japanese characters are not displayed. 
> 
> 
> If there is no solution for this situation, I will create PDF 
> file during XML conversion if using stamping is issue. 
> 
> 
> Thanks, 
> 
> Leonid Ziskind


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to