How To Add Polyline Annotation To PDF Documents Using PDF Mosaic .NET

This sample shows how to add polyline annotation to your PDF document.

Use PDFPolylineAnnotation class to add polyline annotation.

Polyline Annotation


PDFDocument pdf = new PDFDocument();
pdf.Pages.Add(new PDFPage(PDFPaperFormat.A4));
PDFPointsArray points = new PDFPointsArray();
points.AddPoint(new Point(150, 275));
points.AddPoint(new Point(250, 150));
points.AddPoint(new Point(350, 275));
points.AddPoint(new Point(125, 200));
points.AddPoint(new Point(375, 200));
points.AddPoint(new Point(150, 275));
PDFPolylineAnnotation annot = new PDFPolylineAnnotation(points);
annot.Contents = "Polyline annotations...";

pdf.Save("TestPolylineAnnotation.pdf", true);