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.
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").
Thanks for the reply,
Unfortunately my colleague has already tried that and it didn't work.
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: