Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Combining pdf forms

Guest
Mar 16, 2018 Mar 16, 2018

This is the first time I use javascript so I'm sorry if the question is just silly. I have three pdf forms (A,B,C) that I want to combine into one file. I would like to have three radiobuttons on the top of the form (A,B and C). Depending on which one would be chosen pdf form A,B or C would be displayed. The question is if there is a possibility to create some kind of panels in Acrobat XI or do I have to add visibility conditions for each object in the form?

TOPICS
Acrobat SDK and JavaScript
741
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 16, 2018 Mar 16, 2018

You can insert the three files as layers and then show/hide them based on the selection. You will also need to separately show/hide the fields associated with each form, though.

Translate
Community Expert ,
Mar 16, 2018 Mar 16, 2018

You can insert the three files as layers and then show/hide them based on the selection. You will also need to separately show/hide the fields associated with each form, though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 20, 2018 Mar 20, 2018

Thank you for the reply. I tried to add layers but as far as I see it cannot be done in Acrobat Standard XI (only in Pro). Am I right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2018 Mar 20, 2018

I believe so, yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 20, 2018 Mar 20, 2018

That's unfortunate. Thank you for help anyway

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2018 Mar 20, 2018

Yes, you need Pro for this feature.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 23, 2018 Mar 23, 2018

Hi, I have another basic question concerning this subject. I have managed to create pdf with layers (named aaa, bbb and ccc). and radiobuttons. I can change visibility of fields by using simple commands in radiobutton actions f.ex

Mouse Up -> Run a JavaScript -> this.getField("Text2").display = display.visible;

Nevertheless I cannot do the same with layers.

I took a shot with

this.getOCGs("aaa").state = true;

however it does not work (

RangeError: Invalid argument value.

Doc.getOCGs:1:Field Group1:Mouse Up)

Could you please show me how such a command should look like?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2018 Mar 23, 2018

The getOCGs method returns an array with all of the layers, as the name suggests. You can then iterate over that array, looking for a specific one, like this:

var ocgs = this.getOCGs();

for (var i in ocgs) {
     if (ocgs.name=="aaa") ocgs.state = true;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 27, 2018 Mar 27, 2018
LATEST

Thank you very much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines