PxTextAttribute Class

@interface PxTextAttribute : NSObject

One node in a recognised-text result: a page, block, paragraph, line, word, or symbol, together with the properties available at that level.

Overview

level says which node this is; the level-specific properties below are only meaningful for an attribute of the matching PxAttrLevel.

Instance Properties

NameSummary
boundingRectThe attribute’s bounding box, oriented to match the displayed image.
endPosThe attribute’s end position in the recognised text.
idThis attribute’s ID, unique throughout the scan result.
levelThe level of this attribute in the page hierarchy. See PxAttrLevel.
lineConstTermThe constant term of the line’s baseline equation (line level).
lineSlopeThe slope (multiplier) of the line’s baseline equation (line level).
lineTextAngleThe line’s incline angle, in degrees (line level).
nativeBoundingRectThe attribute’s bounding box in the image’s native coordinates.
ownerIdThe ID of this attribute’s owner (for example, the line that owns a word), or -1 if none.
pageNumRecognizedSymbolsThe number of recognised symbols on the page (page level).
pageNumUncertainSymbolsThe number of uncertainly recognised symbols on the page (page level).
pageNumberThe page number (page level).
paragraphIsLtrWhether the paragraph reads left-to-right (paragraph level).
startPosThe attribute’s start position in the recognised text.
symbolConfidenceThe symbol’s recognition confidence, as a percentage (0–100) (symbol level).
symbolNumVariantsThe number of alternative readings for this symbol (symbol level). See symbolVariant:confidence:.
wordConfidenceThe word’s recognition confidence, as a percentage (0–100) (word level).
wordDirectionThe word’s reading direction (word level).
wordFontIsBoldWhether the word’s font is bold (word level).
wordFontIsItalicWhether the word’s font is italic (word level).
wordFontNameThe word’s font name (word level).
wordFontSizeThe word’s font size (word level).
wordLanguageThe word’s detected language (word level).
wordLocaleThe word’s detected locale (word level).

Instance Methods

NameSummary
symbolVariant:Returns the text of the symbol variant at the given index.
symbolVariant:confidence:Returns the text of the symbol variant at the given index, and its confidence.

Relationships

Inherits From

  • NSObject
Top