Dear Paulo,

Would you please give me help on the following code?

I can produce two different text fields. But, I can
not create the same name fields.

I am using TextField. I have to create it with name.

Thank you very much for your time,
 
yun
 
 
>   public static void main(String[] args) {
>         Document document = new
> Document(PageSize.A4,
> 50, 50, 50, 50);
>         try {
>             PdfWriter writer =
> PdfWriter.getInstance(document, new
> FileOutputStream("text_fields.pdf"));
>             document.open();
>               
>                       PdfFormField text0 =
> PdfFormField.createEmpty(writer);
>                       text0.setFieldName("CreditCard");
>                               
>             TextField app1 = new TextField(writer,
> new
> Rectangle(100, 700, 100 + 100, 700 + 50),
> "CreditCard1");
>                   PdfFormField field1 = app1.getTextField();
>                       //text0.addKid(field1);
>                                               
>               TextField app2 = new TextField(writer, new
> Rectangle(100, 600, 100 + 100, 600 + 50),
> "CreditCard2");
>               PdfFormField field2 = app2.getTextField();
>                       //text0.addKid(field2);
>                       
>                       //writer.addAnnotation(text0);
>                       writer.addAnnotation(field1);
>                       writer.addAnnotation(field2);
>                         
>             document.close();
>             System.out.println("Finished.");
>               }
>         catch (Exception de) {
>             de.printStackTrace();
>         }
> 
> 
> 
> --- Paulo Soares <[EMAIL PROTECTED]> wrote:
> > You need a field with kids where only the parent
> has
> > the name.
> > 
> > ----- Original Message ----- 
> > From: "wang yun" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Tuesday, April 05, 2005 5:38 AM
> > Subject: [iText-questions] how can I add text
> fields
> > with the same name
> > 
> > 
> > > dear support,
> > > 
> > > I want to add three text Form fields with the
> same
> > > name. How can I do that? 
> > > 
> > > Thanks,
> > > 
> > > yun wang
> > > 
> > > 
> > >
> >
>
-------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide
> > > Read honest & candid reviews on hundreds of IT
> > Products from real users.
> > > Discover which products truly live up to the
> hype.
> > Start reading now.
> > >
> >
>
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > > _______________________________________________
> > > iText-questions mailing list
> > > [email protected]
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to