Class DefaultPdfTextLocation

java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.listener.DefaultPdfTextLocation
All Implemented Interfaces:
IPdfTextLocation

public class DefaultPdfTextLocation extends Object implements IPdfTextLocation
This class acts as a default implementation of IPdfTextLocation
  • Field Details

  • Constructor Details

    • DefaultPdfTextLocation

      public DefaultPdfTextLocation(Rectangle rect, String text)
      Creates new pdf text location.
      Parameters:
      rect - text rectangle on pdf canvas
      text - actual text on designated area of canvas
  • Method Details

    • getRectangle

      public Rectangle getRectangle()
      Specified by:
      getRectangle in interface IPdfTextLocation
      Returns:
      the visual Rectangle in which the text is located
    • setRectangle

      public DefaultPdfTextLocation setRectangle(Rectangle rectangle)
      Sets text rectangle (occupied area) for this pdf text location.
      Parameters:
      rectangle - new text rectangle
      Returns:
      this DefaultPdfTextLocation instance
    • getText

      public String getText()
      Specified by:
      getText in interface IPdfTextLocation
      Returns:
      the text
    • setText

      public DefaultPdfTextLocation setText(String text)
      Sets text for this pdf text location.
      Parameters:
      text - new text
      Returns:
      this DefaultPdfTextLocation instance