cancel
Showing results for 
Search instead for 
Did you mean: 

Add a page on click of a button

Former Member
0 Kudos

We have a requirement to add a page at the end of the PDF document when the user clicks a button.

User may be able to click the button multiple times to add multiple pages.

Please anybody have an idea how to do that?

Thanks a lot,

Vimukta

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member365727
Active Contributor
0 Kudos

Hi,

This can be done by placing a button. Considering that your form structure is like below :

Form1
   '->Master Pages
   '->Page1 (Body page)
           '->Button

Select Page1, go to Object palette - Binding properties tab. Enable the check box 'Repeat Sub form for Each data item'.

Also enable the check box 'Min Count' and set the value as 1.

For 'onClick' event of button, write a code like below :

xfa.form.Form1.Page1.instanceManager.addInstance(1);

above code adds a new body page at runtime after clicking the button.

Note : Adobe form should be dynamic (dynamic form layout).

Regards

Srikanth KV.

Former Member
0 Kudos

Hi,

me too...

I tried to use methode addField to create dynamic fields but it does not work ...

Nicolas

Former Member
0 Kudos

Hi,

your form should be a dynamic form

form1

...Masterpage

...Page1

...Subform1 (Flowed content, repeat subform for each data item)

...Subform2(can be position content or flow content)

keep a button inside this subform

amd write a code in the click event of this button

Subform1.instanceManager.addInstance(true);

Regards,

sasi

Edited by: sasidhar yalamanchili on Apr 9, 2008 5:08 PM

Former Member
0 Kudos

Hi Vimukta,

Is your problem solved, if yes, then please share the solution, I have similar requirements in my project.

Thanks in Advance,

Amit