Expand my Community achievements bar.

SOLVED

Multiple Page PDF

Avatar

Level 2

I made an order form in LiveCycle a couple months back, and the first page of the PDF shows up fine.

I decided to add a couple things to the form, making the form a couple pages longer, and in design view, the extra pages show up, and they look nice and everything, but once I go to preview the PDF, the extra pages don't show up at all.

I tried to go into the pagination tab and see if something was set incorrectly, but the pagination tab is greyed out, and there isn't anything I can do there.

Any help?

Also:  Is there a way to make the last two pages visible ONLY when a check box is selected?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Your code looks good. It may be okay in your form, but there is a small typo in the thread: = "visible";

Just a couple of things to look out for, I would place the code in the click event of the checkbox. At this stage the checkbox has registered the change in its rawValue. Also check the specified value for the checkbox, in Object > Binding palette.

You wouldn't need to repeat for page3, you can combined both in the same if/else statement (JavaScript in the click event):

if (this.rawValue == "1") {
     page2.presence = "visible";

     page3.presence = "visible";
}
else {
     page2.presence = "hidden";

     page3.presence = "hidden";
}

Hope that helps,

Niall

View solution in original post

12 Replies

Avatar

Level 10

Hi,

It is a bit difficult to say without seeing the form, but...

  1. Did you create the form originally by importing an existing Word or PDF document? The root node in the hierarchy will see to be "topUppermostSubform" or something similar.
  2. Have you added new pages, so that you see the pages in the hierarchy? Or did you add content to the bottom of page1?
  3. Is the form saved as a Static PDF form or a Dynamic XML Form in the save-as dialog?
  4. Are there any warnings in the Warnings tab?

This might help tie down the issue.

Yes, you can hide pages, but the form would need to be saved as a Dynamic XML Form.

Niall

Avatar

Level 2

Hi Niall,

I'm a bit inexperienced with LiveCycle, so I'll answer the best I can.

1. No, I didn't create it by importing a word or PDF document originally.  I created a new form in LiveCycle and went from there.

(I don't know if it makes a difference, but I did save the form as a static PDF, then when I went to make changes, I "re-created" it in LiveCycle by importing the PDF...)

2. I added new pages in the heirarchy.

3. Saved as a static PDF

4. No warnings.

Avatar

Level 10

Hi,

Did you launch LC Designer and then open the original form? This is the best approach.

If you see the original form structure in the hierachy you should be okay.

If you see something like this you should be okay:

Parallels Desktop.png

One thing to check would be to select the Master Page and go to the Object > Page Set palette and make sure the Master Page occurence is not restricted.

After that I am not sure what is wrong.

Niall

Avatar

Level 2

Hi Niall,

I didn't do it that way, but the heirarchy is (about) the same.

After seeing the screen cap though, I noticed--like the inexperienced person I am--that I accidentally made three master pages instead of three normal pages.  I moved the content of the three master pages to a normal page, and that fixed it.

I won't be doing that again.

One last thing, how would I go about making those pages disappear if a checkbox is not selected?  Other than saving the document as a dynamic XML form?

would it be similar to this?  Would I repeat it for page 3, or not?

if (this.rawValue == 1) {
     page2.presence = "visable";
}
else {
     page2.presence = "hidden";
}

Avatar

Correct answer by
Level 10

Hi,

Your code looks good. It may be okay in your form, but there is a small typo in the thread: = "visible";

Just a couple of things to look out for, I would place the code in the click event of the checkbox. At this stage the checkbox has registered the change in its rawValue. Also check the specified value for the checkbox, in Object > Binding palette.

You wouldn't need to repeat for page3, you can combined both in the same if/else statement (JavaScript in the click event):

if (this.rawValue == "1") {
     page2.presence = "visible";

     page3.presence = "visible";
}
else {
     page2.presence = "hidden";

     page3.presence = "hidden";
}

Hope that helps,

Niall

Avatar

Level 2

Hi,

Yeah, the typo would be a problem. Can't believe I missed that.

Thanks for all your help. 

Avatar

Level 2

I have another problem that I just came across today.

I have a "Reset Form" button that doesn't reset the value of the checkbox, I guess.  The checkbox un-checks, but the two last pages don't come back unless you check and uncheck the checkbox.

How would I go about fixing this?

I have a different checkbox in the same form that works just fine before and after I press the reset button, so I'm not sure what the problem is with this one...

Avatar

Level 10

Hi,

In the Reset button script add a new line after the reset line, to fire the script in the checkbox:

myCheckbox.execEvent("click");

Now that the reset script has cleared the checkbox, the execEvent will fire the script in the now null checkbox and hide the pages.

You will need to replace myCheckbox with a relative reference from the Reset button to the checkbox.

Hope that helps,

Niall

Avatar

Level 2

Hi Niall,

It works perfectly.  Thanks.

Avatar

Level 2

Hi Niall,

I have a question in regards to a second reset button...

I have one reset button that works perfectly.  I had added a script to the button that changed the presence of one text box to "hidden" when checked.  The second button, however, does NOT change the presence of the text box.

I thought that it might have something to do with the fact that the textbox was on a different page, but I have no issues with the second reset button resetting any of the fields on the other pages...

Any thoughts here?

Here's my script for the first button: (in click event)

CheckBox.execEvent("click");
Text16.presence = "hidden";

Doesn't seem to work on the other reset button...

Avatar

Level 10

Hi,

It is a bit difficult to say exactly without seeing the form. Can you upload it to Acrobat.com and then post the published link here?

If the button with the script is on a different page to the Checkbox and Text16, then that could be your problem. You have used a relative reference to the objects, which means that they would have to be within the same container.

For example if the button was on page3 and the two objects were in a subform on page1, then the script would look like:

page1.mySubform.CheckBox.execEvent("click");

page1.mySubform.Text16.presence = "hidden";

Have a look at this post discussing how to reference objects: http://assure.ly/kUP02y.

Hope that helps,

Niall

Avatar

Level 2

It seems that was the problem.

I originally thought it could have been that I needed to use an absolute reference, so I (naïvely) only used an absolute reference for the one object that wasn't working, because the other object was working fine with a relative reference.

I used an absolute reference for both, then the button magically started working...

I'm sorry I keep coming back with additional issues that keep popping up.  I'm new to this, so I really don't know what I'm doing.

If I ask again, here's the form I've been working on: https://acrobat.com/#d=DTEekZ6jLRBUuGksv-oXBg  (Current version is dated October 10.)

I'll keep it updated in case I need help again.

Thanks for your help.