Back to Devexpress

PdfPageFacade.AddCircleAnnotation(PdfRectangle) Method

officefileapi-devexpress-dot-pdf-dot-pdfpagefacade-dot-addcircleannotation-x28-devexpress-dot-pdf-dot-pdfrectangle-x29.md

latest2.9 KB
Original Source

PdfPageFacade.AddCircleAnnotation(PdfRectangle) Method

Creates a circle annotation in the specified page rectangle.

Namespace : DevExpress.Pdf

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

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public PdfCircleAnnotationFacade AddCircleAnnotation(
    PdfRectangle rect
)
vb
Public Function AddCircleAnnotation(
    rect As PdfRectangle
) As PdfCircleAnnotationFacade

Parameters

NameTypeDescription
rectPdfRectangle

The page area to create the circle annotation.

|

Returns

TypeDescription
PdfCircleAnnotationFacade

An object that contains circle annotation properties.

|

Example

The code sample below creates a circle annotation:

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

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

    // Define an annotation area
    PdfRectangle rectangle = new PdfRectangle(663, 526, 763, 576);

    // Create a circle annotation
    PdfCircleAnnotationFacade circleAnnotation = pageFacade.AddCircleAnnotation(rectangle);

    // Specify annotation parameters
    circleAnnotation.Author = "Nancy Davolio";
    circleAnnotation.Contents = "Made in PDF Document API";

    // Save the result
    processor.SaveDocument("..\\..\\Result.pdf");
}
vb
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)

  ' Define an annotation area
  Dim rectangle As New PdfRectangle(663, 526, 763, 576)

  ' Create a circle annotation
  Dim circleAnnotation As PdfCircleAnnotationFacade = pageFacade.AddCircleAnnotation(rectangle)

  ' Specify annotation parameters
  circleAnnotation.Author = "Nancy Davolio"
  circleAnnotation.Contents = "Made in PDF Document API"

  ' Save the result
  processor.SaveDocument("..\..\Result.pdf")
End Using

See Also

PdfPageFacade Class

PdfPageFacade Members

DevExpress.Pdf Namespace