Skip to main content
sebastianb99835257
Inspiring
December 14, 2017
Resuelto

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

  • December 14, 2017
  • 2 respuestas
  • 5814 visualizaciones

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.

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Thom Parker

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

2 respuestas

Participant
November 9, 2020

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

Participant
November 9, 2020

@Thom Parker Any help?

Thom Parker
Community Expert
Community Expert
December 14, 2017

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.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
sebastianb99835257
Inspiring
December 18, 2017

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.

Thom Parker
Community Expert
Thom ParkerCommunity ExpertRespuesta
Community Expert
December 19, 2017

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

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