[]
Polyline annotations display closed or open shapes with multiple edges on the page. When clicked, it displays a pop-up window containing the text of the associated note. DsPdf provides PolyLineAnnotation class to enable users to apply polyline annotations to the PDF file.

Refer to the following example code to add a polyline annotation to a PDF document:
public void CreatePolyLineAnnotation()
{
GcPdfDocument doc = new GcPdfDocument();
Page page = doc.NewPage();
RectangleF rc = new RectangleF(50, 50, 400, 40);
page.Graphics.DrawString("This sample demonstrates how you can create a polyline annotation.",
new TextFormat() { Font = StandardFonts.Times, FontSize = 14 }, rc);
//define the points of the polyline
var points = new List<PointF>();
float x = rc.Left,y=rc.Bottom;
for (int i=0 ;i<10 ;i++,x+=10)
{
points.Add(new PointF(x,y));
y = i % 2 == 0 ? y - 10 : y+10;
}
//Create an instance of PolyLineAnnotation class and set its relevant properties
var polyLineAnnot = new PolyLineAnnotation()
{
Points = points,
UserName = "Jaime Smith",
LineWidth = 2,
Color = Color.Green,
Contents = "This is a polyline annotation",
};
page.Annotations.Add(polyLineAnnot); //Add the polyline annotation to the page
doc.Save("PolyLineAnnotation.pdf");
}