Skip to main content
Lyubomir Toshev
Participant
November 15, 2023
Question

Enabling Draw tool on multiple OS devices

  • November 15, 2023
  • 1 reply
  • 1264 views

I've been reading answers on how to enable/select the drawing tool in an Acrobat Form but I am still unable to select it. I've been trying to use both app.execMenuItem("Annots:Tool:InkMenuItem"); but none of them seem to select it. I'm also failing to find a list with the in-app tool names so that I can test with different names and tools. After whitelisting the tool like it is instructed in https://community.adobe.com/t5/acrobat-sdk-discussions/how-to-whitelist-quot-app-execmenuitem-quot-annots-tool-inkmenuitem-quot-quot/m-p/9575155 it works but it does so only on my computer. Can you provide some advice or guidance?

I want to create a "Sign" button that will select the draw tool so that the user can input his signature on the form-document. This is intended to work on a Windows PC and an iPad. It would be great if it can be setup to work on all OSs and both Acrobat Pro and Acrobat Reader.

I've attached two types of solutions. One with JS and one with Submit action.

PP. Is there a way to get the email from the email field with the submit action without using a Script? What's the difference between the Mail Form button script and the Today button script? Mail Form doesn't work on reader and as I understand it JS scripts don't work on Acrobat Reader but the Today button works on both.

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
November 15, 2023

Unfortunately the pencil tool cannot be started from a document script. There is  way to do this with a timer and capturing cursor movements over a large button field, but it won't work on the iPad.  The best you can do is tell the user to use the Self Sign tool. 

 

  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Lyubomir Toshev
Participant
November 16, 2023

What is the option with capturing the cursor movement?

Thom Parker
Community Expert
Community Expert
November 16, 2023

Create a button the size and shape of the signature area.

Use a MouseDown event on the button to start a timer, initialize a starting point, and create an ink annot.

Use the MouseUp event to kill the timer.

The timer script adds points to the ink annot. 

 

 

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