Overview
Export Links to Text writes every link annotation 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
- Open the PDF whose links you want to export.
- Go to Plug-Ins > Links > Export Links to Text.
- Choose a name and location for the file.
.csvand.txtare both offered; the contents are the same either way. - Click Save.
File format
One line per link, with no header row, and the columns in this fixed order:
| Position | Column | Description |
|---|---|---|
| 1 | Page | 1-based page number. |
| 2 | Highlight | The link's highlight mode: N none, I invert,
O outline, P push. |
| 3 | Border style | S solid, D dashed, B bevelled,
I inset, U underline. |
| 4 | Border width | In points; 0 for an invisible border. |
| 5 | Flags | The annotation flag bits. |
| 6 | Colour | The border colour, packed as a single number. |
| 7–10 | Left, right, top, bottom | The link rectangle in PDF points, to six decimal places. |
| 11 | Link 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.
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.