org.icepdf.core.pobjects.graphics.text
Class PageText
java.lang.Object
org.icepdf.core.pobjects.graphics.text.PageText
- All Implemented Interfaces:
- TextSelect
public class PageText
- extends java.lang.Object
- implements TextSelect
Page text represents the root element of a page's text hierarchy which
looks something like this.
PageText -> LineText* -> WordText* -> GlyphText*
The hierarchy elements are build by the content parser when text extraction
is enabled. It is build to seperate the huristics used to calculate
word and line detection which is used for text extraction/search,
search highlighting and text highlighting.
It very important to note that all coordinates system represented in this
hierarchy of object has been normalized to the page space. This allows for
object to be sorted and drawn. Also this structure is not used for page
layout and painting. It is is used for painting text selectin via UI input
or search. The seperation is needed so that the text represented in Page
text can be padded and sorted to aid in text extraction readability.
- Since:
- 4.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PageText
public PageText()
newLine
public void newLine()
addGlyph
public void addGlyph(GlyphText sprite)
getPageLines
public java.util.ArrayList<LineText> getPageLines()
applyXObjectTransform
public void applyXObjectTransform(java.awt.geom.AffineTransform transform)
- Utility method to normalize text created in a Xform content stream
and is only called from the contentParser when parsing 'Do' token.
- Parameters:
transform - do matrix tranform
clearSelected
public void clearSelected()
- Specified by:
clearSelected in interface TextSelect
clearHighlighted
public void clearHighlighted()
- Specified by:
clearHighlighted in interface TextSelect
getSelected
public java.lang.StringBuilder getSelected()
- Specified by:
getSelected in interface TextSelect
selectAll
public void selectAll()
- Specified by:
selectAll in interface TextSelect
deselectAll
public void deselectAll()
dispose
public void dispose()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object