Copy link to clipboard
Copied
I have a PDF form, in which there's a button. When the user presses the button, I need to copy some text (an email address) to the clipboard, so that the user will be able to paste it in other applications. This text can be assumed to be constant (i.e. I can hardwire it in a JS).
I thought about creating a n invisible textfield in the form with the text, and the using selectNthPageWord and app.MenuItem("Copy"). But this works for only one word (an email address is processed as separate words), and also the clipboard seems to be erased once the JS finishes. I need the text to remain there.
Any help, please?
Copy link to clipboard
Copied
JS in Acrobat is not capable of doing that.
On Tue, Sep 19, 2017 at 8:52 AM, akyd8807993 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Any other ideas?
Copy link to clipboard
Copied
You can display the text in an alert window and ask the user to copy it
from there.
On Tue, Sep 19, 2017 at 10:44 AM, akyd8807993 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Text in an alert box is unselectable. I tried a response box, and the text there can be selectable (and editable, which is regrettable), but when the user selects it and presses Cntrl+C, and the text is copied to the clipboard, it doesn't stay there for long. The clipboard is erased when the response box is closed, and the text is no longer available.
Copy link to clipboard
Copied
Yes, I meant a response box. What you're describing is very strange, and not how it works for me. If I copy text from such a window it will remain in the Clipboard until I copy something else which overwrites it. That is a system-wide setting.
Edit: fixed type-o
Copy link to clipboard
Copied
Can I upload a sample? I tried to attach a file to this reply, and it doesn't seem to work.
It's not a system-wide behaviour. In other application it works (the info remains in the clipboard after the original application is closed). Only in response boxes in PDFs (as far as I can tell).
Copy link to clipboard
Copied
Can I upload a sample? I tried to attach a file to this reply, and it doesn't seem to work.
Acrobat : File menu : Send File : Send & Track : Create anonymous link
Copy link to clipboard
Copied
Okay, it's here:
When I open in Chrome (pdfium plugin), it works fine. However, in Acrobat (Reader version 2017.012.20098) it behaves as follows:
I open the PDF. It displays a response box. I select (by mouse) the text in the editable field. I press Cntrl-C. I open MsWord, and press Cntrl-V. Works fine. I then close the response box (either by "OK" or "Cancel"), return to the same MsWord windows, press Cntrl-V again and nothing happens.
Copy link to clipboard
Copied
Yes, I meant a response box. What you're describing is very strange, and now how it works for me. If I copy text from such a window it will remain in the Clipboard until I copy something else which overwrites it. That is a system-wide setting.
I confirm.
Copy link to clipboard
Copied
It works fine for me with the latest Acrobat Reader.
(I don't need to select the text in the reponse box, it comes already selected)
Copy link to clipboard
Copied
Same here. Works just fine.
Copy link to clipboard
Copied
I asked a friend to try it on her computer, and it doesn't work. Maybe it's something in the system configuration? what can it be?
Copy link to clipboard
Copied
What's your OS version?
Copy link to clipboard
Copied
Windows 10 Pro
1703
The native language here is Hebrew, in case it matters.
Copy link to clipboard
Copied
Is the text you're displaying in the box also in Hebrew?
Copy link to clipboard
Copied
No. As I said, it's an email address.
In the example I sent you (linked, actually), the text is purely English.
Copy link to clipboard
Copied
Another approach I can think of is, give up the alert & response boxes. I can write the information I want in a textfield in the documents itself, make it hidden, and when the user finishes, I can make that field visible.
However, if this field is read-only, then its value is unselectable. And I prefer not to make it editable. Any ideas?
Copy link to clipboard
Copied
Make the field editable and as its custom validation script enter this code:
event.rc = false;
On Wed, Oct 4, 2017 at 2:41 PM, akyd8807993 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Good idea. Thank you!