Convert Links to Named Destinations

Overview

Convert Links to Named Destinations scans GoTo link annotations in the selected pages, creates a named destination for each link target, and updates the link to point at the new named destination. This helps standardise links and makes destinations easier to reuse across documents and scripts.

Video: Convert Links to Named Destinations shown step by step, with narration.
The Convert Links to Named Destinations dialog
The Convert Links to Named Destinations dialog.

How to use

  1. Open a PDF that contains link annotations.
  2. Go to Plug-Ins > Links > Convert Links to Named Destinations.
  3. Select the pages: all pages (the default), the current page or a page range.
  4. Enter a destination name pattern using the available placeholders.
  5. Review the live preview of generated names and conflict markers.
  6. Click OK to convert the links.

Page scope

OptionDescription
All pages Converts links on every page of the document. This is the default.
Current page Converts links on the currently viewed page.
Page range Converts links on the pages from the From page to the to page, both included (page 1 is the first page of the document).
To end of document Available with Page range: ignores the to page and runs to the last page of the document.

Destination name pattern

The Pattern field controls how named destinations are named. The default pattern is Dest_Page_{dest_page}_From_{source_page}_{annot_index}.

PlaceholderReplaced with
{source_page} The 1-based page number containing the link annotation.
{dest_page} The 1-based page number the link points to.
{annot_index} The 0-based index of the link annotation on its source page.
{link_text} The first line of text found within the link bounds.

If the pattern resolves to an empty string, a fallback name of Dest_Page_N_Annot_N is generated automatically.

Preview

The dialog shows a live preview of the first generated destination names for links in the selected scope. Each entry is annotated with markers when a conflict is detected:

A status line reports the number of links in scope, how many of them get the same name as another link (duplicates), and how many generated names are already in the document.

Conflict handling

A generated name that already exists in the document, or that an earlier link in the same run has used, gets _2, _3 ... added. Existing destinations are never overwritten, and links that already point at a named destination are left unchanged, so running the command again only converts links that do not use a named destination yet.

Tip

Include {link_text} in the pattern to produce human-readable destination names that reflect the link’s visible text.

Note

Links whose destination cannot be read or rewritten are skipped and counted in the summary. The pattern must not be empty; if it is, OK asks you to enter one.

See also