How can I extract attributes (e.g. position, font) for a given character in a word using the TextExtractor?

Q: How can I determine information about a new line (\n) using the
TextExtractor?

Also how can I extract information (e.g. position, attributes) for a
given character in a word using the TextExtractor?
------
A: In case you would like to determine where to insert the new line
character (\n), you can add the new line character at the end of each
line:

TextExtractor.Word word;
for (TextExtractor.Line line = txt.GetFirstLine(); line.IsValid();
line=line.GetNextLine()) {
for (word=line.GetFirstWord(); word.IsValid();
word=word.GetNextWord()) {
   cout << word.GetString() ...;
}
  cout << "\n"; // output a new line character to start a new line.
}

You can obtain glyph specific information from TextExtractor::Word
(http://www.pdftron.com/net/html/
classpdftron_1_1PDF_1_1TextExtractor_1_1Word.html).

For example, to obtain a number of glyphs in a word use
word.GetNumGlyphs(). To obtain a bounding box (actuall a
quadrilateral) for a given glyph index use word.GetGlyphQuad(idx). To
obtain style information (e.g. font, color, size) for a given glyph
index use word.GetCharStyle (idx).