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(int pageNr, Rectangle rect, java.lang.String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPageNumber()
Get the page number of the page on which the text is locatedRectangle
getRectangle()
java.lang.String
getText()
DefaultPdfTextLocation
setPageNr(int pageNr)
DefaultPdfTextLocation
setRectangle(Rectangle rectangle)
DefaultPdfTextLocation
setText(java.lang.String text)
-
-
-
Field Detail
-
pageNr
private int pageNr
-
rectangle
private Rectangle rectangle
-
text
private java.lang.String text
-
-
Constructor Detail
-
DefaultPdfTextLocation
public DefaultPdfTextLocation(int pageNr, Rectangle rect, java.lang.String text)
-
-
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)
-
getText
public java.lang.String getText()
- Specified by:
getText
in interfaceIPdfTextLocation
- Returns:
- the text
-
setText
public DefaultPdfTextLocation setText(java.lang.String text)
-
getPageNumber
public int getPageNumber()
Description copied from interface:IPdfTextLocation
Get the page number of the page on which the text is located- Specified by:
getPageNumber
in interfaceIPdfTextLocation
- Returns:
- the page number, or 0 if no page number was set
-
setPageNr
public DefaultPdfTextLocation setPageNr(int pageNr)
-
-