Skip to main content
Participant
June 21, 2017
Question

Javascript not working on adobe acrobat reader dc

  • June 21, 2017
  • 3 replies
  • 2777 views

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

This topic has been closed for replies.

3 replies

Joel Geraci
Community Expert
Community Expert
June 22, 2017

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?

Participant
June 22, 2017

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,

Joel Geraci
Community Expert
Community Expert
June 22, 2017

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...

  • Pop open a dialog that has the message already selected and ready for copying. There could be instructions, branding etc. The user would just hit the copy shortcut then close the dialog.
  • Pop open an input box with the message prepopulated (same as a dialog essentially but easier to create) Not many options for layout or branding. The input box is intended to collect information from the user but you don't have to use it that way. There are no input box police that will come to your door in the middle of the night.
  • If the message is intended to be in the body of an email (or even part of an email) the email message can actually be generated by Acrobat/Reader where the To, Subject, and Body are all preset. You can add additional text around the message if necessary so all the user needs to do is hit send.

Let me know if any of that is helpful and I can guide you how to do it.

Participant
June 22, 2017

Hello ,

     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 !

try67
Community Expert
Community Expert
June 22, 2017

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.

Karl Heinz  Kremer
Community Expert
Community Expert
June 22, 2017

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/

try67
Community Expert
Community Expert
June 21, 2017

Creating a data object in Reader requires "file attachment rights".