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, isAtRectpublic 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 PDFPageElementpublic void setCharBoundingRectsWithCharSpaceList(ArrayList charBoundingRectsWithCharSpaceList)
charBoundingRectsWithCharSpaceList - bounding boxes for the characters