Thanks.  A sample PDF is attached, and the code is below.

private void createpdf()

    {

             //BaseFont.AddToResourceSearch("iTextAsian.dll");

            //BaseFont.AddToResourceSearch("iTextAsianCmaps.dll");

 

            //BaseFont font = BaseFont.CreateFont("STSong-Light", 
"UniGB-UCS2-H", BaseFont.EMBEDDED);

            BaseFont font = 
BaseFont.CreateFont("c:\\windows\\fonts\\arialuni.ttf", BaseFont.IDENTITY_H, 
BaseFont.NOT_EMBEDDED);

 

            PdfReader pdfReader = new PdfReader("C:\\JTEST.pdf");

            PdfStamper pdfStamper = new PdfStamper(pdfReader, new 
FileStream("C:\\DEL\\JTEST3.pdf", FileMode.Create));

            AcroFields pdfFormFields = pdfStamper.AcroFields;

 

            string strvalue;

 

            strvalue = "This is English Text";

            //pdfFormFields.SetFieldProperty(de.Key.ToString(), "textfont", 
font, null);

            pdfFormFields.SetField("Text1", strvalue);

 

            strvalue = "いいえ";

            pdfFormFields.SetFieldProperty("Text2", "textfont", font, null);

            pdfFormFields.SetField("Text2", strvalue);

 

            strvalue = "Yes";

            //pdfFormFields.SetFieldProperty(de.Key.ToString(), "textfont", 
font, null);

            pdfFormFields.SetField("EC", strvalue);

 

            strvalue = "はい";

            pdfFormFields.SetFieldProperty("JC", "textfont", font, null);

            pdfFormFields.SetField("JC", strvalue);

 

            pdfStamper.FreeTextFlattening = true;

            pdfStamper.FormFlattening = true;

 

            pdfStamper.Close();

            pdfReader.Close();

 

            Response.BufferOutput = true;

            Response.ContentType = "Application/pdf";

            Response.Clear();

            Response.WriteFile("C:\\DEL\\JTEST3.pdf");            

            Response.End();

    }


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paulo Soares
Sent: Monday, October 01, 2007 10:41 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Japanese checkboxes

Post the PDF and your code, we don't have a crystal ball, you know?

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Jeff Metzner
> Sent: Monday, October 01, 2007 2:29 PM
> To: [email protected]
> Subject: [iText-questions] Japanese checkboxes
> 
> I have a PDF form with checkboxes when the value for the checkbox is 
> in Japanese.
> 
> When I am trying to display the PDF using pdfFormFields.SetField, the 
> checkbox does not get checked even though the correct value is set for 
> the field.
> 
> Any help on this would be appreciated. (We are using iTextSharp, but I 
> don't think the problem is .NET-specific.)
> 
> Thanks,
> 
> Jeff Metzner
> 
>  
> 


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.



Attachment: JTEST.pdf
Description: JTEST.pdf

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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