Skip to main content
Participant
December 17, 2020
Answered

JavaScripting

  • December 17, 2020
  • 3 replies
  • 719 views

Can someone help me develop a javascript that will copy the contents of the device clipboard to a designated form field inside an Adobe Acrobat file?

 

Any help would be greatly appreciated!

 

Neil

This topic has been closed for replies.
Correct answer Bernd Alheit

Not possible.

3 replies

JR Boulay
Community Expert
Community Expert
December 17, 2020

You cannot paste using JavaScript (security requires).

Acrobate du PDF, InDesigner et Photoshopographe
Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
December 17, 2020

Not possible.

ls_rbls
Community Expert
Community Expert
December 17, 2020

Would you mind sharing any code that you've already tried or tested?

 

I'm not sure if this is a deprecated feature in  Acrobat, or not possible,  or if it is not a recommended practice due to security, (but I may be wrong). But you can create a PDF from the content that is already copied to the clipboard with the Acrobat built-in "Create PDF" tool as shown in this short tutorial: Create a PDF from Clipboard Content in Acrobat Pro DC – Instructions 

 

In any case, if were able to achieve this via Acrobat JavaScript, You'll also be limited to work only with the last content that was copied to the clipboard not all of its copied contents. That also may impact how it will interact with the type of field object that you will  copy the clipboard content to.