Highlighted

How to whitelist "app.execMenuItem("Annots:Tool:InkMenuItem");"

Explorer ,
Dec 13, 2017

Copy link to clipboard

Copied

Hi All,

I'm looking at creating a Javascript button that when clicked brings up the red pen so users can sign their names in a box.

I have been reading this and Thom Parker has provided an answer but I am still slightly confused.

Re: To draw in the pdf using pen tool in acrobat reader x

If I was to escalate this to my service desk what exactly would I tell them to do with a step by step process?

And once its enabled I'm assuming the following line of code will automatically bring up the pen tool ready for use?

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

Also assuming this will work in both running Adobe DC Reader and DC Pro?

Cheers,

Seb.

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

You are the right track.  Each menu item is separated by a pipe symbol "|". Just add the menu item you want in there, and it's white listed for your machine. The "&" symbols mark the shortcut key for the item.

Close|GeneralInfo|Quit|Annots:Tool:InkMenuItem|FirstPage|PrevPage|NextPage|LastPage

TOPICS
Acrobat SDK and JavaScript, Windows

Views

956

Likes

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

How to whitelist "app.execMenuItem("Annots:Tool:InkMenuItem");"

Explorer ,
Dec 13, 2017

Copy link to clipboard

Copied

Hi All,

I'm looking at creating a Javascript button that when clicked brings up the red pen so users can sign their names in a box.

I have been reading this and Thom Parker has provided an answer but I am still slightly confused.

Re: To draw in the pdf using pen tool in acrobat reader x

If I was to escalate this to my service desk what exactly would I tell them to do with a step by step process?

And once its enabled I'm assuming the following line of code will automatically bring up the pen tool ready for use?

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

Also assuming this will work in both running Adobe DC Reader and DC Pro?

Cheers,

Seb.

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

You are the right track.  Each menu item is separated by a pipe symbol "|". Just add the menu item you want in there, and it's white listed for your machine. The "&" symbols mark the shortcut key for the item.

Close|GeneralInfo|Quit|Annots:Tool:InkMenuItem|FirstPage|PrevPage|NextPage|LastPage

TOPICS
Acrobat SDK and JavaScript, Windows

Views

957

Likes

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
Dec 13, 2017 0
Adobe Community Professional ,
Dec 14, 2017

Copy link to clipboard

Copied

After the pen menu item is white listed, it will be available in Acrobat. And executing the menu item with JS is the same as clicking on the menu item with the mouse.

Reader has it's own white list, but they are on parallel paths, and it will work in Reader because Reader allow annotations.

I would suggest you just look in the registry at this path and try it. You will see how it's done.

Likes

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
Reply
Loading...
Dec 14, 2017 0
Explorer ,
Dec 18, 2017

Copy link to clipboard

Copied

Hi Tom,

I have found cDefaultExecMenuItems in the Registry Editor > Double clicked > right clicked tWhiteList > this brings up a box which has Value data.

The value data looks like this:

Close|GeneralInfo|Quit|FirstPage|PrevPage|NextPage|LastPage|.......etc.......&Annotations|D&rawing Markups|Revie&w

My understanding is that I would edit this value data by adding the ink tool?

If so what exactly would I type?

LastPage|.......etc.......&Annotations|D&rawing Markups|Revie&w|????????

Am I on the right track?

Cheers,

Seb.

Likes

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
Reply
Loading...
Dec 18, 2017 0
Adobe Community Professional ,
Dec 19, 2017

Copy link to clipboard

Copied

You are the right track.  Each menu item is separated by a pipe symbol "|". Just add the menu item you want in there, and it's white listed for your machine. The "&" symbols mark the shortcut key for the item.

Close|GeneralInfo|Quit|Annots:Tool:InkMenuItem|FirstPage|PrevPage|NextPage|LastPage

Likes

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
Reply
Loading...
Dec 19, 2017 1
Explorer ,
Dec 20, 2017

Copy link to clipboard

Copied

Thanks for your help Tom!

I have escalated it to my service desk to change on my computer and I'll let you know how I go.

Cheers,

Seb.

Likes

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
Reply
Loading...
Dec 20, 2017 0
Explorer ,
Feb 08, 2018

Copy link to clipboard

Copied

Hi Thom,

I have successfully integrated this into a javascript button that zooms the page and frames the signature area and automatically brings up the pen for signing.

My questions is: Is there a way to change the pen colour from red to black?

This was some feedback I have just had from my stakeholders (red is apparently a negative colour).

There was this answer I found that involved manually changing the settings but was more after a JavaScript solution that I could incorporate into my existing button (How do I change the ink color for pen tool? )

edit: the version in question will be Adobe Acrobat Reader DC 2017

Cheers,

Seb.

Likes

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
Reply
Loading...
Feb 08, 2018 0
Adobe Community Professional ,
Feb 08, 2018

Copy link to clipboard

Copied

The color of any annotation "line" is set with the "annot.strokeColor" property.  Unfortunately I don't know the menu item name for the "Make Current properties default" menu item. So you'd have to set this for each annotation as they are created.

Likes

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
Reply
Loading...
Feb 08, 2018 0
Explorer ,
Feb 08, 2018

Copy link to clipboard

Copied

Thanks Thom,

I have had a bit of a search round into how to incorporate "annot.strokeColor" into my JavaScript and make the text black but with no luck.

Are you able to provide some guidance.. so far I am using the following which just brings up the red pen:

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

Cheers,

Seb.

Likes

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
Reply
Loading...
Feb 08, 2018 0
Most Valuable Participant ,
Feb 08, 2018

Copy link to clipboard

Copied

Doing it with JS is possible, but extremely complicated. I can tell you from experience because I did it in this tool I've developed: Custom-made Adobe Scripts: Acrobat/Reader -- Quickly Switch Between Highlighter Colors

I would recommend instructing them to simply change the default settings once instead of trying to do it using a script.

Likes

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
Reply
Loading...
Feb 08, 2018 0
Explorer ,
Feb 08, 2018

Copy link to clipboard

Copied

I have tried the following code but it doesn't change the pen tool to black...

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

annot.strokeColor= ["G", 0];

Am I on the right track or completely missing the mark?

Likes

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
Reply
Loading...
Feb 08, 2018 0
Most Valuable Participant ,
Feb 09, 2018

Copy link to clipboard

Copied

You're way off.

Likes

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
Reply
Loading...
Feb 09, 2018 0
Adobe Community Professional ,
Feb 09, 2018

Copy link to clipboard

Copied

to do this a script has to find the annotation after it has been created. I've done this before by using a timer to poll the set of existing annots for a new Ink markup, then setting it's properties.

Likes

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
Reply
Loading...
Feb 09, 2018 0
Explorer ,
Feb 13, 2018

Copy link to clipboard

Copied

Do you have any code (or a starting point) that I can put on a button to select all annotations (or go through one at a time) and change the ink to black? Thanks

Likes

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
Reply
Loading...
Feb 13, 2018 0
Most Valuable Participant ,
Feb 13, 2018

Copy link to clipboard

Copied

That's much easier. You can use this code for that:

this.syncAnnotScan();

var annots = this.getAnnots();

if (annots!=null) {

    for (var i in annots) {

        var annot = annots;

        if (annot.type=="Ink") annot.strokeColor = color.black;

    }

}

Likes

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
Reply
Loading...
Feb 13, 2018 1
Explorer ,
Feb 13, 2018

Copy link to clipboard

Copied

Thanks mate that's awesome!

Likes

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
Reply
Loading...
Feb 13, 2018 0
Community Beginner ,
Jan 16, 2019

Copy link to clipboard

Copied

How can I disable signatures in Adobe.

I have a form when I want every time user open the form he have to sign it (with draw function) and not use electronic sign which is saved.

That is why I want to disable signatures from it. Is there any way to do it?

Thanks

Likes

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
Reply
Loading...
Jan 16, 2019 0
Most Valuable Participant ,
Jan 16, 2019

Copy link to clipboard

Copied

Prachi, your question doesn't seem to connect to the earlier discussion. Please can you explain the connection to whitelisting the InkMenuItem tool?

Likes

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
Reply
Loading...
Jan 16, 2019 1
New Here ,
Nov 09, 2020

Copy link to clipboard

Copied

Am I too late to ask something in here??

... Anyways, how can you white list a tool or add  a registry? Can someone please explain it step by step.

 

Thank you,

Leia

Likes

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
Reply
Loading...
Nov 09, 2020 0
New Here ,
Nov 09, 2020

Copy link to clipboard

Copied

@Thom Parker Any help?

Likes

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
Reply
Loading...
Nov 09, 2020 0
Adobe Community Professional ,
Nov 09, 2020

Copy link to clipboard

Copied

First Do a google search on "windows registry".  You'll find plently of articles that explain how to use the registry editor. 

Next find the registry entry for the menu item whitelist, which is under this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\<version>\FeatureLockDown

 

You'll also find lots of Adobe registry settings here:

https://www.adobe.com/devnet-docs/acrobatetk/tools/PrefRef/Windows/endindex.html

 

Also lots of good stuff here:

https://www.adobe.com/devnet-docs/acrobatetk/tools/Wizard/tools.html#removing-tools-from-the-tools-t...

 

 

Likes

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
Reply
Loading...
Nov 09, 2020 0