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

Custom button changes to another using Javascript in Acrobat Pro

Explorer ,
Jun 20, 2020 Jun 20, 2020

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

Not possible.

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

Not possible.

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

Thanks a lot!

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

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