Print Page | Close Window

Setting name of 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=2231
Printed Date: 13 Jul 25 at 11:46PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Setting name of annotation?
Posted By: cscooper
Subject: Setting name of annotation?
Date Posted: 13 Apr 12 at 2:55PM
I can query the name of an annotation with GetAnnotStrProperty(103) but it's always empty, and calling SetAnnotStrProperty(103) doesn't work (it returns zero and the annotation name is unchanged0.

Is this just a shortcoming of the library, or am I missing something?

Thanks!
Chris

p.s. I have the same question about setting the author name for an annotation (which is not the same as setting the author of the document) and the 'lock' property as well ...

[QuickPDF library version 8.14]
[64-bit Windows 7, C# in Visual Studio 2010]




Replies:
Posted By: AndrewC
Date Posted: 16 Apr 12 at 12:44PM
I have checked a few PDF's with annotations and not all annotations have a name and many of them don't have a name that is not meaningful.

Can you post a link to a PDF that you are trying to extract names from and I can tell you what is going on.

Andrew.


Posted By: cscooper
Date Posted: 16 Apr 12 at 1:15PM
Thanks for looking into this Andrew, this for an annotation that I am creating.

I call AddTextMarkupAnnotation() to create an annotation, and then in order to access that annotation from JavaScript I need to give it a name.  There's a JavaScript function "doc.getAnnot()" that takes the annotation name as its argument and returns the Annot object - so the name doesn't have to make any sense to us humans as long as it's unique.

For this same annotation that I am creating, I would like to set the 'author' property because Adobe Reader displays the popup for this annotation as a box split into two sections; the bottom section is the contents I specify with the SetAnnotContents() function so that's good, but the top section is for the author's name and it's always empty since I have no way to set it with QuickPDF.

Finally, when the user views this annotation I've created, it's too easy for them to accidentally modify the text in the popup box, so I'd like to set the 'locked' property.

Thanks!
Chris




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