Print Page | Close Window

Get Javascript from Annotation

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=2418
Printed Date: 04 May 24 at 4:15PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Get Javascript from Annotation
Posted By: idolpx
Subject: Get Javascript from Annotation
Date Posted: 26 Sep 12 at 4:02AM
I'm having trouble figuring out how to get the Javascript from the Annotations in a PDF like the one in the following link.

  http://ge.tt/71ev1OO/v/0?c - http://ge.tt/71ev1OO/v/0?c

The Annotations/Links are on the part numbers.  Page 4 of the document has several.
The GetAnnotStrProperty(XXX, 101)  returns "Link" but GetAnnotStrProperty(XXX, 102) is a null string.

Any help is greatly appreciated.





Replies:
Posted By: AndrewC
Date Posted: 26 Sep 12 at 2:10PM
Retrieving the Javascript is currently not implemented.  I will see if we can add it for the next 9.12 beta release.

Andrew.


Posted By: idolpx
Date Posted: 27 Sep 12 at 5:50AM
Oh shoot... I need this right away.  How soon do you think it will be added?

Any alternative way to get this?


Posted By: AndrewC
Date Posted: 27 Sep 12 at 5:12PM
It will be released with the next beta.  If you had a source code version I might be able to release the patch to you.  We expect 9.12 beta 1 to be about a week or so away.  I can't make promises about that date though.

There are no workarounds as each AnnotStr property is stored in a different key and structure.

Andrew.


Posted By: idolpx
Date Posted: 27 Sep 12 at 10:44PM
I did buy the Source Code License years ago.  The last version of the source code I have is v6.02.
I don't believe that was an official release.  It was before Debenu bought everything.



Posted By: AndrewC
Date Posted: 17 Oct 12 at 3:48AM
Debenu PDF Library 9.12 beta 1 has just been released which has the new code.

The new beta can be downloaded from here

   http://www.debenu.com/blog/debenu-quick-pdf-library-9-12-beta-1-released.html - http://www.debenu.com/blog/debenu-quick-pdf-library-9-12-beta-1-released.html

Option 134 has been added.

    QP.SetAnnotStrProperty(1, 134, "app.alert('NEW ALERT');");

    string s = QP.GetAnnotStrProperty(1, 134);


Andrew.


Posted By: Ingo
Date Posted: 17 Oct 12 at 8:50PM
Originally posted by idolpx idolpx wrote:

I did buy the Source Code License years ago.  The last version of the source code I have is v6.02.
I don't believe that was an official release.  It was before Debenu bought everything.



Hi Jaime!

If you have a source licence then it's the last one from Kevin Newman (version 5.11?).
The version 6.02 was a modified version from the former user group working between Kevin and before Debenu ;-)
If you want the new version you should buy an update via the official pages:
http://www.quickpdflibrary.com/store/quickpdf/index.php

Cheers, Ingo




Posted By: idolpx
Date Posted: 06 Nov 12 at 11:24PM
Ok... Thanks Ingo for the info.

I'll check out the new beta release as well.


Posted By: menteith
Date Posted: 06 Dec 16 at 7:45PM
[QUOTE=AndrewC]
Debenu PDF Library 9.12 beta 1 has just been released which has the new code.

The new beta can be downloaded from here

   http://www.debenu.com/blog/debenu-quick-pdf-library-9-12-beta-1-released.html" rel="nofollow - http://www.debenu.com/blog/debenu-quick-pdf-library-9-12-beta-1-released.html

Option 134 has been added.

    QP.SetAnnotStrProperty(1, 134, "app.alert('NEW ALERT');");

    string s = QP.GetAnnotStrProperty(1, 134);


Andrew.
[/QUOTE

Yes, I know it is very old thread, but it has important information. I would like to ask how to use SetAnnotStrProperty. The following command:

                      string s = QP.GetAnnotStrProperty(1, 134);

works fine in
Debenu Quick PDF v13, even thought Option 134 is absent.
However, 
                       QP.SetAnnotStrProperty(1, 134, "app.alert('NEW ALERT');");

doesn't work at all. So, how do I change JavaScript code in annotations?



Posted By: Ingo
Date Posted: 07 Dec 16 at 9:40PM
Here you can read which tags are possible using SetAnnotStrProperty:
http://www.debenu.com/docs/pdf_library_reference/SetAnnotStrProperty.php
So it's clear that 134 won't work.
The Get-function works but without guarantee - a hidden feature ... not official.



-------------
Cheers,
Ingo



Posted By: menteith
Date Posted: 08 Dec 16 at 12:41AM
So is there an unofficial version of SetAnnotStrProperty to set JavaScript, too?


Posted By: Ingo
Date Posted: 08 Dec 16 at 5:43PM
no.



-------------
Cheers,
Ingo




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