Back to Devexpress

PdfMarkupAnnotationComment Class

officefileapi-devexpress-dot-pdf-ec3ba5d8.md

latest3.6 KB
Original Source

PdfMarkupAnnotationComment Class

Represents a comment added to an annotation.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public class PdfMarkupAnnotationComment
vb
Public Class PdfMarkupAnnotationComment

The following members return PdfMarkupAnnotationComment objects:

Remarks

Create a Comment

The PdfMarkupAnnotationData.AddReply method adds a comment to the annotation.

Call the PdfMarkupAnnotationComment.AddReply method to create a nested comment.

Use the PdfMarkupAnnotationComment members to change the reply’s author, subject and text.

The code sample below creates two nested comments and adds a review to the second comment (the document is opened in DevExpress WinForms PDF Viewer):

csharp
private static void AddAnnotationComments(PdfMarkupAnnotationData annotation)
{
    PdfMarkupAnnotationComment comment =
    annotation.AddReply("Reviewer", "Done");
    comment.Subject = "Proofread";

    PdfMarkupAnnotationComment nestedComment =
    comment.AddReply(annotation.Author, "Thanks");
    nestedComment.Subject = "Reviewed";
}
vb
Private Shared Sub AddAnnotationComments(ByVal annotation As PdfMarkupAnnotationData)
    Dim comment As PdfMarkupAnnotationComment = annotation.AddReply("Reviewer", "Done")
    comment.Subject = "Proofread"

    Dim nestedComment As PdfMarkupAnnotationComment = comment.AddReply(annotation.Author, "Thanks")
    nestedComment.Subject = "Reviewed"
End Sub

Access Comments

The PdfMarkupAnnotationData.Replies and PdfMarkupAnnotationComment.Replies properties obtain all comments added to an annotation or comment.

CODE

Remove Comments

Pass the comment that should be removed as the PdfMarkupAnnotationData.RemoveReply (the PdfMarkupAnnotationComment.RemoveReply for nested comments) method parameter to remove it.

CODE

Inheritance

Object PdfMarkupAnnotationComment

See Also

PdfMarkupAnnotationComment Members

DevExpress.Pdf Namespace