Opening a PDF Attachment with an in-document Link
This opens the new document, but it closes the primary PDF. The solution to this is to go to Edit->Preferences->Documents and un-check Open cross-document links in the same window. The problem with this solution is that it only works on my computer, and this will be sent to many people who won't know to change their settings.
Any ideas are much appreciated!
asked Feb 1, 2016 at 23:39
29 1 1 gold badge 2 2 silver badges 4 4 bronze badges
2 Answers 2
I don't have Acrobat XI, I have Acrobat DC 2015, but I think it should work similar.
- Open your PDF document and go to the “Attachments” pane on the left side of the Acrobat user interface. The “Attachments” pane is represented by the paperclip icon.
- Once the “Attachments” pane is displayed, click on the menu icon and select to add an attachment
- Now navigate to the file you want to attach, select it and click “OK”. This should now show you the new attachment in the “Attachments” pane.
Now you have the file attached, but you want a clickable button in the PDF that shall open the attached file in it's own window/tab. So do as following:
- Select the “Tools” tab and then use the search field at the top of that dialog to search for “Button”. Acrobat will tell us where the "Add a Button" tool is.
- Click on the “Add Button” search result. This dumps us right into the “Rich Media” toolset, with the Button tool selected. This means we can now place the button on the PDF page by moving it around to the correct location and then clicking to place it.
- At this time, the button tool is still selected, and we can double-click on the button to bring up it’s Properties dialog. This is where we need to make changes to give this button the ability to launch the attached Word document.
- Select the “Actions” tab (1), then select to create a “Mouse Up” action (2), select to run a JavaScript (3) and click on the “Add” button (4). This will bring up the JavaScript editor. Here we have to add a one line script.
- This script will call the Doc.exportDataObject() method. You can find more information about this JavaScript method here: Acrobat JavaScript API – Doc.exportDataObject() The trick here is to use the “nLaunch” parameter set to the value “2”, which has the following descrption:
If the value is 2, the file will be saved and then launched. Launching will prompt the user with a security alert warning if the file is not a PDF file. A temporary path is used, and the user will not be prompted for a save path. The temporary file that is created will be deleted by Acrobat upon application shutdown.