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,
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 = new Document("output.pdf");
I hope this helps. If you find any further questions or need assistance, please do let us know.
Regards,