Class FieldPositioningEvents

java.lang.Object
com.lowagie.text.pdf.PdfPageEventHelper
com.lowagie.text.pdf.events.FieldPositioningEvents
All Implemented Interfaces:
PdfPageEvent, PdfPCellEvent

public class FieldPositioningEvents extends PdfPageEventHelper implements PdfPCellEvent
Class that can be used to position AcroForm fields.
  • Field Details

    • padding

      public float padding
      Some extra padding that will be taken into account when defining the widget.
    • genericChunkFields

      protected Map<String,PdfFormField> genericChunkFields
      Keeps a map with fields that are to be positioned in inGenericTag.
    • cellField

      protected PdfFormField cellField
      Keeps the form field that is to be positioned in a cellLayout event.
    • fieldWriter

      protected PdfWriter fieldWriter
      The PdfWriter to use when a field has to added in a cell event.
    • parent

      protected PdfFormField parent
      The PdfFormField that is the parent of the field added in a cell event.
  • Constructor Details

    • FieldPositioningEvents

      public FieldPositioningEvents()
      Creates a new event. This constructor will be used if you need to position fields with Chunk objects.
    • FieldPositioningEvents

      public FieldPositioningEvents(PdfWriter writer, PdfFormField field)
      Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
      Parameters:
      writer - The PdfWriter
      field - The field to label the Event
    • FieldPositioningEvents

      public FieldPositioningEvents(PdfFormField parent, PdfFormField field)
      Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
      Parameters:
      parent - The parent of the Event
      field - The field to label the Event
    • FieldPositioningEvents

      public FieldPositioningEvents(PdfWriter writer, String text) throws IOException, DocumentException
      Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
      Parameters:
      writer - The PdfWriter
      text - The text to label the TextField
      Throws:
      DocumentException - thrown when an error occurs in a Document
      IOException - throw when an I/O operation fails
    • FieldPositioningEvents

      public FieldPositioningEvents(PdfWriter writer, PdfFormField parent, String text) throws IOException, DocumentException
      Creates a new event. This constructor will be used if you need to position fields with a Cell Event.
      Parameters:
      writer - The PdfWriter
      parent - The parent of the new event
      text - The label of the event
      Throws:
      DocumentException - thrown when an error occurs in a Document
      IOException - throw when an I/O operation fails
  • Method Details