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,
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 3:32 PM
To: [email protected]
Subject: Re: [iText-questions] How to fill a general writable PDF file
On 03/22/12 14:17, Zhang.Xun-An wrote:
> Here is a useful example. I have solved my problem by reference the example.
>
> Thanks all for the helps.
>
>> 2. You have an interactive form that is based on AcroForm technology.
>>
>> The PDF created with Open Office as described in section 6.3.5 is such a
>> form. By adapting the code sample from the book ( http://1t3xt.be/?107 )
>> >you'll be able to inspect the form. However, this code won't return any
>> field if possibility
>
>
Hi Xun-An,
Are you saying that by modifying the example, http://1t3xt.be/?107 ,
you were able to fill the form fields? I'm a bit puzzled because
that example just prints the values and types of fields.
After looking further at AcroFields.java, I'm wondering if:
public boolean setField(String name, String value, String display)
throws IOException, DocumentException {...}
would fulfill your needs. The comments above the code suggest
that maybe it would:
/**
* Sets the field value and the display string. The display string
* is used to build the appearance in the cases where the value
* is modified by Acrobat with JavaScript and the algorithm is
* known.
-regards,
Larry
------------------------------------------------------------------------------
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