New to Telerik Document ProcessingStart a free 30-day trial

Line Annotation

Updated on Jun 3, 2026

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 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 displayed for the annotation.
ColorGets or sets the color of the annotation.
ContentGets the source defining the visual content of the annotation. This content has higher priority compared to the annotation appearance characteristics and text properties and is visualized by default when opening the exported document in a 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 a starting point at the current position of the editor and an end point at the current position 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