Print Page | Close Window

How to add an 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=2362
Printed Date: 04 Apr 26 at 7:28PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to add an annotation
Posted By: PeterXie
Subject: How to add an annotation
Date Posted: 08 Aug 12 at 7:31AM
HI All,

Is there a way to create an annotation (rectangle, line, circle, etc) and add it into the PDF file?
Further, is it able to set extract information of the annotation object?
The worst, any substitution?

sample:
12 0 obj<</Rect[104.741 687.906 227.585 743.509]/NM(PURK_SIGN-0000000020)/Subtype/PURK:SignStamp430C/F 68/M(D:20120808094218+08'00')/T(Signed by: dev rc. Date: 8/8/2012 9:42 AM)/PurkinjeMetaData<</USR.USR_ID/P/PATIENT.PATIENT_PROVINCE/Qu\233bec>>/Type/Annot/AP<</N 13 0 R>>>>
endobj

Thanks!



Replies:
Posted By: AndrewC
Date Posted: 08 Aug 12 at 2:00PM

Here is a link to all of the Annotation functions available in Quick PDF Library.

AddNoteAnnotation
AddLink...

Then there are the Get and Set methods to read and write various properties.

Your PDF object below looks like part of a signature.  Object 13 is missing would be required - It would a stream object that contains the drawing commands to render the signature.

QPL currently doesn't create signature appearance streams for annotations.

Andrew.



Posted By: PeterXie
Date Posted: 09 Aug 12 at 2:38AM
Thanks to AndrewC!
AndrewC you are correct, I just want to simulate a sign action, could be normal annotation, stamps annotation or real signature. I even tried DrawBox and DrawTextBox, but no way to put extra info.

I saw the Annotation functions and tried AddNoteAnnotation and AddTextMarkupAnnotation, they worked fine, so did GetAnnotIntProperty; but I do not know how to add a rectangle annotation and put some extra invisible data.

Actually the use case is:
1. user drags the mouse to select a rectangle area in the PDF reader
2. the system adds a rectangle annotation at the same position with several lines of visible info to describe the action, such as (Signed by: dev rc. Date: 8/8/2012 9:42 AM)
3. the system puts some other extra info for the annotation to snapshot the context, such as PurkinjeMetaData<</USR.USR_ID/P/PATIENT.PATIENT_PROVINCE/Qu\233bec>>

the sample I provided at the beginning was done with Acrobat, here is the object 13
13 0 obj<</Subtype/Form/Length 157/Filter/FlateDecode/Resources<</Font 14 0 R>>/Type/XObject/BBox[0 0 190 86]/FormType 1>>stream
H‰DMË‚0ü•9êú°béMz0¾ œ‰B5šhïZ#ìd7“Ùœð›Õ
DÈ}ÿIб^ëÝ"¢…Âëëï:[ÐK‚ÖÐ
­Ã;rÏ,ضȖå|³¶e–æ£0–t¯`cÂa òóéæjÞµ{¢­†°Š Däõdÿpši&¹ˆ’˜®¼)µ”Dø0ÚK0ð
endstream
endobj

Any good ideas?


Posted By: prasenjit
Date Posted: 02 Feb 15 at 12:29PM
Anybody can help me to create a rectangle annotation???



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