I've already added code to get all the possible values. It will be in the
next release.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]
> Sent: Friday, November 14, 2003 22:42
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:      RE: [iText-questions] How do I check a checkbox?
> 
> Thanks,
>       That worked great. I was able to see the values On and Off when I
> opened the PDF in Notepad. The On value DID check the box.
> 
> Thanks again,
> 
> Chris Howell
> Systems Analyst
> Oregon Department Of Transportation
> Phone (503) 378-4452 Pager (503) 918-1900
> [EMAIL PROTECTED]
> 
> 
>  -----Original Message-----
> From:         chicks [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 14, 2003 1:48 PM
> To:   HOWELL Chris L; [EMAIL PROTECTED]
> Subject:      Re: [iText-questions] How do I check a checkbox?
> 
> The possible values are set by the designer of the
> PDF.  In the IRS's fillable f1040ez.pdf, the values
> for the check boxes are "Yes/Off/No".  You may get a
> hint from the text next to the boxes, or you can open
> the PDF with a text editor and look for the values
> (assuming it's not encrypted or compressed).
> 
> I don't know if it's possible to read the subfield
> values using iText.  I use iSedQuickPDF to read them,
> using the GetFormFieldSubCount() and
> GetFormFieldSubName() functions.
> 
> --- [EMAIL PROTECTED] wrote:
> > Could use a bit of help here guys!  :-)
> > I'm rather new to the iText API. I've used it so far
> > for automatically
> > filling in fields with data. I'm now working with a
> > form that has a couple
> > Checkbox fields. How do I set checkbox fields as
> > checked? I tried using the
> > setFields method, and passing in the String "true",
> > but that didn't work.
> > What does the value of the field need to be? Here's
> > a little source code on
> > what I'm currently doing.
> > 
> >                             PdfReader reader = new
> > PdfReader(fileNameIn);
> >                             PdfStamper stamper = new PdfStamper(reader,
> > new FileOutputStream(fileNameOut));
> >                             AcroFields form = stamper.getAcroFields();
> >                             
> >                             form.setField("Name","Test Name");
> >                             form.setField("odot","123456");
> > 
> >                             form.setField("Consortium","A Testing Co");
> >                             form.setField("PName","My Name");
> >                             form.setField("date","10/14/03");
> > 
> >                             form.setField("Box1","true"); //This is the
> > checkbox control
> >                             
> >                             stamper.close();
> > 
> > 
> > 
> > 
> > 
> > Thanks guys, I appreciate your help.
> > 
> > Chris Howell
> > Systems Analyst
> > Oregon Department Of Transportation
> > Phone (503) 378-4452 Pager (503) 918-1900
> > [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]> 
> > 
> > 
> > 
> >
> -------------------------------------------------------
> > This SF. Net email is sponsored by: GoToMyPC
> > GoToMyPC is the fast, easy and secure way to access
> > your computer from
> > any Web browser or wireless device. Click here to
> > Try it Free!
> >
> https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> 
> 
> -------------------------------------------------------
> This SF. Net email is sponsored by: GoToMyPC
> GoToMyPC is the fast, easy and secure way to access your computer from
> any Web browser or wireless device. Click here to Try it Free!
> https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to