SBSDKOCRPage

@interface SBSDKOCRPage : NSObject <NSCopying>

This class summarizes the results of an optical character recognition (OCR) operation for a given page. It contains the recognized text, and arrays for each type of SBSDKOCRResultBlock, as well as the result from the page layout analysis. For convenience this immutable class conforms to NSCopying protocol.

  • The complete recognized text of the OCR operation.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *text;

    Swift

    var text: String { get }
  • An array of SBSDKOCRResultBlock objects containing all blocks of type paragraph.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSArray<SBSDKOCRResultBlock *> *paragraphs;

    Swift

    var paragraphs: [SBSDKOCRResultBlock] { get }
  • An array of SBSDKOCRResultBlock objects containing all blocks of type textline.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSArray<SBSDKOCRResultBlock *> *lines;

    Swift

    var lines: [SBSDKOCRResultBlock] { get }
  • An array of SBSDKOCRResultBlock objects containing all blocks of type word.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSArray<SBSDKOCRResultBlock *> *words;

    Swift

    var words: [SBSDKOCRResultBlock] { get }
  • The result of the page analysis that is sometimes executed before the OCR operation. can be nil.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) SBSDKPageAnalyzerResult *pageAnalyzerResult;

    Swift

    var pageAnalyzerResult: SBSDKPageAnalyzerResult? { get }
  • Convenience method to append recognized text to the receivers text. Can be used to merge results from multiple OCR operations into a single result.

    Declaration

    Objective-C

    - (void)appendRecognizedText:(nullable NSString *)text;

    Swift

    func appendRecognizedText(_ text: String?)