Attach Document javascript code not working
Copy link to clipboard
Copied
In the past, I used Flash in Adobe LiveCycle Reader Extensions to make it work. Since Flash is no longer available, I have been unable to update the form. The Javascript code allows you to Attach File, Open Selected File, Remove Selected File, and counts the number of attachments. The form was created in LiveCycle ES4.
Copy link to clipboard
Copied
This form works in Adobe Acrobat DC.
Copy link to clipboard
Copied
We are unable to attach a form using Adobe Acrobat DC
Copy link to clipboard
Copied
What happens when you attach the form?
Copy link to clipboard
Copied
The first time I try, I receive a 'Cannot Save Form Information' error message. I click closed then nothing happens when I click the 'Attach File' button. I've had several people try it with the same results.
Copy link to clipboard
Copied
Does you use Adobe Acrobat or Acrobat Reader?
Copy link to clipboard
Copied
Adobe Acrobat Reader DC
Copy link to clipboard
Copied
Use Adobe Acrobat, not Acrobat Reader.
Copy link to clipboard
Copied
Is Adobe Acrobat free?
Copy link to clipboard
Copied
This form is used Agency wide.
Copy link to clipboard
Copied
Adobe Acrobat is not free.
Copy link to clipboard
Copied
The older version of the form works fine in Reader. Since we can no longer use LiveCycle Reader Extentions, the form will not long work.
How can we get the updated form to work in Reader?
Copy link to clipboard
Copied
May be that the form requires special rights.
Copy link to clipboard
Copied
If it did require special rights, would it still work in Adobe Acrobat?
Copy link to clipboard
Copied
"File Attachement" is a feature that requires "Special Reader Rights", and always has. When you say "LiveCycle Reader Extentions", you are referring to special "Rights", also called "Extensions". A Right/Extension is a digital certificate that when applied to a PDF tells Reader that it is ok to allow a certain features.
When you add an "Extension" to a PDF, the feature associated with the extension will work in both Acrobat Pro and Reader. However, other features that also require an extension, but are not applied, are blocked in Acrobat Pro.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Thank you,
How do I get this form to work in Adobe Acrobat Reader?
Copy link to clipboard
Copied
I hate to repeat myself, but I'll rephrase. Adding file attachments to a PDF is restricted in Reader. It is not allowed unless the PDF has a Reader Right or Extension that allows file attachments.
So, in order to attach a file to a PDF in Reader, that PDF needs to have the File Attachment extension added to it.
There are some extensions that come for free. These extensions/rights are added to a PDF using Acrobat Professional.
To apply the rights, you select the "File > SaveAs Other > Reader Extended PDF" menu item.
However, I do not believe these free rights include file attachments. I am not sure about that, you'll have to try it out. If it is not included, then you'll need to purchase it from Adobe.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
> However, I do not believe these free rights include file attachments. I am not sure about that, you'll have to try it out.
I'm sure, and they don't.
Copy link to clipboard
Copied
Add the rights with LiveCycle Reader Extensions.
Copy link to clipboard
Copied
"How do I get this form to work in Adobe Acrobat Reader?"
You can't since Acrobat Pro can't enable Reader Extensions in a XFA-PDF (made with Designer).
Try this "real" PDF file, made with Acrobat Pro, that did not requires any extension to work with Acrobat Reader (versions DC and version XI):
https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:43b01ff3-a660-499b-a259-0e17c4998721
Acrobate du PDF, InDesigner et Photoshopographe
Copy link to clipboard
Copied
Ahh, the Attachment Annotation!! Very Clever JR 🙂
This code will need a little modification to work in a LiveCycle form.
Use the Acrobat JavaScript Reference early and often

