# org.pdfclown.tools.TextExtractor Class Reference

Tool for extracting text from content contexts. More...

List of all members.

## Classes
interface | IIntervalFilter
| Text filter by interval. More...
class | IntervalFilter
class | TextString
| Text string.
class | TextStringPositionComparer< T >
| Text string position comparer.
## Public Types
enum | AreaModeEnum { Containment, Intersection }
| Text-to-area matching mode. More...
## Public Member Functions
IDictionary< RectangleF?, IList< ITextString > > | Extract (Contents contents)
| Extracts text strings from the specified contents.
IDictionary< RectangleF?, IList< ITextString > > | Extract (IContentContext contentContext)
| Extracts text strings from the specified content context.
IDictionary< RectangleF?, IList< ITextString > > | Filter (IList< ITextString > textStrings, params RectangleF[] areas)
| Gets the text strings matching the specified areas.
IList< ITextString > | Filter (IList< ITextString > textStrings, RectangleF area)
| Gets the text strings matching the specified area.
IDictionary< RectangleF?, IList< ITextString > > | Filter (IDictionary< RectangleF?, IList< ITextString >> textStrings, params RectangleF[] areas)
| Gets the text strings matching the specified areas.
IList< ITextString > | Filter (IDictionary< RectangleF?, IList< ITextString >> textStrings, RectangleF area)
| Gets the text strings matching the specified area.
void | Filter (IDictionary< RectangleF?, IList< ITextString >> textStrings, IIntervalFilter filter)
| Processes the text strings matching the specified filter.
IList< ITextString > | Filter (IDictionary< RectangleF?, IList< ITextString >> textStrings, IList< Interval< int >> intervals)
| Gets the text strings matching the specified intervals.
| TextExtractor (IList< RectangleF > areas, bool sorted, bool dehyphenated)
| TextExtractor (bool sorted, bool dehyphenated)
| TextExtractor ()
## Static Public Member Functions
static string | ToString (IDictionary< RectangleF?, IList< ITextString >> textStrings, string lineSeparator, string areaSeparator)
| Converts text information into plain text.
static string | ToString (IDictionary< RectangleF?, IList< ITextString >> textStrings)
| Converts text information into plain text.
## Static Public Attributes
static readonly RectangleF | DefaultArea = new RectangleF(0,0,0,0)
## Properties
AreaModeEnum | AreaMode`[get, set]`
| Gets the text-to-area matching mode.
IList< RectangleF > | Areas`[get, set]`
| Gets the graphic areas whose text has to be extracted.
float | AreaTolerance`[get, set]`
| Gets the admitted outer area (in points) for containment matching purposes.
bool | Dehyphenated`[get, set]`
| Gets/Sets whether the text strings have to be dehyphenated.
bool | Sorted`[get, set]`
| Gets/Sets whether the text strings have to be sorted.

##

Tool for extracting text from content contexts.

## Member Enumeration Documentation

enum org::pdfclown::tools::TextExtractor::AreaModeEnum

Text-to-area matching mode.

Enumerator:

  Containment | Text string must be contained by the area.
  Intersection | Text string must intersect the area.

## Constructor & Destructor Documentation

org.pdfclown.tools.TextExtractor.TextExtractor | ( |  | ) |

org.pdfclown.tools.TextExtractor.TextExtractor | ( | bool | sorted,
|  | bool | dehyphenated |
| ) |  |  |

org.pdfclown.tools.TextExtractor.TextExtractor | ( | IList< RectangleF > | areas,
|  | bool | sorted,
|  | bool | dehyphenated |
| ) |  |  |

## Member Function Documentation

IDictionary<RectangleF?,IList<ITextString> > org.pdfclown.tools.TextExtractor.Extract | ( | Contents | contents | ) |

Extracts text strings from the specified contents.

Parameters:

  | contents | Source contents.

IDictionary<RectangleF?,IList<ITextString> > org.pdfclown.tools.TextExtractor.Extract | ( | IContentContext | contentContext | ) |

Extracts text strings from the specified content context.

Parameters:

  | contentContext | Source content context.

IDictionary<RectangleF?,IList<ITextString> > org.pdfclown.tools.TextExtractor.Filter | ( | IList< ITextString > | textStrings,
|  | params RectangleF[] | areas |
| ) |  |  |

Gets the text strings matching the specified areas.

Parameters:

  | textStrings | Text strings to filter.
  | areas | Graphic areas which text strings have to be matched to.

IList<ITextString> org.pdfclown.tools.TextExtractor.Filter | ( | IList< ITextString > | textStrings,
|  | RectangleF | area |
| ) |  |  |

Gets the text strings matching the specified area.

Parameters:

  | textStrings | Text strings to filter.
  | area | Graphic area which text strings have to be matched to.

IDictionary<RectangleF?,IList<ITextString> > org.pdfclown.tools.TextExtractor.Filter | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings,
|  | params RectangleF[] | areas |
| ) |  |  |

Gets the text strings matching the specified areas.

Parameters:

  | textStrings | Text strings to filter, grouped by source area.
  | areas | Graphic areas which text strings have to be matched to.

IList<ITextString> org.pdfclown.tools.TextExtractor.Filter | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings,
|  | RectangleF | area |
| ) |  |  |

Gets the text strings matching the specified area.

Parameters:

  | textStrings | Text strings to filter, grouped by source area.
  | area | Graphic area which text strings have to be matched to.

void org.pdfclown.tools.TextExtractor.Filter | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings,
|  | IIntervalFilter | filter |
| ) |  |  |

Processes the text strings matching the specified filter.

Parameters:

  | textStrings | Text strings to filter.
  | filter | Matching processor.

IList<ITextString> org.pdfclown.tools.TextExtractor.Filter | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings,
|  | IList< Interval< int >> | intervals |
| ) |  |  |

Gets the text strings matching the specified intervals.

Parameters:

  | textStrings | Text strings to filter.
  | intervals | Text intervals to match. They MUST be ordered and not overlapping.

Returns:
  A list of text strings corresponding to the specified intervals.

static string org.pdfclown.tools.TextExtractor.ToString | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings,
|  | string | lineSeparator,
|  | string | areaSeparator |
| ) |  |  | `[static]`

Converts text information into plain text.

Parameters:

  | textStrings | Text information to convert.
  | lineSeparator | Separator to apply on line break.
  | areaSeparator | Separator to apply on area break.

Returns:
  Plain text.

static string org.pdfclown.tools.TextExtractor.ToString | ( | IDictionary< RectangleF?, IList< ITextString >> | textStrings | ) | `[static]`

Converts text information into plain text.

Parameters:

  | textStrings | Text information to convert.

Returns:
  Plain text.

## Member Data Documentation

readonly RectangleF org.pdfclown.tools.TextExtractor.DefaultArea = new RectangleF(0,0,0,0)`[static]`

## Property Documentation

AreaModeEnum org.pdfclown.tools.TextExtractor.AreaMode`[get, set]`

Gets the text-to-area matching mode.

IList<RectangleF> org.pdfclown.tools.TextExtractor.Areas`[get, set]`

Gets the graphic areas whose text has to be extracted.

float org.pdfclown.tools.TextExtractor.AreaTolerance`[get, set]`

Gets the admitted outer area (in points) for containment matching purposes.

This measure is useful to ensure that text whose boxes overlap with the area bounds is not excluded from the match.

bool org.pdfclown.tools.TextExtractor.Dehyphenated`[get, set]`

Gets/Sets whether the text strings have to be dehyphenated.

bool org.pdfclown.tools.TextExtractor.Sorted`[get, set]`

Gets/Sets whether the text strings have to be sorted.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.