public class PdfPageTextElement extends PdfPageElement
PdfProDocument.getPageElements(int, int)
ELEMENT_TYPE_ALL, ELEMENT_TYPE_COMPOSITE, ELEMENT_TYPE_IMAGE, ELEMENT_TYPE_INLINE_IMAGE, ELEMENT_TYPE_PATH, ELEMENT_TYPE_TEXT
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getBoundingRectForCharAt(int index)
Returns bounding box of specified character in the text element.
|
ArrayList |
getCharBoundingRects()
Returns list of bounding boxes of characters in the text element.
|
float |
getFontSize()
Returns font size of the text element.
|
float |
getScaledFontSize() |
String |
getText()
Returns actual text represented by the text element.
|
PdfTextFontInfo |
getTextFontInfo()
Returns information related to the font used by the text element.
|
PdfTextState |
getTextState()
Returns information related to the text and font used by the text
element.
|
boolean |
isTextRotated()
Returns whether the text element is rotated.
|
void |
setCharBoundingRectsWithCharSpaceList(ArrayList charBoundingRectsWithCharSpaceList)
Specifies bounding boxes for characters in the text represented by the
text elements.
|
String |
toString() |
getBoundingRect, getElementType, getFillColor, getGraphicsState, getPageNum, getStrokeColor, getTransformationMatrix, getX, getY, isAtPoint, isAtRect
public String getText()
public ArrayList getCharBoundingRects()
public PdfTextFontInfo getTextFontInfo()
public float getFontSize()
public float getScaledFontSize()
public PdfTextState getTextState()
public Rectangle2D getBoundingRectForCharAt(int index)
index
- index of the character in the text elementpublic boolean isTextRotated()
public String toString()
toString
in class PdfPageElement
public void setCharBoundingRectsWithCharSpaceList(ArrayList charBoundingRectsWithCharSpaceList)
charBoundingRectsWithCharSpaceList
- bounding boxes for the characters