We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can I add A Sticky Note Comment to a PDF & Reply

Hi There,

I reviewed the documentation and I could only find information on exporting, editing and importing yellow sticky notes annotations. I'd like to know if the following functionality is possible:

http://stackoverflow.com/questions/6523816/how-to-create-reply-to-sticky-note-annotation-in-itext

Also, I'd like to be able to programmatically select some text within the PDF and add a Sticky Note comment, and the possibility to reply like in the example above using Aspose.Pdf.Kit for .NET

I reviewed this thread but they were only interested in import & export:

http://www.aspose.com/community/forums/1/300789/consolidating-annotations-from-multiple-sources/showthread.aspx

Thanks,

Derek

Hi Derek,

We’re looking into your requirement at our end and you’ll be updated with the results the earliest possible.

We’re sorry for the inconvenience.
Regards,

Hi Derek,

You can add annotation in the PDF file using the code snippet given in this help topic. However, we’re having some problem while adding reply to the annotation. I have logged an issue as PDFNEWNET-30905 in our issue tracking system. You’ll be notified via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Hi Shahzad,


Thank you for the update.

I have successfully created a Sticky Note comment from the code snippet that you gave me.

I really need to be able to reply to an annotation, can you can give me an update as to a date or release, for when you think this functionality might be made available ?

Kind Regards,

Derek Hyland
Product Management (Aspose)

Hi Derek,

I have contacted the development team regarding the ETA of this issue. I have also increased the priority of the issue. You’ll be updated as soon as the response is received.

Regards,


Hi Shahzad,

Thanks for the update.

Kind Regards,

Derek Hyland

Product Management (Aspose)

Hi Derek,

After further investigation, we have found that there was a problem with the code for adding reply to the annotation. Here is the updated code for adding reply to the comments:


//create and add original comments

Document pdfDocument = new Document(“input.pdf”);

TextAnnotation textAnnotation = new TextAnnotation(pdfDocument.Pages[1], new Rectangle(200, 300, 300, 400));

textAnnotation.Title = “Sample Annotation Title”;

textAnnotation.Contents = “Here are some comments…”;

textAnnotation.Icon = TextIcon.Comment;

textAnnotation.Open = true;

pdfDocument.Pages[1].Annotations.Add(textAnnotation);

pdfDocument.Save(“output.pdf”);


//create and add reply to an existing annotation

pdfDocument = new Document(“output.pdf”);

TextAnnotation replyAnnotation = new TextAnnotation(pdfDocument.Pages[1], new Rectangle(200, 300, 300, 400));

replyAnnotation.Title = “Reply annotation…”;

replyAnnotation.Contents = “This is the reply to comments…”;

replyAnnotation.InReplyTo = pdfDocument.Pages[1].Annotations[1];

pdfDocument.Pages[1].Annotations.Add(replyAnnotation);

pdfDocument.Save(“Replied.pdf”);

Above code adds the original comment and saves the output file. After that, it opens an existing file and adds a reply to an existing comment. However, if you want to add both at the same time, for any reason, you can comment the following two lines:

pdfDocument.Save("output.pdf");

pdfDocument = new Document("output.pdf");



I hope this helps. If you find any further questions or need assistance, please do let us know.
Regards,