InDesign PDF bookmarks to named destinations
Earlier this year I wrote a plugin to automatically convert all the bookmarks in a pdf file to named destinations. This is because the project I work on had a pdf help file and the automatic named destinations created by InDesign add a bunch of random numbers to the named destination names; I need these to be stable so that I can consistently call the same named destination to launch to the appropriate section of the help manual. So as a workaround, I wrote this plug in so that the named destination names match the bookmark names and are unchanging.
Anyhow, the plug in works great on pdfs I create in MS word or find randomly on the web, but when I try to run it on a pdf file exported from adobe InDesign (our help file is created using InDesign), it fails. The named destinations are created, but they don't list a page number and hence don't actually work. Are there any settings in InDesign I need to change or is there something I might be doing incorrectly when I export the project to a pdf that may be causing this issue?