Copy link to clipboard
Copied
Hello Everyone,
The code below works perfectly on Adobe Acrobat Pro DC, I'm wondering if there is any way to have this code to work on Adobe Acrobat Reader DC. Any support would be greatly appreciated !
var Field1 = this.getField("Field1").value;
var Field2 = this.getField("Field2").value;
var doc = this.createDataObject({cName: "Your Sequence.txt", cValue: "Please use the sequence from Field1 + " to " + field2});
this.exportDataObject({cName: "Your Sequence.txt", nLaunch:2});
Kind Regards
Copy link to clipboard
Copied
Creating a data object in Reader requires "file attachment rights".
Copy link to clipboard
Copied
Hello try67,
I really appreciate your quick response. Sorry, but i don't have that much experience in adobe and i've been trying to find out how to set up the "file attachment rights" and so far no success. i wonder if you could give me some directions, thanks in advance !
Copy link to clipboard
Copied
This is not something that can be done in Acrobat. You will need to use a special server application from the LiveCycle family to do it.
This application is very expensive, though, so I don't think it's going to be worth it.
An alternative is to create this file in advance, in Acrobat, and leave it empty. Then you'll just need to set its contents, and won't have to create it from scratch.
Copy link to clipboard
Copied
In addition to the LiveCycle server solution, you can also use DataLogic's PDF Java Toolkit to reader-enable documents: http://www.datalogics.com/products/pdf/pdfjavatoolkit/
Copy link to clipboard
Copied
What exactly are you trying to accomplish? Why do you need a one line text file to be generated? What does the user do with the text file once it's launched?
Copy link to clipboard
Copied
Hello Joel, thanks for replying
This form has 30 rows and in each of them a sequence of really long numbers are
calculated to be used as serial numbers upon clicking in a check box which
has this code. Field1 is the first number and field2 is the last in the
sequence. The idea of this feature is to have a pop up screen telling which
sequence should be used with a message saying “Please use the sequence from Field1
to Field2” which can just be copied and pasted into a message when sent to the
production line. This would avoid the problem of picking the wrong sequence
from the wrong row or wrong field as all we need to know would be in that pop up screen.
Kind Regards,
Copy link to clipboard
Copied
Ok - So a few things that might be helpful. Rather than saving a file and opening it only to have people copy the text and paste it somewhere else, you can...
Let me know if any of that is helpful and I can guide you how to do it.
Copy link to clipboard
Copied
Hello Joel,
The first option looks like exactly what I’ve been trying to do. I don’t really need to save any file, I only need to copy and paste an instruction along with the values in Field1 and Field2 into the body of an e-mail. I would appreciate if you could give me some directions, thanks again!
Regards,
Copy link to clipboard
Copied
So i was able to create the popup dialog box showing the values from Field1 and Field2 into my form, but so far no luck creating the copy shortcut in it. I'm wondering if anybody could give me some guidance. Thanks in advance !
Copy link to clipboard
Copied
It's not possible to copy text into the clipboard using a script.
You can generate a new email with the desired text as its default message body, though.
Copy link to clipboard
Copied
Are you asking how to get the string that you assemble from the fields into the copyable text area of the dialog?