Skip to main content
danoMonitor
Participant
January 10, 2023
Answered

Adove Acrobat Javascript Select Pencil in Red

  • January 10, 2023
  • 2 replies
  • 742 views

Hi, I am just wondering if there is a way to make a button, that when selected it will change the hand tool to the Pencil and additionally if possible in RED

app.execMenuItem("Annots:Tool:InkMenuItem");

 The above code does not work and I have added InkMenuItem to the registry white list.

 

Thanks in advance..

This topic has been closed for replies.
Correct answer Thom Parker

Add the fully qualified menu item name to the white list - Annots:Tool:InkMenuItem

Also make sure you are using the correct whitelist location in the registry:

 

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown\cDefaultExecMenuItems

 

And the value name is:   tWhiteList

 

2 replies

try67
Community Expert
Community Expert
January 10, 2023

You can't set the color used by the tool using a script. You can use a script to change the color of comments added by the user, but that is a very complex task, unless you do it after the fact.

danoMonitor
Participant
January 10, 2023

Thanks T67 for the advice 👍 This will be for a few end users, so I will set their preferences to RED to start and see how that goes.

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
January 10, 2023

Add the fully qualified menu item name to the white list - Annots:Tool:InkMenuItem

Also make sure you are using the correct whitelist location in the registry:

 

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown\cDefaultExecMenuItems

 

And the value name is:   tWhiteList

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
danoMonitor
Participant
January 10, 2023

Hi Thom, thanks for being specific, looking at all the other entries in the registry I couldnt see that they were using the full name. I have added it and works as exepcted. Thanks a heap!