/** Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
 * @throws DocumentException
 * @throws IOException*/
 public FieldPositioningEvents(PdfWriter writer, PdfFormField parent, String text)
 {
     this.parent = parent;
     TextField tf = new TextField(writer, new Rectangle(0, 0), text);
     tf.FontSize = 14;
     cellField = tf.GetTextField();
 }
 /**
 * @see com.lowagie.text.pdf.PdfPageEvent#onGenericTag(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document, com.lowagie.text.Rectangle, java.lang.String)
 */
 public override void OnGenericTag(PdfWriter writer, Document document,
         Rectangle rect, String text)
 {
     rect.Bottom = rect.Bottom - 3;
     PdfFormField field = (PdfFormField) genericChunkFields[text];
     if (field == null) {
         TextField tf = new TextField(writer, new Rectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)), text);
         tf.FontSize = 14;
         field = tf.GetTextField();
     }
     else {
         field.Put(PdfName.RECT,  new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)));
     }
     if (parent == null)
         writer.AddAnnotation(field);
     else
         parent.AddKid(field);
 }
 /** Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
 * @throws DocumentException
 * @throws IOException*/
 public FieldPositioningEvents(PdfWriter writer, String text)
 {
     this.fieldWriter = writer;
     TextField tf = new TextField(writer, new Rectangle(0, 0), text);
     tf.FontSize = 14;
     cellField = tf.GetTextField();
 }