I need to set up a PDF to meet the following criteria:

  • Contains attached PDFs
  • Attached PDFs can be opened with a link (or similar object) within the document itself
  • Opening the new document does not close the primary document
  • These functions must work properly without any potential recipients having to change their preferences.

(I'm running Adobe Acrobat IX Pro)

To save some time, here is what I've managed so far:

Microsoft Word Approach:

  1. Attach PDFs in Word Document
  2. Convert Word Document to PDF
  3. PDF links become images and no longer work

Adobe Acrobat Approach:

  1. Create a link
  2. Select the "Go to a Page view" Link Action
  3. Open the desired PDF from the attachments pane
  4. Click "Set Page View"

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!

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.

  • The command we are using also needs to reference the attachment name, which in our case is the filename we’ve originally imported:

    this.exportDataObject({ cName: "attachment.docx", nLaunch: 2 });

  • Now close the editor by clicking “OK”. And here you go, you shall have a PDF with a button in it that'll launch an attached PDF when pressed.

There is a workaround for that dreaded open cross document links in same window issues (I soon have the 15th anniversary of fighting with Adobe about the factory default for this option… they still don't want to get it…).

The workaround is to set the app.openInPlace property to false.

Now, as you do change an user preference, it is not quite "nice" to do so. What you will do in this situation is the following:

In a Document-level script of the document you read out the current setting and save it to a variable. In the willClose event you set the openInPlace property back to that variable. This would look like this:

a) in the Document-level script:

var myOpenInPlaceSetting = app.openInPlace ;
app.openInPlace = false ;

b) in the willClose Document Action:

app.openInPlace = myOpenInPlaceSetting ;

and that should do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .