Show / Hide Table of Contents

Class TextExtractor.Word

TextExtractor.Word object represents a word on a PDF page. Each word contains a sequence of characters in one or more styles (see TextExtractor.Style).

Inheritance
System.Object
TextExtractor.Word
Namespace: pdftron.PDF
Assembly: PDFNetAndroid.dll
Syntax
public class Word : IDisposable

Constructors

Word()

Declaration
public Word()

Methods

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Equals(Object)

Checks whether this Word object is the same as the opject specified.

Declaration
public override bool Equals(Object o)
Parameters
Type Name Description
Object o

specified object

Returns
Type Description
System.Boolean

true if equals to the specified object

Finalize()

Releases all resources used by the Word

Declaration
protected void Finalize()

GetBBox()

Gets the b box.

Declaration
public Rect GetBBox()
Returns
Type Description
Rect

The bounding box for this word (in unrotated page coordinates).

Remarks

To account for the effect of page '/Rotate' attribute, transform all points using page.GetDefaultMatrix().

GetCharStyle(Int32)

Gets the char style.

Declaration
public TextExtractor.Style GetCharStyle(Int32 char_idx)
Parameters
Type Name Description
Int32 char_idx

The index of a character in this word.

Returns
Type Description
TextExtractor.Style

The style associated with a given character.

GetCurrentNum()

Gets the index of this word of the current line. A word that starts the line will return 0, whereas the last word in the line will return (line.GetNumWords()-1).

Declaration
public Int32 GetCurrentNum()
Returns
Type Description
Int32

the index of this word of the current line

GetGlyphQuad(Int32)

Gets the glyph from index

Declaration
public double[] GetGlyphQuad(Int32 glyph_idx)
Parameters
Type Name Description
Int32 glyph_idx

The index of a glyph in this word.

Returns
Type Description
System.Double[]

The quadrilateral representing a tight bounding box for a given glyph in the word (in unrotated page coordinates).

GetNextWord()

Gets the next object

Declaration
public TextExtractor.Word GetNextWord()
Returns
Type Description
TextExtractor.Word

the next object

GetNumGlyphs()

Gets the num glyphs.

Declaration
public Int32 GetNumGlyphs()
Returns
Type Description
Int32

The number of glyphs in this word.

GetQuad()

return The quadrilateral representing a tight bounding box for this word (in unrotated page coordinates).

Declaration
public double[] GetQuad()
Returns
Type Description
System.Double[]

the quad

GetString()

Gets Unicode string

Declaration
public String GetString()
Returns
Type Description
String

the content of this word represented as a Unicode string.

GetStringLen()

Gets the number of chars in the string.

Declaration
public Int32 GetStringLen()
Returns
Type Description
Int32

the number of characters in this word.

GetStyle()

Gets predominant style for this word.

Declaration
public TextExtractor.Style GetStyle()
Returns
Type Description
TextExtractor.Style

the style

IsValid()

Checks if valid word

Declaration
public bool IsValid()
Returns
Type Description
System.Boolean

true if this is a valid word, false otherwise.

op_Assign(TextExtractor.Word)

Assignment operator

Declaration
public TextExtractor.Word op_Assign(TextExtractor.Word r)
Parameters
Type Name Description
TextExtractor.Word r

a given Word object

Returns
Type Description
TextExtractor.Word

Word object equals to the given Word object

Set(TextExtractor.Word)

Sets value to given Word object

Declaration
public void Set(TextExtractor.Word r)
Parameters
Type Name Description
TextExtractor.Word r

a given Word object

Operators

Equality(TextExtractor.Word, TextExtractor.Word)

Equality operator check whether two Word objects are the same.

Declaration
public static Boolean operator ==(TextExtractor.Word l, TextExtractor.Word r)
Parameters
Type Name Description
TextExtractor.Word l

Word object at the left of the operator

TextExtractor.Word r

Word object at the right of the operator

Returns
Type Description
Boolean

true if both Word objects are equal, false otherwise

Inequality(TextExtractor.Word, TextExtractor.Word)

Inequality operator check whether two Word objects are different.

Declaration
public static Boolean operator !=(TextExtractor.Word l, TextExtractor.Word r)
Parameters
Type Name Description
TextExtractor.Word l

Word object at the left of the operator

TextExtractor.Word r

Word object at the right of the operator

Returns
Type Description
Boolean

true if both Word object are not equal, false otherwise

In This Article
Back to top Generated by DocFX