public class PageText extends java.lang.Object implements TextSelect
| Constructor and Description |
|---|
PageText() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGlyph(GlyphText sprite) |
void |
addGlyph(GlyphText glyphText,
java.util.LinkedList<OptionalContents> oCGs) |
protected void |
addOptionalPageLines(OptionalContents optionalContent,
GlyphText sprite) |
void |
addPageLines(java.util.ArrayList<LineText> pageLines)
Adds the specified pageLines to the array of pageLines.
|
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.
|
void |
clearHighlighted() |
void |
clearSelected() |
void |
deselectAll() |
java.util.ArrayList<LineText> |
getPageLines()
Creates a copy of the pageLines array and sorts that text both
vertically and horizontally to aid in the proper ordering during text
extraction.
|
java.lang.StringBuilder |
getSelected() |
void |
newLine() |
void |
newLine(java.util.LinkedList<OptionalContents> oCGs) |
void |
selectAll() |
void |
sortAndFormatText()
Takes the raw page lines represented as one continuous line and sorts the
text by the y access of the word bounds.
|
java.lang.String |
toString() |
public void newLine(java.util.LinkedList<OptionalContents> oCGs)
public void newLine()
protected void addGlyph(GlyphText sprite)
public java.util.ArrayList<LineText> getPageLines()
sortAndFormatText.
During the extraction process extra space will automatically be added
between words. However depending on how the PDF is encoded can result
in too many extra spaces. So as a result this feature can be turned off
with the system property org.icepdf.core.views.page.text.autoSpace which
is set to True by default.public void addPageLines(java.util.ArrayList<LineText> pageLines)
pageLines - page lines to add.public void addGlyph(GlyphText glyphText, java.util.LinkedList<OptionalContents> oCGs)
protected void addOptionalPageLines(OptionalContents optionalContent, GlyphText sprite)
public void applyXObjectTransform(java.awt.geom.AffineTransform transform)
transform - do matrix tranformpublic void clearSelected()
clearSelected in interface TextSelectpublic void clearHighlighted()
clearHighlighted in interface TextSelectpublic java.lang.StringBuilder getSelected()
getSelected in interface TextSelectpublic void selectAll()
selectAll in interface TextSelectpublic void deselectAll()
public java.lang.String toString()
toString in class java.lang.Objectpublic void sortAndFormatText()