pdfOCR 3.0.1 API
iText.Pdfocr.TextInfo Class Reference

This class describes how recognized text is positioned on the image providing bbox for each text item (could be a line or a word). More...

Public Member Functions

  TextInfo ()
  Creates a new TextInfo instance. More...
 
  TextInfo (iText.Pdfocr.TextInfo textInfo)
  Creates a new TextInfo instance from existing one. More...
 
  TextInfo (String text, Rectangle bbox)
  Creates a new TextInfo instance. More...
 
virtual String  GetText ()
  Gets text element. More...
 
virtual void  SetText (String newText)
  Sets text element. More...
 
virtual Rectangle  GetBboxRect ()
  Gets bbox coordinates. More...
 
virtual void  SetBboxRect (Rectangle bbox)
  Sets text bbox. More...
 

Detailed Description

This class describes how recognized text is positioned on the image providing bbox for each text item (could be a line or a word).

Constructor & Destructor Documentation

◆ TextInfo() [1/3]

iText.Pdfocr.TextInfo.TextInfo ( )
inline

Creates a new TextInfo instance.

◆ TextInfo() [2/3]

iText.Pdfocr.TextInfo.TextInfo ( iText.Pdfocr.TextInfo  textInfo )
inline

Creates a new TextInfo instance from existing one.

Parameters
textInfo to create from

◆ TextInfo() [3/3]

iText.Pdfocr.TextInfo.TextInfo ( String  text,
Rectangle  bbox 
)
inline

Creates a new TextInfo instance.

Parameters
text any text
bbox

iText.Kernel.Geom.Rectangle describing text bbox

Member Function Documentation

◆ GetBboxRect()

virtual Rectangle iText.Pdfocr.TextInfo.GetBboxRect ( )
inlinevirtual

Gets bbox coordinates.

Returns

iText.Kernel.Geom.Rectangle describing text bbox

◆ GetText()

virtual String iText.Pdfocr.TextInfo.GetText ( )
inlinevirtual

Gets text element.

Returns
String

◆ SetBboxRect()

virtual void iText.Pdfocr.TextInfo.SetBboxRect ( Rectangle  bbox )
inlinevirtual

Sets text bbox.

Parameters
bbox

iText.Kernel.Geom.Rectangle describing text bbox

◆ SetText()

virtual void iText.Pdfocr.TextInfo.SetText ( String  newText )
inlinevirtual

Sets text element.

Parameters
newText retrieved text