The possible checkbox values can't be changed. See the possible values with 
AcroFields.GetAppearanceStates().

Paulo

----- Original Message ----- 
From: "Jeff Metzner" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Monday, October 01, 2007 8:19 PM
Subject: Re: [iText-questions] Japanese checkboxes


> 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


-------------------------------------------------------------------------
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