These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Create Multiple Fields on the Fly...

lawardy
Registered: Mar 9 2010
Posts: 2
Answered

Hi,

We have pre-populated PDF Form that we intend to fill on the fly by using iText and Java.

The problem I have is:

I have this field which I want to create/copy on the fly depends on how the logic that I get from Java.

Ideally I am looking for "A FIELD" that I can create on PDF Form and subsequent fields can be created multiple times one after another on the fly.

Is that even possible in PDF Form ?

I know I can Place Multiple Fields like : Fieldname.1, Fieldname.2, etc....... but it is sort of hard coding how many fields I expect on a form.

It will be good that I can dynamically construct number of fields as per needed to the existing form.

Any suggestion?

Thanks in advance for your help

R,

Erwin

My Product Information:
Acrobat Pro 9.2, Windows
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
You either need to figure out a maximum number and then hide them or remove them (which you could do with Javascript based on some field value you set using iText) or you need another library like DynaPDF or something like that which will allow you to add fields on the fly. It seems to me that you should really be using a Designer form, not AcroForms, since you want a dynamic number of fields and you probably want the layout to flow without big gaps.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

pavankumarreddyr
Registered: Dec 8 2008
Posts: 18
Here you can find few examples related to adding fields dynamically:

http://www.adobe.com/devnet/livecycle/designer_scripting_samples.php#changing_appearance

Recently i got a similar type of requirement and i am able to add the fields dynamically but its mentioned that iText won't support "Adobe Dynamic XML Form".

Because of the we will not be able to read the values of the dynamically added fields using iText.

Is there any other java tool which supports reading fields which are added dynamically using script inside the PDF?


Thanks in advance,
Pavan

R pavan kumar reddy