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

Custom button changes to another using Javascript in Acrobat Pro

Explorer ,
Jun 20, 2020 Jun 20, 2020

Copy link to clipboard

Copied

Hi all,

I want to write a folder level script that has a customized toolbar button in Acrobat Pro. I am able to do it using app.addToolButton() by setting the 'oIcon' parameter. Now I want this button to change to another button ( with a different hex string) on clicking it. I checked the documentation but could not find it to add a different button at run time. Is this possible? 

Thanks for the help in advance.

 

TOPICS
Acrobat SDK and JavaScript

Views

494

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

correct answers 1 Correct answer

Community Expert , Jun 20, 2020 Jun 20, 2020

Not possible.

Votes

Translate

Translate
Community Expert ,
Jun 20, 2020 Jun 20, 2020

Copy link to clipboard

Copied

Not possible.

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 ,
Jun 20, 2020 Jun 20, 2020

Copy link to clipboard

Copied

Thanks a lot!

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 ,
Jun 20, 2020 Jun 20, 2020

Copy link to clipboard

Copied

LATEST

Only way I can think of being able to do it is to use the removeToolButton command to remove the original one and then call addToolButton again with the new icon (and a new ID, most likely). However, as per the documentation, you have to call removeToolButton from the same context as the original call to addToolButton, so that means that you will have to first close all files, then call it, then add the new button. In short, I don't think it's worth the effort just to get a display a new icon...

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