New to Telerik Document ProcessingStart a free 30-day trial

Line Annotation

Updated on Oct 6, 2025

A Line annotation displays a single straight line on the page. When opened, it displays a pop-up window containing the text of the associated note.

The LineAnnotation class is a derivative of the MarkupAnnotation (descendent of ContentAnnotation) and it exposes the following properties:

PropertyDescription
StartGets or sets the starting point of the annotation.
EndGets or sets the ending point of the annotation.
StartLineEndingTypeGets or sets the line ending type for the start of the line.
EndLineEndingTypeGets or sets the line ending type for the end of the line.
OpacityGets or sets the opacity of the annotation.
ContentsGets or sets the text that shall be displayed for the annotation.
ColorGets or sets the color of the annotation.
ContentGets the source defining the visual content of the annotation. This content is with bigger priority compared to the annotation appearance characteristics and text properties and it is visualized by default when opening the exported document in some PDF viewer.

Creating a LineAnnotation

c#
RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();

LineAnnotation annotation = page.Annotations.AddLine(new Point(50, 50), new Point(300, 300));
annotation.StartLineEndingType = LineEndingType.None;
annotation.EndLineEndingType = LineEndingType.OpenArrow;
annotation.Color = new RgbColor(255, 0, 0); //Default RgbColor(255, 255, 255)
annotation.Contents = "This is a LineAnnotation";
annotation.Opacity = 0.5;

Create LineAnnotation

Creating a LineAnnotation with FixedContentEditor

The FixedContentEditor offers the public DrawLineAnnotation method which creates a new LineAnnotation with starting point the current point of the editor and end point the current point of the editor plus the given distances.

c#
RadFixedDocument fixedDocument = new RadFixedDocument();
FixedContentEditor editor = new FixedContentEditor(fixedDocument.Pages.AddPage());

editor.Position.Translate(50, 50);
editor.DrawText("Line starts here.");
editor.DrawLineAnnotation(100, 200);

Create LineAnnotation with FixedContentEditor

See Also