javascript code to open pencil tool in acrobat to draw signature.

hi im working on acroabat pdf. In version 9 there was app.execMenuItem("Annots:Tool:InkMenuItem"); By used this function in javascript such that when i click the textbox the pencil tool will be activated. so that i can sign.

But this app.execMenuItem("Annots:Tool:InkMenuItem"); is not working in acrobat version 10.1.2 reader. I tried a lot but i didnt get any tool or in built function to call this pencil or pen tool.

Thats why i want javascript manually created code to call the pen tool (using ink annotation)


sachin prasad


2 Answers

For interested readers a similar discussion is available at the Adobe Reader U2U Forum.

http://forums.adobe.com/message/4256355#4256355


Be well...


David Austin   

Did you look in the console window to see if an error was reported? If an error is reported it means that the menu item does not exist. However, I don't think you'll see this error. The menu item does actually exist and if you run it from the console window it will work. However, this menu item can only be run from a privileged context.

I'm pretty sure this was also true in Acro 9, but I could be wrong. Anyway, the fix is to "WhiteList" the menu item. On windows this is an entry in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockDown\cDefaultExecMenuItems

On the Mac its in a setting file.

Thom Parker
The source for PDF Scripting Info pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often

The most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work




Thom Parker   


Please specify a reason: