I’ve heard from David that these are a big pain in the butt, but it was in the spec, so I’m trying to get them done.
Basic goal: Clickable links that take the user to a specific page.
I need to create/modify existing hyperlinks in one document of a book to link to a heading/page in another document in the same book, without exporting the entire book in one pass. Instead, because these files are large, I have to export the chapters separately to PDF, then combine them in Acrobat.
Setup:
I’ve got ICML files generated by a script. The markdown source contains hyperlinks from one heading to another. Those links are broken when I split the ICML up into chapter-based files, and wouldn’t work anyway, as far as I can tell, because they’re translated to external URL links by Pandoc. I’ve got a script that goes through each document of the book and inserts a manual page reference “p234” after the links, but it doesn’t modify the hyperlink itself. It’s sort of a poor-man’s Cross-Reference. That part works fine. I’ve got a test script in which I’ve tested a number of destination types.
Here’s a diagram of my setup:
https://dl.dropboxusercontent.com/u/8663017/Fixing%20Links-01.jpg
The Problem:
The problem is that any type of Hyperlink I create references the external document, even when combined. So I export Chapter 1, with a link to Page 10 in the Chapter 2 document, then combine them, and the link still points at an external file, which defeats the purpose of an internal link.
The Table of Contents is also in its own INDD file and is exported to separate PDF document, but when combined with the other chapters, it works fine, unlike any of the other links. I examined one of the TOC links in Acrobat and it uses a “Named Destination” rather than the “Shared Destination” available in Indesign, so I’m wondering if there’s a way to set a Named Destination hyperlink in script, or if there’s some other way of getting this to work, either by putting in the Indesign equivalent of a web “#named-anchor” or by scripting Acrobat itself somehow.