Skip to main content
All docs
V26.1
  • CircleAnnotation Class

    A round annotation in PDF files.

    Namespace: DevExpress.Docs.Pdf

    Assembly: DevExpress.Docs.Pdf.v26.1.dll

    Declaration

    public class CircleAnnotation :
        ShapeAnnotation

    Example

    How to: Create a Circle Annotation

    The following code snippet creates two annotations - circle and ink:

    DevExpress PDF Document API - Create Drawing Annotations

    FileStream fs = File.OpenRead("Demo.pdf");
    var options = new LoadOptions();
    PdfDocument document = new PdfDocument(fs, options);
    
    List<TextSearchInfo> results = document.FindText("Type 3 Fonts").ToList();
    
    foreach (var match in results.SelectMany(x => x.Matches)) {
        var rects = match.MatchFragments
            .Select(x => x.Rectangle)
            .ToList();
        foreach (var rect in rects) {
            CircleAnnotation circleAnnotation = new CircleAnnotation(rect.BoundingBox)
            {
                Color = PdfColor.Red,
                Title = "Brian Zetc",
                Content = "This is a circle annotation."
            };
            document.Pages[match.PageIndex].Annotations.Add(circleAnnotation);
        }
    
    }
    document.Save(new FileStream("Demo2.pdf", FileMode.Create, FileAccess.Write));
    

    Implements

    See Also