Package technology.tabula
Class TextElement
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Float
technology.tabula.Rectangle
technology.tabula.TextElement
- All Implemented Interfaces:
Shape,Serializable,Cloneable,HasText
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float -
Field Summary
Fields inherited from class technology.tabula.Rectangle
ILL_DEFINED_ORDER, VERTICAL_COMPARISON_THRESHOLDFields inherited from class java.awt.geom.Rectangle2D.Float
height, width, x, yFields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP -
Constructor Summary
ConstructorsConstructorDescriptionTextElement(float y, float x, float width, float height, org.apache.pdfbox.pdmodel.font.PDFont font, float fontSize, String c, float widthOfSpace) TextElement(float y, float x, float width, float height, org.apache.pdfbox.pdmodel.font.PDFont font, float fontSize, String c, float widthOfSpace, float dir) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatorg.apache.pdfbox.pdmodel.font.PDFontgetFont()floatgetText()getText(boolean useLineReturns) floatinthashCode()mergeWords(List<TextElement> textElements) mergeWords(List<TextElement> textElements, List<Ruling> verticalRulings) heuristically merge a list of TextElement into a list of TextChunk ported from from PDFBox's PDFTextStripper.writePage, with modifications.toString()Methods inherited from class technology.tabula.Rectangle
boundingBoxOf, compareTo, getArea, getBottom, getLeft, getPoints, getRight, getTop, horizontallyOverlaps, horizontalOverlap, isLtrDominant, merge, overlapRatio, setBottom, setLeft, setRight, setTop, verticallyOverlaps, verticalOverlap, verticalOverlapRatioMethods inherited from class java.awt.geom.Rectangle2D.Float
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, setRectMethods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, unionMethods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
Constructor Details
-
TextElement
public TextElement(float y, float x, float width, float height, org.apache.pdfbox.pdmodel.font.PDFont font, float fontSize, String c, float widthOfSpace) -
TextElement
public TextElement(float y, float x, float width, float height, org.apache.pdfbox.pdmodel.font.PDFont font, float fontSize, String c, float widthOfSpace, float dir)
-
-
Method Details
-
getText
-
getText
-
getDirection
public float getDirection() -
getWidthOfSpace
public float getWidthOfSpace() -
getFont
public org.apache.pdfbox.pdmodel.font.PDFont getFont() -
getFontSize
public float getFontSize() -
toString
-
hashCode
public int hashCode()- Overrides:
hashCodein classRectangle2D
-
equals
- Overrides:
equalsin classRectangle2D
-
mergeWords
-
mergeWords
public static List<TextChunk> mergeWords(List<TextElement> textElements, List<Ruling> verticalRulings) heuristically merge a list of TextElement into a list of TextChunk ported from from PDFBox's PDFTextStripper.writePage, with modifications. Here be dragons
-