Include a link to attached files: is it possible?

Avatar

Avatar

Le_Rouscc

Avatar

Le_Rouscc

Le_Rouscc

18-06-2013

Hi all,

I have a problem I hope you can help me with.

When using Acrobat,Pro you can add attachments to a PDF file and include a link in the PDF file to this attachment. As a result, if you click on the link, the attachment will open in a new window.

Now, I have created a form in LiveCycle Designer, and on the bottom of the form I would like to include a link to an attached file. However, it seems that I cannot edit the newly created form in Acrobat Pro. Hence, I am not able to include a link to the attached file using the method described above.

I cannot find an option to attach files in LiveCycle Designer, nor a way to link to an attachment. Am I overlooking something, or is it just not possible to include a link to an attachment in a form created in LiveCycle Designer?

Many thanks in advance for your reply!

Accepted Solutions (0)

Answers (12)

Answers (12)

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

24-08-2018

Hi MJ,

You will have to 'Reader Extend' the form to allow Reader to add attachments, there's a good summary of all this in one of Niall's blogs

Using LiveCycle Forms in Acrobat and Reader | Assure Dynamics developing dynamic LiveCycle and Flex ...

Bruce

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

22-06-2013

Hi,

I guess it is too late now, but you can do this in a LiveCycle Designer form.  Just the same as an Acrobat form, except you refer to the Doc object as event.target.  So to attach a file use this JavaScript;

if (event.target.importDataObject("MyAttachedFile"))

{

    var attachmentObject = event.target.getDataObject("MyAttachedFile");

    console.println("Attachment path="+attachmentObject.path);

}

And, this will open it.

event.target.exportDataObject({ cName: "MyAttachedFile", nLaunch: 2 });

Bruce

Avatar

Avatar

Josh_Geurian

Avatar

Josh_Geurian

Josh_Geurian

20-06-2013

I do not think that is an option. Livecycle would not know that the form is attached within the PDF as attachments are in Acrobat; not Livecycle. If you want that kind of functions you would have to create the form in Acrobat.

Avatar

Avatar

Marquin20

Avatar

Marquin20

Marquin20

27-08-2018

Yes, you’re correct. Although, using LiveCycle to create static forms is not an option (for me).  I’d only use LiveCycle if the form needed some “dynamic” features and I use InDesign to create static forms.

Avatar

Avatar

George_Johnson

Avatar

George_Johnson

George_Johnson

27-08-2018

Acrobat can't enable normal file attachments. It can enable commenting, thus allowing Reader to attach files as comments, which is a manual process. This process can be initiated via JavaScript, but the user still has to navigate and select the file to be attached. LiveCycle Designer can create static forms which allow this with Reader.

Avatar

Avatar

Marquin20

Avatar

Marquin20

Marquin20

27-08-2018

Hi George,

Thanks a lot for your reply. It confirms what I've grasped from a number of posts: LCD will produce dynamic PDFs but can't enable file attachments. Adobe Acrobat can enable file attachments but doesn't have the functionality to produce dynamic PDFs - and unfortunately, can't be used to edit forms created with LCD. Just another way that Adobe manipulates the need to purchase its products.

Regards,

MJ

Avatar

Avatar

George_Johnson

Avatar

George_Johnson

George_Johnson

25-08-2018

When you Reader-enable with Acrobat, it does not include the usage right that allows Reader to add file attachments. Reader does allow user to add attachments as comments, and it can be done via JavaScript, but not with a dynamic XFA form.

Avatar

Avatar

Marquin20

Avatar

Marquin20

Marquin20

24-08-2018

Hi Bruce,

Thank you for replying - good to know that you're still online after all. Yes, actually I had saved the LCD form (using Acrobat DC) as a Reader Extended PDF (Enable More Tools, includes form fill & Save). Below is a dropbox link to the form:

Dropbox - ReaderExtendedTest.pdf

Thanks again,

MJ

Avatar

Avatar

Marquin20

Avatar

Marquin20

Marquin20

23-08-2018

Hi Bruce,

A few years ago (2013), you posted a possible solution to the problem of providing a link for users to attach files to a PDF created in LiveCycle Designer. Now in 2018, this still seems to be a problem and you were the only person who seemed to offer a solution. I copied your script and placed it in the Script Editor as follows:

if (event.target.importDataObject("MyAttachedFile"))
{
    var attachmentObject = event.target.getDataObject("MyAttachedFile");
    console.println("Attachment path="+attachmentObject.path);
}
event.target.exportDataObject({ cName: "MyAttachedFile", nLaunch: 2 });

However, it seems to work only if someone's using Adobe Acrobat but it doesn't work with Adobe Reader which most users have.

I'm wondering if there's something I'm missing (I'm a novice user of JavaScript and LiveCycle Designer) or if there's something I need to modify in the script.

Thanks very much.

MJ

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

24-06-2013

Hi,

I don't think so.  You can set a PDF document to open at a particular page when you create it, but I guess you want something dynamic.  If the PDF was available on the web you could open it at a specific bookmark using a nameddest=name query string parameter and the app.launchURL() method.

Regards

Bruce

Avatar

Avatar

lateniteNC

Avatar

lateniteNC

lateniteNC

23-06-2013

Bruce:

I believe this is sufficient related to avoid a new thread. Is it possible to open a pdf attachment (using your methods above) but with a twist? Open the document and move to a specific bookmark in the pdf?

Avatar

Avatar

Le_Rouscc

Avatar

Le_Rouscc

Le_Rouscc

20-06-2013

Hi Josh,

Thanks for your reply. I have recreated the form in Acrobat and got things working the way I wanted. Problem solved.