Print Page | Close Window

GetAnnotDest and GetActionDest cannot get the dest

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1597
Printed Date: 18 Jul 26 at 2:36PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: GetAnnotDest and GetActionDest cannot get the dest
Posted By: Jhon
Subject: GetAnnotDest and GetActionDest cannot get the dest
Date Posted: 10 Oct 10 at 5:42AM

I have some pdf files, their internal links to other page is use named distination option. I fond GetAnnotDest and GetActionDest cannot get the destid.

How can i get the DESTID?

thanks in advance for your help!




Replies:
Posted By: Rowan
Date Posted: 12 Oct 10 at 1:29PM
If the annotation is a "Link" annotation then the GetAnnotDest function is used to get the destination (the DestID). If the DestID is zero it means there is no destination only an action for that Link annotation.

So this means, if DestID is a positive number then the GetDestPage function is used to get the page that the destination points to, but if the DestID is zero then the GetAnnotIntProperty is used to get the action's page.

Another way of doing it for annotations with actions is using these functions:

GetAnnotActionID
GetActionDest
GetDestPage

In addition, for retrieving the destination zoom and location, the GetDestValue function can be used.


Posted By: Jhon
Date Posted: 12 Oct 10 at 3:50PM
Thank you for your useful amswers!
I try again, if i open the Quick PDF Library 7.22 Reference Guide.pdf, you are right.
but when i open
js_developer_guide.pdf
you can download from website:
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_developer_guide.pdf
But i still cannot get the action's page.
can you help me?
thank youvery much.





Posted By: Jhon
Date Posted: 16 Oct 10 at 3:18PM
I am waiting for help!
Any one can help me?




Posted By: Rowan
Date Posted: 20 Oct 10 at 9:39AM
If you're working with named destinations then use the GetNamedDestination function. It locates the named destination with the specified name and returns a DestID that can be used with the GetDestPage, GetDestType and GetDestValue functions.


Posted By: Jhon
Date Posted: 20 Oct 10 at 11:04AM
Thank you very much for your reply.

The key is how can I get the specified name where a certain annotation links?

I still need your help.



Posted By: gege
Date Posted: 24 Oct 10 at 6:18PM
Hello Rowan

Is there a "SetNamedDestination" to give a name to an outline link (bookmark) or an annotation?

I wish to retrieve a page in a PDF document not by the pageNumber, but by a named destination. So I have to build such a Dests outline tree :
1 0 obj
<</Type/Catalog
/Names 2 0 R
>>
endobj

2 0 obj
<</Dests 3 0 R
>>
endobj

3 0 obj
<</Names [
(intro) 15 0 R
(conclusion) 16 0 R
(contact) 17 0 R
]
>>

Is it possible (and how) to do it?

Many thanks for your reply.

Gérard



Posted By: Rowan
Date Posted: 28 Oct 10 at 4:01PM
Hi gege,

There isn't currently a SetNamedDestination function, but in the beta release that we're releasing tonight we've added some new functions that let you add named destinations to documents.

We'll post it on http://www.quickpdflibrary.com/blog/ - our blog within the next 12 hours.

Cheers,
- Rowan.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk