There's no problem with the files and iText. The problem is that only
one field has the set value of "Collect", the others have the value of
"Prepaid". To know what value to set call
AcroFields.getAppearanceStates().

> -----Original Message-----
> From: R K [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 05, 2005 3:21 PM
> To: Paulo Soares
> Subject: Re: [iText-questions] checkbox becomes invisible
> 
> Thanks for the immediate response.
> Please find the orginal pdf attached.
> 
> Regards
> RK
> 
> On 7/5/05, Paulo Soares <[EMAIL PROTECTED]> wrote:
> > I need the original PDF.
> > 
> > > -----Original Message-----
> > > From: R K [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 05, 2005 2:33 PM
> > > To: Paulo Soares
> > > Subject: Re: [iText-questions] checkbox becomes invisible
> > >
> > > Please find the pdf attached.
> > > In that WT/VAL section, PPD should come without the check 
> as I have
> > > pre populated the other one.
> > >
> > > Thanks
> > > RK
> > >
> > > On 7/3/05, Paulo Soares <[EMAIL PROTECTED]> wrote:
> > > > Post also the PDF.
> > > >
> > > > ----- Original Message -----
> > > > From: "R K" <[EMAIL PROTECTED]>
> > > > To: <[email protected]>
> > > > Sent: Friday, July 01, 2005 9:26 PM
> > > > Subject: [iText-questions] checkbox becomes invisible
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I have a form which contains checkbox groups.
> > > > If I tried to prepopulate the checkbox using PdfStamper, only
> > > > prepopulated one will show up in the form and the other 
> one which is
> > > > part of the checkbox group will become invisible.
> > > >
> > > > If I didnt populate the checkbox fields, both of them 
> get displayed.
> > > >
> > > > Please find the piece of code below.
> > > >
> > > > PdfReader reader = new 
> PdfReader("D:\\itext\\checkboxgroup.pdf");
> > > > PdfStamper stamp = new PdfStamper(reader, new
> > > > FileOutputStream("D:\\itext\\GO_NEW.pdf"));
> > > >
> > > stamp.setEncryption(true,null,null,PdfWriter.AllowFillIn|PdfWr
> > > iter.AllowPrin
> > > > ting);
> > > > AcroFields form = stamp.getAcroFields();
> > > > Iterator it = form.getFields().keySet().iterator();
> > > > while(it.hasNext()){
> > > >      String key = (String)it.next();
> > > >        pagesize = reader.getPageSizeWithRotation(1).height();
> > > >    if(key.indexOf("Address") > 0){
> > > >    String sAddress = "abc\nwest side dr\ngaithersburg";
> > > >    form.setField(key,sAddress);
> > > >    }
> > > > else if(key.indexOf("ValPaymentTerm") > 0){
> > > >               System.out.println("Setting check box value ");
> > > >                   form.setField(key,"Collect");
> > > >
> > > >        }
> > > >        counter++;
> > > >        }
> > > > stamp.close();
> > > >
> > > >
> > > > Regards
> > > > RK
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > SF.Net email is sponsored by: Discover Easy Linux Migration
> > > Strategies
> > > > from IBM. Find simple to follow Roadmaps, 
> straightforward articles,
> > > > informative Webcasts and more! Get everything you need 
> to get up to
> > > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
> > > > _______________________________________________
> > > > iText-questions mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > > >
> > > >
> > >
> >
> 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to