|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.graphics.text.PageText
public class PageText
Page text represents the root element of a page's text hierarchy which looks something like this.
| Constructor Summary | |
|---|---|
PageText()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PageText()
| Method Detail |
|---|
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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||