public static PdfAnnotation CreateLine(PdfWriter writer, Rectangle rect, string contents, float x1, float y1, float x2, float y2)
{
PdfAnnotation annot = new PdfAnnotation(writer, rect);
annot.Put(PdfName.SUBTYPE, PdfName.LINE);
annot.Put(PdfName.CONTENTS, new PdfString(contents, PdfObject.TEXT_UNICODE));
PdfArray array = new PdfArray(new PdfNumber(x1));
array.Add(new PdfNumber(y1));
array.Add(new PdfNumber(x2));
array.Add(new PdfNumber(y2));
annot.Put(PdfName.L, array);
return annot;
}