Cleanup PDF Links And Bookmarks
Introduction
This tutorial shows how to automatically cleanup PDF links and bookmarks using the AutoBookmark™ plug-in for the Adobe® Acrobat®. The software checks every link annotation, form element (such as form button, text fields or check box) and bookmark in the currently open PDF document for number of various problems and performs the cleanup operations.
Use this operation for:
  • Converting absolute file references into relative
  • Deleting links without any assigned actions
  • Deleting links that are pointing to missing files or pages
  • Deleting bookmarks that are pointing to missing files or pages
If you need to cleanup bookmark titles, then use a "Cleanup Bookmark Titles" operation.
This operation is also available in the Action Wizard (the Acrobat's batch processing tool) and can be used for automating of document processing workflows.
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.
Step 1 - Open A PDF Document
Start the Adobe® Acrobat® application and open a PDF document to be processed using "File > Open…" menu. It is important to make a backup copy of your PDF document before applying this operation. This operation may permanently delete some document elements such as link annotations and/or bookmarks. It is always a good idea to keep an original document.
Step 2 - Open The "Cleanup Links And Bookmarks" Dialog
Select "Plug-Ins > Links > Cleanup Links And Bookmarks…" to open the "Cleanup Links And Bookmarks" dialog.
Step 3 - Specify Settings
Check desired boxes to specify cleanup actions:
Select the "Convert absolute file references into relative (if possible)" option to check actions for links to external files and verify that a corresponding file reference is not using an absolute path to a file. If an absolute file path is found, then it will be automatically converted into a relative path.
Select the "Delete link annotations without assigned actions" option to permanently delete link annotations if they do have any actions assigned.
Select the "Delete link annotations pointing to missing files or pages" option to delete link annotations if they link to a missing external file or a page that no longer exists.
Select the "Delete bookmarks pointing to missing files or pages" option to delete bookmarks if they link to a missing external file or a page that no longer exists.
Select the "Show processing report in external viewer" option to automatically open a processing report in a default text file viewer (typically in Notepad text editor).
Click "OK" to start the cleanup process.
Step 3 - Examine A Processing Report
This operation always generates a processing report that is placed in the same folder as the input PDF document. The report is automatically named as follows: documentname.pdf.fixlinks.txt, where "documentname" is a file name of the input PDF document.
Understanding the Cleanup Report
The processing report contains 3 main sections: a file information, a statistics and a processing log.
File information section contains a report date, a path to the input PDF document, an input file size and a document title (from "Title" metadata field).
Statistics section contains information on the total number of pages checked, number of the link annotations and form elements found, number of the bookmarks processed, total number of links with absolute file path references, number of the absolute file links converted into relative, number of links without any actions. It also contains total number of dead links (files or pages missing), total number of deleted link annotations and bookmarks.
Processing log section contains detailed information on the links and bookmarks that have been processed.
The software checks actions for links to external files and verify that a corresponding file reference is not using an absolute path to a file. If an absolute file path is found, then it will be automatically converted into a relative path (if it is technically possible). A path to a file can be either absolute or relative. A full path or absolute path is a path that points to the same location on one file system regardless of the working directory of the document that contains a link. It is usually written in reference to a root directory. A relative path is a path relative to the current document's folder. If a document uses absolute paths then it cannot be moved to a different folder, or another computer (unless this computer contains exactly the same folder structure) or burned on CD/DVD.
The software deletes link annotations if they do have any actions assigned and if they link to a missing file or a page that no longer exists.
The software deletes bookmarks if they link to a missing external file or a page that no longer exists. Only bookmarks without child elements will be deleted.
Here is an example of the processing log section:
You can find a list of other step-by-step bookmarking tutorials here: http://www.evermap.com/abm_bm_summary.asp#tutorials.