Copy link to clipboard
Copied
Hi everyone,
I use the following suffix on an html link in order to link to a specific page within a pdf file: #page=15 This works but I need to know go one step further and link to a specific bookmark within the pdf. I use the following suffix to try to do this: #bookmark name The above syntax doesn't work because the bookmarks all have spaces in their names. Apparently it's supposed to work if I remove the spaces from the bookmark names but this isn't practical because I'm generating the pdf out of Indesign and the bookmarks in the resulting pdf are just a reflection of the table of contents in Indesign. I can't remove the spaces from the TOC entries just so that there's no spaces in the bookmarks in the pdf.
So I need some sort of workaround and wondered if anyone would have any suggestions. Is there some acrobat script or any other solution to this problem?
Really appreciate any help.
Copy link to clipboard
Copied
Try %20 instead of spaces. HTML links are URL-encoded, and this is the usual translation of a single space, as for example can be seen in links in Google.
If it works, you can automatically convert the bookmark name to URL format with the function encodeURI ("Every non-alphanumeric character is encoded as a percent escape").
Copy link to clipboard
Copied
Thanks for the reply,
Unfortunately my colleague has already tried that and it didn't work.
Copy link to clipboard
Copied
Jumping to a page inside a PDF can be done for a URL But bookmarks cannot be used inside a URL. The trick is to use Named Destinations. Here's an example:
http://www.reality-tech.com/url-to-a-location-inside-a-pdf/
Joel Plaut