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

javascript code to create new page from clipboard

New Here ,
May 03, 2020 May 03, 2020

Copy link to clipboard

Copied

I would like to know how can I create this Script, and be able to paste what I have in the clipboard right after the last page that I have. For example, if you copied an image to the clipboard I want to press the button or Call the code and  the image have  inserted   followed by my last page that I have in my file.
 I want to achieve this using code of Java Script

TOPICS
Acrobat SDK and JavaScript

Views

284

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
community guidelines
Community Expert ,
May 03, 2020 May 03, 2020

Copy link to clipboard

Copied

This is not possible with a script.

Votes

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
community guidelines
Community Expert ,
May 03, 2020 May 03, 2020

Copy link to clipboard

Copied

The short answer is NO. There are not Acrobat scripting features for handling clipboard content, but there are menu items for pasting annotations, and even inserting a page from clipboard content.  While Acrobat JavaScript can execute a menu item, these particular ones are off limits. 

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

Votes

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
community guidelines
Community Expert ,
May 03, 2020 May 03, 2020

Copy link to clipboard

Copied

LATEST

Opps, I was mistaken, This line of code will insert a new page from clipboard data, when run from a privileged context.

It requires the user to specify the page location:

 

app.execMenuItem("InsertPagesCB");


 

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

Votes

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
community guidelines