Copy link to clipboard
Copied
In my PDF form I have combined a few text fields value and display in another text field (Fieldname-26).
I need to select this field and copy to the clipbroad so that I can paste it to another application.
Can I do it in JS ? I am new to JS. Thanks in advance
Copy link to clipboard
Copied
No, Adobe removed this security vulnerability a long time ago, back in Acrobat 4 or 5.
Copy link to clipboard
Copied
Thanks for the reply. I have to highlight the content, copy and paste manually.
Copy link to clipboard
Copied
function myFunction() {
/* Get the text field */
var copyText = document.getElementById("myInput");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
alert("Copied the text: " + copyText.value);
}
Copy link to clipboard
Copied
This function will not work in Adobe Acrobat or Acrobat Reader!
Copy link to clipboard
Copied
Corrrect. I have tried that. It does not work on PDF form.