Can I create a custom context menu for PDF Fields using Javascript?

Mar 07, 2018

Copy link to clipboard

Copied

Background : I want to create or add my custom action to context menu shown when you right click on a field in PDF.

Approach : Using Javascript is it possible to add my custom actions to this field context menu?

Use the app.popUpMenu() function.

Add a script like this to the MouseUp Event on a field. It triggers off of Ctrl/Cmd-Click

if(event.modifier)

{

   var cRtn = app.popUpMenu(...);

    switch(cRtn)

    {

        ... Process Results ...

     }

}

TOPICS
Acrobat SDK and JavaScript

Views

105

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can I create a custom context menu for PDF Fields using Javascript?

Mar 07, 2018

Copy link to clipboard

Copied

Background : I want to create or add my custom action to context menu shown when you right click on a field in PDF.

Approach : Using Javascript is it possible to add my custom actions to this field context menu?

Use the app.popUpMenu() function.

Add a script like this to the MouseUp Event on a field. It triggers off of Ctrl/Cmd-Click

if(event.modifier)

{

   var cRtn = app.popUpMenu(...);

    switch(cRtn)

    {

        ... Process Results ...

     }

}

TOPICS
Acrobat SDK and JavaScript

Views

106

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 07, 2018 0
Mar 07, 2018

Copy link to clipboard

Copied

No, that's not possible. You can do it if the user holds down Ctrl or Shift while clicking the field, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 07, 2018 0
Mar 07, 2018

Copy link to clipboard

Copied

Use the app.popUpMenu() function.

Add a script like this to the MouseUp Event on a field. It triggers off of Ctrl/Cmd-Click

if(event.modifier)

{

   var cRtn = app.popUpMenu(...);

    switch(cRtn)

    {

        ... Process Results ...

     }

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 07, 2018 0