AnylineOCRModuleView Class Reference

Inherits from AnylineAbstractModuleView : UIView
Declared in AnylineOCRModuleView.h

Overview

The AnylineOcrScanView can be used to recognize text. It can be adapted to different kinds of use cases with the {@link AnylineViewConfig} (settings for the camera and UI) and the {@link AnylineOcrConfig} (settings to adapt the recognition to your use case).

  ocrScanViewPlugin

@property (nullable, nonatomic, strong) ALOCRScanViewPlugin *ocrScanViewPlugin

  ocrScanPlugin

@property (nullable, nonatomic, strong) ALOCRScanPlugin *ocrScanPlugin

  ocrConfig

Read-only property for the ALOCRConfig

@property (nullable, nonatomic, strong, readonly) ALOCRConfig *ocrConfig

Discussion

Use method setOCRConfig:error: for setting the config.

Declared In

AnylineOCRModuleView.h

– setupWithLicenseKey:delegate:ocrConfig:error:

Sets the license key and delegate.

- (BOOL)setupWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineOCRModuleDelegate> _Nonnull)delegate ocrConfig:(ALOCRConfig *_Nonnull)ocrConfig error:(NSError *_Nullable *_Nullable)error

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineOCRModuleDelegate)

ocrConfig

The ocrConfig to use for the scanning

error

The error that occured

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineOCRModuleView.h

– setupAsyncWithLicenseKey:delegate:ocrConfig:finished:

Sets the license key and delegate. Async method with return block when done.

- (void)setupAsyncWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineOCRModuleDelegate> _Nonnull)delegate ocrConfig:(ALOCRConfig *_Nonnull)ocrConfig finished:(void ( ^ _Nonnull ) ( BOOL success , NSError *_Nullable error ))finished

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineOCRModuleDelegate)

ocrConfig

The ocrConfig to use for the scanning

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

AnylineOCRModuleView.h

– setOCRConfig:error:

Sets a new ALOCRConfig and returns an Error if something failed.

- (BOOL)setOCRConfig:(ALOCRConfig *_Nonnull)ocrConfig error:(NSError *_Nullable *_Nullable)error

Parameters

ocrConfig

The ALOCRConfig to set

error

The Error object if something fails

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineOCRModuleView.h

– copyTrainedData:fileHash:error:

Use this method to copy a custom trained font data into the Anyline work environment. This method is mandatory if you want to use custom fonts.

- (BOOL)copyTrainedData:(NSString *_Nonnull)trainedDataPath fileHash:(NSString *_Nonnull)hash error:(NSError *_Nullable *_Nullable)error

Parameters

trainedDataPath

The full path to your trained data file

error

The Error object if something fails

fileHash

The hash of the traineddata file so Anyline knows when it changed.

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineOCRModuleView.h