Copier le lien dans le Presse-papiers
Copié
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?
Copier le lien dans le Presse-papiers
Copié
JS in Acrobat is not capable of doing that.
On Tue, Sep 19, 2017 at 8:52 AM, akyd8807993 <forums_noreply@adobe.com>
Copier le lien dans le Presse-papiers
Copié
Any other ideas?
Copier le lien dans le Presse-papiers
Copié
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>
Copier le lien dans le Presse-papiers
Copié
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.
Copier le lien dans le Presse-papiers
Copié
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
Copier le lien dans le Presse-papiers
Copié
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).
Copier le lien dans le Presse-papiers
Copié
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
Copier le lien dans le Presse-papiers
Copié
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.
Copier le lien dans le Presse-papiers
Copié
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.
Copier le lien dans le Presse-papiers
Copié
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)
Copier le lien dans le Presse-papiers
Copié
Same here. Works just fine.
Copier le lien dans le Presse-papiers
Copié
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?
Copier le lien dans le Presse-papiers
Copié
What's your OS version?
Copier le lien dans le Presse-papiers
Copié
Windows 10 Pro
1703
The native language here is Hebrew, in case it matters.
Copier le lien dans le Presse-papiers
Copié
Is the text you're displaying in the box also in Hebrew?
Copier le lien dans le Presse-papiers
Copié
No. As I said, it's an email address.
In the example I sent you (linked, actually), the text is purely English.
Copier le lien dans le Presse-papiers
Copié
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?
Copier le lien dans le Presse-papiers
Copié
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>
Copier le lien dans le Presse-papiers
Copié
Good idea. Thank you!
Trouvez plus d’idées, d’événements et de ressources dans la nouvelle communauté Adobe
Explorer maintenant