Link to file attachments

How do I create a link within the document, to a file attachment saved in the 'attachments' of the PDF?


Sarah Sachinis


3 Answers

Voted Best Answer

OK, so to do this you need to use a script, but before you do that you need to know the internal name of the file in the PDF. It's usually the file's name, but just to make sure open the JS Console (Ctrl+J), enter the code below and press Ctrl+Enter:

this.dataObjects

This will output a list of all the attachments in the file with their names. So know that you know the name of the file you want to open go to your button and add a MouseUp action with the "Execute a JavaScript" command, and this code:

this.exportDataObject({cName: "Name Of Data Object Goes Here", nLaunch: 2});

Clicking the button will now cause that file to be saved to a temporary folder on the machine and then launched in the default application associated with that file type.

.


Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


By Gilad D (try67)   

Is this file a PDF?

.


Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


Gilad D (try67)   

For future reference, here is a detailed tutorial that explains How to make a link or button to open PDF attachments. You'll need to use Gilad's JavaScript code for non-PDF files.


enter image description hereFollow me on All things Acrobat and more blog


Lori Kassuba   


Please specify a reason: