Hi Larry,

In "http://itextpdf.com/examples/iia.php?id=157";, the 'field_1', 
'field_2',...are created by another java block. They are not common field names.

In http://1t3xt.be/?107, the 'key' is variable. It may be any field name which 
got from

        "Set<String> fields = form.getFields().keySet();
        for (String key : fields) {"
So, you should replace the special field names with the variable (key). The 
values of the variable should be gotten by "form.getFields().keySet();"

If you give me your private email address, I can copy the complete code to you.

Thanks,

Xun-An Zhang
NHQ - Information Management and Technologies | AC - Gestion et technologies de 
l'information
Citizenship and Immigration Canada | Citoyenneté et Immigration Canada
219 Laurier Avenue West Ottawa ON K1A 1L1 | 219 avenue Laurier Ouest Ottawa ON 
K1A 1L1
Office | Bureau CAN B240b
[email protected]
Telephone | Téléphone 613-948-2467
Facsimile | Télécopieur 613-957-6279
Government of Canada | Gouvernement du Canada

-----Original Message-----
From: Larry Evans [mailto:[email protected]] 
Sent: March-22-12 6:38 PM
To: [email protected]
Subject: Re: [iText-questions] How to fill a general writable PDF file

On 03/22/12 14:49, Zhang.Xun-An wrote:
> Actually, I updated:
>       http://itextpdf.com/examples/iia.php?id=157
> by changing the 
>       form.setField("text_1", " MMMMMMMM "); 
>       form.setField("text_2", " MMMMMMMM "); 
>       ...
> with 
>       form.setField(key,"MMMMMMMM");
> 
> The 'key' are gotten from the example, http://1t3xt.be/?107
> 
> The pdf file in above example can be any pdf file, not just created in Java.
> 
> Thanks,
> 
[snip[
There is also the earlier chapter 6 example:

  http://www.itextpdf.com/examples/iia.php?id=122

which also uses AcroFields.setField to change a field's value.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to