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

Interactive PDF with Buttons the show layers independently from each other but at the same time?

Community Beginner ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

I want to create an interactive PDF with Acrobat where a bag is shown.

I want to be able to change the colours of the bag - like a configurator. For this purpose, 3 elements should be changeable: bag body, handles, and a leather application. I've created all the parts in all colors in Indesign on different layers - and wanted to create this configurator with the button "Layer Visibility" in Acrobat.

What works: When I click on the butts "bag body black", it also shows the layer with the black bag body

If I go to "handle red" it shows me this ....

My problem: there will always just be one layer visible at a time with the "layer visibility" button.
So: bag body black OR handle red etc ...

How do I make it there buttons can be multiplied / work independently from each other??
For example: When Button "Bag body black" is activated - and then "handle Red" that back body black will stay active?

Is there any way, that I can tell acrobat to regard the buttons for the bag body / the handles / the leather application as 3 seperate things - and be able to show one colour option of each at the same time?

What i don't want to do, is do it in indesign (with a jump to next status command) and then create an epub.

I need to have a pdf in the end.

Any Ideas?

Thanks for your help!

TOPICS
PDF forms

Views

14.8K

Translate

Translate

Report

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
1 ACCEPTED SOLUTION
Community Expert ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

To show a layer you must set property state to true.

Obvious!

Laura, sorry I made a mistake, replace this line :

if (ocgArray1.name == "A") {ocgArray1.state = false;}

By:

if (ocgArray1.name == "A") {ocgArray1.state = true;}

View solution in original post

Votes

Translate

Translate

Report

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 Beginner ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

LATEST

Thank you very mach!

It works! 

Votes

Translate

Translate

Report

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
New Here ,
Sep 24, 2019 Sep 24, 2019

Copy link to clipboard

Copied

@JR

Votes

Translate

Translate

Report

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
New Here ,
Sep 25, 2019 Sep 25, 2019

Copy link to clipboard

Copied

I am having a similar issue and am wondering if you can help. I am trying to create a pdf that will allow me to show different different color variations of running tracks. I tried editing and using the previous script  but nothing happened.

 

// hide all COLOR-TRK layers
var ocgs = this.getOCGs();
for (var i=15; i<28; i++) {
ocgs.state = false;
}
// show the selected COLOR-TRK layer
var ocgArray1 = this.getOCGs();
for (var i=0; i < ocgArray1.length; i++) {
if (ocgArray1.name == "COLOR-TRK-RED") {ocgArray1.state = true;}
}

 

First I want to show different colors for the entire running track by clicking an associated color buttons. I was able to accomplish this using layers . Second I want to be able to show different color exchange zones on top of the track color they chose.  I have all of the color options for the track and the exchange zones on different layers.

 

Essentially I am asking if these color options can be indepented from each other. For example if they want a red track with blue exchange zones they would click the red track button then the blue exchange zone button. If they want a yellow track and red exchange zones they would click the yellow track button and the red exchange zone button.

 

I got the following to work below through layers but can only make it work with 1 color track backgroud. I would have to add a button per Track Color/ exchange zone color option to make it work this way. 

 

Thank you 
Chris 

 

Track Color Layouts.jpg 

Votes

Translate

Translate

Report

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
Explorer ,
Apr 20, 2019 Apr 20, 2019

Copy link to clipboard

Copied

It is possible to show a layer as an image or an icon of a button. In this case each layer is a button. The Image Configurator may be divided into two sections: image preview section and aspect selection section. The image preview section consists of two types of buttons. The blank and the aspects. The blank should be “on top” of the aspects. Each aspect represents a set of choices. In the bag example the blank would contain the image of a bag without color, each aspect (handle-aspect, body-aspect and plaque-aspect) is an aspect button, and each set of colors available for an aspect is the set of choices. Thus a three-aspect Image Configurator has four buttons in the preview section: one for the blank and three for the aspects. The aspect selection section presents the sets of choices. In the bag example the sets of choices are the sets of colors for the handle, the bag and the plaque. Every choice has a button that changes the corresponding image of the aspect button. For example the “red” choice for the handle will set the icon for the handle aspect button.

More details plus examples are found in “Some Ideas on How to Create an “Image Configurator” Tool: A Reply to a Question at the Acrobat Commu...”. I can create another example using your images if you are interested.

Votes

Translate

Translate

Report

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 ,
Apr 21, 2019 Apr 21, 2019

Copy link to clipboard

Copied

The answer is Yes!!  OCG Layers are not actually layers.  An OCG is a marker in the PDF that can be attached to form fields and annotations, as well as page content. Unfortunately Acrobat does not provide any tools for attaching an OCG to a form field. But fortunately I wrote a plug-in just for this purpose.

You can download this Acrobat plug-in by becoming a member at www.pdfscripting.com.

You'll find the download here:

Search Downloads

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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 ,
Apr 22, 2019 Apr 22, 2019

Copy link to clipboard

Copied

It is possible to show a layer as an image or an icon of a button. In this case each layer is a button.

What is the benefit?

Votes

Translate

Translate

Report

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
Explorer ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

I proposed the use of buttons for layers as an alternative way of creating layers.

I am not sure what you mean by "benefit". A button can be used to show an image or

an animation. Perhaps this is an example of a benefit? I created an example of

this "benefit" if you are interested: "Using Buttons as Layers for Images or Animations

A Reply to a Question at the Adobe Community Forums".

Votes

Translate

Translate

Report

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

Buttons can not be used to replace layers. The biggest issue with them is that you can't place them under other types of content, they will always appear at the top, or their stacking order won't be predictable (and controllable).

Votes

Translate

Translate

Report

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
Explorer ,
Apr 30, 2019 Apr 30, 2019

Copy link to clipboard

Copied

“Buttons cannot be used to replace layers”: False.

The use of buttons as “layers” may replace the use of the OCG for some types of application. The example PDF form application “Some Ideas on How to Create an ‘Image Configurator’ Tool” has three examples of using buttons as “layers” – two examples are part of the document and the other example is an attachment to the document. Figure 2 and Figure 3 are examples of using buttons as layers. I think the use of buttons as “layers” in these cases were not an issue for the other types of contents in the pages.

The example PDF form application “Using Buttons as Layers for Images or Animations” includes an example of using buttons as layers too.

I have a more detailed rebuttal on your other points too plus two more examples in the PDF document: "Buttons versus OCGs: A Rebuttal".

Votes

Translate

Translate

Report

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 ,
Apr 30, 2019 Apr 30, 2019

Copy link to clipboard

Copied

These are certainly good examples but I refuse to register/login for anything to download a demo PDF.

Acrobat : File menu : Send File : Send & Track : Create anonymous link

Votes

Translate

Translate

Report

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 ,
Apr 26, 2019 Apr 26, 2019

Copy link to clipboard

Copied

I am not sure what you mean by "benefit".

vantage / plus

Votes

Translate

Translate

Report

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