Skip to main content
March 5, 2012
Answered

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

  • March 5, 2012
  • 2 replies
  • 43674 views

hi im using the app.execMenuItem("Annots:Tool:InkMenuItem"); in the javascript of textbox in acrobat pro 9. When i click the text box pen tool is activated and im able to sign in that textbox.

But in acrobat reader 10.1.2 when i click the textbox its not working . i.e (app.execMenuItem("Annots:Tool:InkMenuItem"); ) is not executing . Is there any other command to get pen tool in acroabat reader x.

    This topic has been closed for replies.
    Correct answer Thom Parker

    hi try,

    i want javascript code to manually call the pen tool using

    ink annotation.


    Yes, there is.  And your code is correct.  If you run that code from the console window you will see that it works.  The problem is that menu item cannot be generally run from a non-privileged context. They have to be on a white list. In windows this is a registry setting:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockDown\cDefaultExecMenuItems

    On the Mac it's in a setting file.

    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com

    The Acrobat JavaScript Reference, Use it Early and Often

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

    2 replies

    March 5, 2012

    hi,

           actually i called via javascript for the text box  for actions i selected the execute a menu item in it added the javascript  there i wrote this command app.execMenuItem("Annots:Tool:InkMenuItem");

    March 5, 2012

    sorry,

             what i want to say i . For the textbox in actions

         

            For select Action : i selected Execute a menu item.

           Then added a javascript . In java script i added the code   app.execMenuItem("Annots:Tool:InkMenuItem");   in it.

       Its working fine in acrobat pro 9 and even reader.

        

        But giving issue in 10.1.2  . Is there any other command in place of this .

    March 5, 2012

    hi ,

       

                 can you give the code for ink annotation so that i will draw the sign using ink pen tool .

           

                 Actually what my requirement is when i click the text box pen tool should get activated so that i can draw and sign.

    Thanks,

      sachin.

    try67
    Community Expert
    Community Expert
    March 5, 2012

    Couple of issues there:

    1. Your code should not work at Acrobat Pro 9 at all, unless you've edited the registry and added this menu item to the white-list, or you're actually calling it from a trusted function in a folder-level script.

    2. The menu items in Acrobat and Reader X have changed dramatically. You need to make sure that this item is still available through the menus, and that its name has not changed.

    3. If commenting for the file in Reader is not enabled, its possible that this menu item could not be executed at all there.

    March 5, 2012

    hi,

    actually i called via javascript for the text box for actions i

    selected the execute a menu item in it added the javascript there i wrote

    this commandapp.execMenuItem("Annots:Tool:InkMenuItem");

    try67
    Community Expert
    Community Expert
    March 5, 2012

    Sorry, I'm not following you...