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

Enabling Draw tool on multiple OS devices

New Here ,
Nov 14, 2023 Nov 14, 2023

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-a... 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.

TOPICS
JavaScript , Modern Acrobat , PDF , PDF forms
945
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 ,
Nov 15, 2023 Nov 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

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
New Here ,
Nov 16, 2023 Nov 16, 2023

What is the option with capturing the cursor movement?

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 ,
Nov 16, 2023 Nov 16, 2023
LATEST

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 PDFScripting
Use the Acrobat JavaScript Reference early and often

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