1) Instead of names (a lot of overhead) can I use numbers, probably the original creation index and how do I obtain these?
2) Need the rect of destination to draw lines in script. How do I get these att's?
Do I cross the PDViewTree and how does one do this? GetAnnot("name") works only(?) on text-annots, not link-annots which as I understand are the basement of 'named destinations'.
3) How to create 'named destinations' in PDF lib-api/JS?
Named Destinations cannot be created in JavaScript, they can only be used in JavaScript, and only if you already know the name. Please look in the Acrobat JavaScript Reference. If it's not in the referenence, then you either have to be an expert or it can't be done.
You can create destinations with a plug-in. Look in the SDK documentation for info in this.
There is a "doc.getLinks()" function. Again, look in the Acrobat JavaScript Reference. You can download it from this page:
http://www.adobe.com/devnet/acrobat/javascript.php
You can aquire the current information about the "View" with the "doc.viewState" property. Use this to find the destination rectangel.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script