Export Links to Text

Video: Export Links to Text shown step by step, with narration.

Overview

Export Links to Text writes the link annotations in the active PDF to a CSV file — position, appearance and destination alike. Its counterpart, Import Links from Text, reads the same file back, so the pair is the way to copy a set of links between documents or to rework them in a spreadsheet.

The PDF is not changed, and no links are removed.

How to use

  1. Open the PDF whose links you want to export.
  2. Go to Plug-Ins > Links > Export Links to Text.
  3. Choose a name and location for the file. .csv and .txt are both offered; the contents are the same either way.
  4. Click Save.

File format

One line per link, with no header row, and the columns in this fixed order:

PositionColumnDescription
1Page1-based page number.
2Highlight The link's highlight mode: N none, I invert, O outline, P push.
3Border style S solid, D dashed, B bevelled, I inset, U underline.
4Border widthIn points; 0 for an invisible border.
5FlagsThe annotation flag bits.
6ColourThe border colour, packed as a single number.
7–10Left, right, top, bottom The link rectangle in PDF points, to six decimal places.
11Link text The page text underneath the link, read from the rectangle. Blank when the link covers an image or empty space.
12+Action Depends on the link's action: the URL for a web link; the destination name, or the page number and view, for a link within the document; file and destination for a link into another PDF.

Values containing a comma or a quotation mark are quoted in the usual CSV way, so the file opens cleanly in a spreadsheet. The file is UTF-8 with a byte order mark, so link text and destination names in any language survive the round trip through Import Links from Text.

Links that jump to a page through a direct destination (the usual form in PDFs made by Word and InDesign) are exported like any other link to a page. Links the format cannot hold — JavaScript, embedded-document and form-submission links — are left out, and the completion message lists how many of each were skipped.

Note

A link whose action cannot be read is skipped rather than exported half-written, so the line count can be lower than the number of links in the document. Run Create Link Report if you need to know which ones.

See also