com.spire.pdf.texts
Class PdfTextFragment

java.lang.Object
  extended by com.spire.pdf.texts.PdfTextFragment

public class PdfTextFragment
extends java.lang.Object

The class representing a result of searching designated text from PDF page.


Constructor Summary
PdfTextFragment()
           
 
Method Summary
 void applyRecoverString(java.lang.String newvalue, java.awt.Color backColor, boolean unicode)
          Overlays the old text with the sppecified color and draws the new text.
 java.awt.geom.Rectangle2D[] getBounds()
          Gets the bounds of the text.
 java.lang.String getLineText()
          Gets all the text of the line where covers the target text.
 PdfPageBase getPage()
          Gets page which is including the searched text of this Spire.Pdf.PdfPageBase structure.
 java.awt.geom.Point2D[] getPositions()
          Gets the position of the searched text.
 java.awt.geom.Dimension2D[] getSizes()
          Gets the size of the searched text.
 java.lang.String getText()
          Gets the text.
 PdfTextState[] getTextStates()
          Gets the text states.
 void highLight()
          Hight light of the seached text
 void highLight(java.awt.Color color)
          Hight light of the target text
 

Constructor Detail

PdfTextFragment

public PdfTextFragment()
Method Detail

getTextStates

public PdfTextState[] getTextStates()
Gets the text states. Each element represents the state of a text segment.


getText

public java.lang.String getText()
Gets the text.


getLineText

public java.lang.String getLineText()
Gets all the text of the line where covers the target text.


getPage

public PdfPageBase getPage()
Gets page which is including the searched text of this Spire.Pdf.PdfPageBase structure.


getPositions

public java.awt.geom.Point2D[] getPositions()
Gets the position of the searched text.


getSizes

public java.awt.geom.Dimension2D[] getSizes()
Gets the size of the searched text.


getBounds

public java.awt.geom.Rectangle2D[] getBounds()
Gets the bounds of the text.


highLight

public void highLight()
Hight light of the seached text


highLight

public void highLight(java.awt.Color color)
Hight light of the target text

Parameters:
color - The highlight color.

applyRecoverString

public void applyRecoverString(java.lang.String newvalue,
                               java.awt.Color backColor,
                               boolean unicode)
Overlays the old text with the sppecified color and draws the new text.

Parameters:
newvalue - The new text.
backColor - The background color.
unicode - Unicode encoding flag.