Class DefaultPdfTextLocation
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.parser.listener.DefaultPdfTextLocation
-
- All Implemented Interfaces:
IPdfTextLocation
public class DefaultPdfTextLocation extends java.lang.Object implements IPdfTextLocation
This class acts as a default implementation of IPdfTextLocation
-
-
Constructor Summary
Constructors Constructor Description DefaultPdfTextLocation(Rectangle rect, java.lang.String text)
Creates new pdf text location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rectangle
getRectangle()
java.lang.String
getText()
DefaultPdfTextLocation
setRectangle(Rectangle rectangle)
Sets text rectangle (occupied area) for this pdf text location.DefaultPdfTextLocation
setText(java.lang.String text)
Sets text for this pdf text location.
-
-
-
Field Detail
-
rectangle
private Rectangle rectangle
-
text
private java.lang.String text
-
-
Constructor Detail
-
DefaultPdfTextLocation
public DefaultPdfTextLocation(Rectangle rect, java.lang.String text)
Creates new pdf text location.- Parameters:
rect
- text rectangle on pdf canvastext
- actual text on designated area of canvas
-
-
Method Detail
-
getRectangle
public Rectangle getRectangle()
- Specified by:
getRectangle
in interfaceIPdfTextLocation
- 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 java.lang.String getText()
- Specified by:
getText
in interfaceIPdfTextLocation
- Returns:
- the text
-
setText
public DefaultPdfTextLocation setText(java.lang.String text)
Sets text for this pdf text location.- Parameters:
text
- new text- Returns:
- this
DefaultPdfTextLocation
instance
-
-