Converting Between PDF Actions Types
Introduction
This tutorial shows how to convert link and bookmark actions via the AutoBookmark™ plug-in for the Adobe® Acrobat®.
The plug-in supports the following conversions between different action types:
These operations are also available in the Action Wizard (Acrobat's batch processing tool) with the AutoBookmark™ Pro plug-in and can be used for processing multiple documents at once.
Prerequisites
You need a copy of the Adobe® Acrobat® along with the AutoBookmark™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both the Adobe® Acrobat® and the AutoBookmark™ plug-in.
Converting "Open a File" to "Open a Web Link" Actions
Step 1 - Open a PDF Document
Start the Adobe® Acrobat® application and open a PDF document with bookmarks and/or links using "File > Open..." menu.
Open a PDF document
Step 2 - Open the "Convert "Open a File" to "Open a Web Link" Action" Dialog
Select "Plug-Ins > Links > Convert Link and Bookmark Actions > Convert "Open a File" to "Open a Web Link" Actions..." in the main menu to open the "Convert "Open a file" to "Open a web link" Action" dialog.
Open the Convert Open a file to Open a web link Action dialog
Step 3 - Start the Converting Process
Specify what to convert: bookmarks and/or links. Click "OK" to start the conversion.
Start the converting process
This operation converts the following actions:
1. If a bookmark or link is using "Open a file" action and points to "Acetaminophen.pdf" file, then after conversion this bookmark is going to use "Open a web link" action that points to "Acetaminophen.pdf".
Example 1
2. If a bookmark or link is using "Go to a page in another document" action and points to page 2 in "Adderall.pdf" document, then after conversion this bookmark is going to use "Open a web link" action with the following URL "Adderal.pdf#page=2".
Example 2
3. If a bookmark or link is using "Go to a page in another document" action and points to a destination name "Aprazolam.Important information" in "Aprazolam.pdf" document, then after conversion this bookmark is going to have "Open a web link" action with the following URL "Aprazolam.pdf#Aprazolam.Important information".
Example 3
Converting "Open a Web Link" to "Open a File" Actions
Step 1 - Open a PDF Document
Start the Adobe® Acrobat® application and open a PDF document with bookmarks and/or links using "File > Open..." menu.
Open a PDF document
Step 2 - Open the "Convert "Open a Web Link" Actions to "Open a File" Dialog
Select "Plug-Ins > Links > Convert Link and Bookmark Actions > Convert "Open a Web Link" to "Open a File" Actions..." in the main menu to open the "Convert "Open a web link" actions to "Open a file" dialog.
Open the Convert Open a web link actions to Open a file dialog
Step 3 - Start the Converting Process
Specify what to convert: bookmarks and/or links. Click "OK" to start the conversion.
Start the converting process
Note that the conversion is only performed for the URLs that conforms to "file:///" protocol or do not conform to any known protocols such as http, https, ftp, mailto: and etc.
For example, the following sample URLs will be converted by this operation (valid URLs):
  • Acetaminophen.pdf
  • file:///Adderall.pdf
  • c:/data/Alprazolam.pdf
For example, if a bookmark or link is using "Open a web link" action and points to "Acetaminophen.pdf" file, then after conversion this bookmark or link is going to use "Open a file" action that points to "Acetaminophen.pdf" that is located in the same folder as the current PDF document (in this example: C:\data\Input Folder\Acetaminophen.pdf).
Example 4
Example 5
Example 6
The following sample URLs will not be converted by this operation (the conversion is impossible):
  • https://www.adobe.com
  • mailto:tech@evermap.com
  • http://www.mycompany.com/File.pdf
  • www.adobe.com
Converting "Open a Web Link" to "Execute JavaScript" Actions
Step 1 - Open a PDF Document
Start the Adobe® Acrobat® application and open a PDF document with bookmarks and/or links using "File > Open..." menu.
Open a PDF document
Step 2 - Open the "Convert "Open a Web Link" Action to "Execute JavaScript" Dialog
Select "Plug-Ins > Links > Convert Link and Bookmark Actions > Convert "Open a Web Link" Actions to "Execute JavaScript" Actions..." in the main menu to open the "Convert "Open a Web Link" Action to "Execute JavaScript" dialog.
Open the Open a web link Actions to Execute JavaScript dialog
Step 3 - Start the Converting Process
Specify what to convert: bookmarks and/or links. Select how to open links: in a new or existing window. Click "OK" to start the conversion.
Start the converting process
This operation converts web URLs into the following Acrobat JavaScript code: app.launchURL("url", openLinkInNewWindow);, where "url" parameter stands for the original URL in the "Open a web link" action.  The openLinkInNewWindow parameter is either true (if link needs to be open in a new window) or false (if it is going to be open in the same window). This parameter applies only if a PDF document is viewed inside a web browser.
For example, if the original "Open a web link" action was pointing to "http://www.evermap.com" then a corresponding "Execute JavaScript" action will use the following code: app.launchURL("http://www.evermap.com", true);. The link is going to be open in a new window (the second parameter is set to true).
Example 7
Note that the conversion is not performed on "Open a web link" actions that use file (file://) or JavaScript protocols because these protocols are not supported by app.launchURL() JavaScript method.
Click here for a list of all step-by-step tutorials available.