Back to Devexpress

PdfMarkupAnnotationFacade.AddReview(String, PdfAnnotationReviewStatus) Method

officefileapi-devexpress-dot-pdf-dot-pdfmarkupannotationfacade-dot-addreview-x28-system-dot-string-devexpress-dot-pdf-dot-pdfannotationreviewstatus-x29.md

latest3.0 KB
Original Source

PdfMarkupAnnotationFacade.AddReview(String, PdfAnnotationReviewStatus) Method

Adds a review to the annotation.

Namespace : DevExpress.Pdf

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

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public void AddReview(
    string author,
    PdfAnnotationReviewStatus reviewStatus
)
vb
Public Sub AddReview(
    author As String,
    reviewStatus As PdfAnnotationReviewStatus
)

Parameters

NameTypeDescription
authorString

The author of the review.

| | reviewStatus | PdfAnnotationReviewStatus |

The review status.

|

Example

The code sample below adds a review to the annotations from a specific author (the document is opened in the WinForms PDF Viewer):

csharp
using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
    // Load a document
    processor.LoadDocument("..\\..\\Document.pdf");

    // Access the first page properties
    PdfPageFacade pageFacade = processor.DocumentFacade.Pages[0];

    foreach(PdfMarkupAnnotationFacade markupAnnotation in pageFacade.Annotations)
    {

        // Check the annotation author
        if (markupAnnotation.Author == "Brian Zetc") 
        {

          // Add a review to the annotation
            markupAnnotation.AddReview("Cardle Anita W", PdfAnnotationReviewStatus.Accepted);
        }
    }
    // Save the result
    processor.SaveDocument("..\\..\\Result.pdf");
}
vb
Imports DevExpress.Pdf

Using processor As New PdfDocumentProcessor()
  ' Load a document
  processor.LoadDocument("..\..\Document.pdf")

  ' Access the first page properties
  Dim pageFacade As PdfPageFacade = processor.DocumentFacade.Pages(0)

  For Each markupAnnotation As PdfMarkupAnnotationFacade In pageFacade.Annotations

    ' Check the annotation author
    If markupAnnotation.Author = "Brian Zetc" Then

      ' Add a review to the annotation
      markupAnnotation.AddReview("Cardle Anita W", PdfAnnotationReviewStatus.Accepted)
    End If
  Next markupAnnotation
  ' Save the result
  processor.SaveDocument("..\..\Result.pdf")
End Using

See Also

PdfMarkupAnnotationFacade Class

PdfMarkupAnnotationFacade Members

DevExpress.Pdf Namespace