@thegrizzlylabs/react-native-genius-scan 4.13.0 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -11
- package/android/build.gradle +2 -2
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/GSSDKCore +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/GSSDKCore +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64/GSSDKOCR.framework/GSSDKOCR +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64/GSSDKOCR.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/GSSDKOCR +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +80 -6
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/{GSKScanFlowScan.h → GSKScanFlowScanInternal.h} +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSSDKScanFlow-Swift.h +3 -3
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSSDKScanFlow.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.abi.json +83 -83
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUICameraViewController.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIDocumentGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIDocumentGeneratorProtocol.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIEditFrameViewController.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIPDFGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIPostProcessingViewController.h +2 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIStorage.h +3 -3
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUITIFFGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/en.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/hu.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/hu.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/hu.lproj/Localizable.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/pl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/pl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/pl.lproj/Localizable.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +80 -6
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/{GSKScanFlowScan.h → GSKScanFlowScanInternal.h} +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSSDKScanFlow-Swift.h +6 -6
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSSDKScanFlow.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.abi.json +83 -83
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.abi.json +83 -83
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUICameraViewController.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIDocumentGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIDocumentGeneratorProtocol.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIEditFrameViewController.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIPDFGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIPostProcessingViewController.h +2 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIStorage.h +3 -3
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUITIFFGenerator.h +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/en.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/hu.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/hu.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/hu.lproj/Localizable.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/pl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/pl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/pl.lproj/Localizable.strings +0 -0
- package/package.json +1 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/PrivateHeaders/GSKUIScanner.h +0 -82
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/PrivateHeaders/GSKUIScanner.h +0 -82
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
## Description
|
|
5
5
|
|
|
6
|
-
This React Native component allows you to access the [Genius Scan SDK](https://geniusscansdk.com) core features from a React Native application. The component relies on the
|
|
6
|
+
This React Native component allows you to access the [Genius Scan SDK](https://geniusscansdk.com) core features from a React Native application. The component relies on the ScanFlow module which provides a all-in-one scanner module with simple configurable input.
|
|
7
7
|
|
|
8
8
|
- Automatic document detection
|
|
9
9
|
- Document perspective correction
|
|
@@ -55,16 +55,8 @@ NSCameraUsageDescription - "We use the camera for <provide a good reason why you
|
|
|
55
55
|
platform :ios, '11.0'
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
#### With ReactNative 0.60 and above
|
|
59
|
-
|
|
60
58
|
Run `pod install` from the ios folder
|
|
61
59
|
|
|
62
|
-
#### With ReactNative below 0.60
|
|
63
|
-
|
|
64
|
-
Open your Xcode project file (ios/*****.xcodeproj), and:
|
|
65
|
-
- Add GSSDK.framework and GSSDKScannerUI.framework, located in `node_modules/@thegrizzlylabs/react-native-genius-scan/ios`, to your project "Embedded Libraries"
|
|
66
|
-
- Add the path `${PROJECT_DIR}/../node_modules/@thegrizzlylabs/react-native-genius-scan/ios/GSSDK` to your project "Framework Search path" (in the Build Settings)
|
|
67
|
-
|
|
68
60
|
## Usage
|
|
69
61
|
|
|
70
62
|
### Set the licence key
|
|
@@ -87,7 +79,7 @@ val result = await RNGeniusScan.scanWithConfiguration(configuration)
|
|
|
87
79
|
|
|
88
80
|
The method `scanWithConfiguration` takes a `configuration` parameter which can take the following options:
|
|
89
81
|
|
|
90
|
-
- `source`: `camera` or `
|
|
82
|
+
- `source`: `camera`, `image` or `library` (defaults to camera)
|
|
91
83
|
- `sourceImageUrl`: an absolute image url, required if `source` is `image`. Example: `file:///var/…/image.png`
|
|
92
84
|
- `multiPage`: boolean (defaults to true). If true, after a page is scanned, a prompt to scan another page will be displayed. If false, a single page will be scanned.
|
|
93
85
|
- `multiPageFormat`: `pdf`, `tiff`, `none` (defaults to `pdf`)
|
|
@@ -106,6 +98,7 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
|
|
|
106
98
|
- `ocrConfiguration`: text recognition options. Text recognition will run on a background thread for every captured image. No text recognition will be applied if this parameter is not present.
|
|
107
99
|
- `languages`: list of language codes (eg `["eng"]`) for which to run text recognition. They should match the provided language files. Note that text recognition will take longer if multiple languages are specified.
|
|
108
100
|
- `languagesDirectoryUrl`: folder containing the language files used for text recognition. Language files can be downloaded from https://github.com/tesseract-ocr/tessdata_fast.
|
|
101
|
+
- `outputFormats`: an array with the formats in which the OCR result is made available in the ScanFlow result (defaults to all formats). Possible formats are `rawText`, `hOCR` and `textLayerInPDF`.
|
|
109
102
|
|
|
110
103
|
It returns a promise with `result` object containing:
|
|
111
104
|
|
|
@@ -190,7 +183,7 @@ NB: iOS applications must be [localized in XCode by adding each language to the
|
|
|
190
183
|
Make sure that the license key is correct, that is has not expired, and that it is used with the App ID it was generated for. To learn more about the procurement and replacement of license keys, refer to the [Licensing FAQ](https://geniusscansdk.com/license/licensing).
|
|
191
184
|
|
|
192
185
|
## Troubleshooting
|
|
193
|
-
|
|
186
|
+
|
|
194
187
|
Refer to the troubleshooting guides of the native libraries to resolve common configuration and build problems:
|
|
195
188
|
|
|
196
189
|
- [iOS](https://geniusscansdk.com/docs/v4/ios/troubleshooting/)
|
package/android/build.gradle
CHANGED
|
@@ -40,6 +40,6 @@ rootProject.allprojects {
|
|
|
40
40
|
|
|
41
41
|
dependencies {
|
|
42
42
|
implementation 'com.facebook.react:react-native:+'
|
|
43
|
-
implementation 'com.geniusscansdk:gssdk-scanflow:4.
|
|
44
|
-
implementation 'com.geniusscansdk:gssdk-ocr:4.
|
|
43
|
+
implementation 'com.geniusscansdk:gssdk-scanflow:4.15.0'
|
|
44
|
+
implementation 'com.geniusscansdk:gssdk-ocr:4.15.0'
|
|
45
45
|
}
|
|
Binary file
|
|
Binary file
|
package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/GSSDKCore
CHANGED
|
Binary file
|
package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Info.plist
CHANGED
|
Binary file
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>GSSDKOCR.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
+
<string>x86_64</string>
|
|
15
16
|
</array>
|
|
16
17
|
<key>SupportedPlatform</key>
|
|
17
18
|
<string>ios</string>
|
|
19
|
+
<key>SupportedPlatformVariant</key>
|
|
20
|
+
<string>simulator</string>
|
|
18
21
|
</dict>
|
|
19
22
|
<dict>
|
|
20
23
|
<key>LibraryIdentifier</key>
|
|
21
|
-
<string>ios-
|
|
24
|
+
<string>ios-arm64</string>
|
|
22
25
|
<key>LibraryPath</key>
|
|
23
26
|
<string>GSSDKOCR.framework</string>
|
|
24
27
|
<key>SupportedArchitectures</key>
|
|
25
28
|
<array>
|
|
26
29
|
<string>arm64</string>
|
|
27
|
-
<string>x86_64</string>
|
|
28
30
|
</array>
|
|
29
31
|
<key>SupportedPlatform</key>
|
|
30
32
|
<string>ios</string>
|
|
31
|
-
<key>SupportedPlatformVariant</key>
|
|
32
|
-
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
</array>
|
|
35
35
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/GSSDKOCR
CHANGED
|
Binary file
|
package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/Info.plist
CHANGED
|
Binary file
|
|
Binary file
|
package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlow.h
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
9
|
-
#import <GSSDKOCR/GSSDKOCR.h>
|
|
10
9
|
#import <UIKit/UIKit.h>
|
|
11
10
|
|
|
12
11
|
|
|
@@ -21,8 +20,51 @@ typedef NS_ENUM(NSInteger, GSKScanFlowError) {
|
|
|
21
20
|
GSKScanFlowBadInputError = 1000,
|
|
22
21
|
};
|
|
23
22
|
|
|
23
|
+
/**
|
|
24
|
+
The various formats into which the OCR result can be made available.
|
|
25
|
+
|
|
26
|
+
This is an option set so you can combine multiple formats.
|
|
27
|
+
*/
|
|
28
|
+
typedef NS_OPTIONS(NSUInteger, GSKScanFlowOCROutputFormats) {
|
|
29
|
+
/// No output formats
|
|
30
|
+
GSKScanFlowOCROutputFormatsNone = 0,
|
|
31
|
+
/// Output OCR result as raw text
|
|
32
|
+
GSKScanFlowOCROutputFormatsRawText = 1 << 0,
|
|
33
|
+
/// Output OCR result in HOCR format
|
|
34
|
+
GSKScanFlowOCROutputFormatsHOCR = 1 << 1,
|
|
35
|
+
/// Add OCR result as a text layer in the generated PDF file (if any)
|
|
36
|
+
GSKScanFlowOCROutputFormatsTextLayerInPDF = 1 << 2,
|
|
37
|
+
/// All the output formats
|
|
38
|
+
GSKScanFlowOCROutputFormatsAll = NSUIntegerMax,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
The configuration for text recognition
|
|
43
|
+
*/
|
|
44
|
+
@interface GSKScanFlowOCRConfiguration : NSObject
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
The path to the trained data *folder* (and not file).
|
|
48
|
+
|
|
49
|
+
The folder must contain trained data files.
|
|
50
|
+
*/
|
|
51
|
+
@property (nonatomic, strong) NSString *trainedDataPath;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
The language to process OCR with.
|
|
55
|
+
|
|
56
|
+
The corresponding trained data files must be present in the folder specified by trainedDataPath.
|
|
57
|
+
*/
|
|
58
|
+
@property (nonatomic, strong) NSArray<NSString *> *languageCodes;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
The formats in which the OCR result is made available in the ScanFlow result
|
|
24
62
|
|
|
25
|
-
|
|
63
|
+
Default is everything.
|
|
64
|
+
*/
|
|
65
|
+
@property (nonatomic, assign) GSKScanFlowOCROutputFormats outputFormats;
|
|
66
|
+
|
|
67
|
+
@end
|
|
26
68
|
|
|
27
69
|
/**
|
|
28
70
|
The source for a scan flow
|
|
@@ -102,9 +144,9 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
102
144
|
};
|
|
103
145
|
|
|
104
146
|
/**
|
|
105
|
-
Enables configuration of the
|
|
147
|
+
Enables configuration of the GSKScanFlow.
|
|
106
148
|
|
|
107
|
-
Set the desired configuration on an instance of GSKScanFlowConfiguration and pass it to the initializer of
|
|
149
|
+
Set the desired configuration on an instance of GSKScanFlowConfiguration and pass it to the initializer of GSKScanFlow to build the desired scan flow.
|
|
108
150
|
*/
|
|
109
151
|
@interface GSKScanFlowConfiguration : NSObject
|
|
110
152
|
|
|
@@ -230,7 +272,39 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
230
272
|
|
|
231
273
|
Default is nil, which means no OCR is performed.
|
|
232
274
|
*/
|
|
233
|
-
@property (nonatomic, strong)
|
|
275
|
+
@property (nonatomic, strong) GSKScanFlowOCRConfiguration *ocrConfiguration;
|
|
276
|
+
|
|
277
|
+
@end
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
The result of the text recognition.
|
|
281
|
+
*/
|
|
282
|
+
@interface GSKScanFlowOCRResult: NSObject
|
|
283
|
+
|
|
284
|
+
/** The raw text recognized in the document */
|
|
285
|
+
@property (nonatomic, strong, nullable) NSString *text;
|
|
286
|
+
|
|
287
|
+
/** The text layout of the recognized text */
|
|
288
|
+
@property (nonatomic, strong, nullable) NSString *hocrTextLayout;
|
|
289
|
+
|
|
290
|
+
@end
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
A page captured by the scan flow.
|
|
294
|
+
*/
|
|
295
|
+
@interface GSKScanFlowScan : NSObject
|
|
296
|
+
|
|
297
|
+
/// The original JPEG out of the camera.
|
|
298
|
+
///
|
|
299
|
+
/// Note that this image might be rotated, and needs to be read with its EXIF orientation to be properly displayed.
|
|
300
|
+
/// UIImage's methods will properly take care of that.
|
|
301
|
+
@property (nonatomic, strong) NSString *originalFilePath;
|
|
302
|
+
|
|
303
|
+
/// The enhanced, processed, image.
|
|
304
|
+
@property (nonatomic, strong) NSString *enhancedFilePath;
|
|
305
|
+
|
|
306
|
+
/// If OCR was performed, the recognized text.
|
|
307
|
+
@property (nonatomic, strong) GSKScanFlowOCRResult *ocrResult;
|
|
234
308
|
|
|
235
309
|
@end
|
|
236
310
|
|
|
@@ -269,7 +343,7 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
269
343
|
@interface GSKScanFlow : NSObject
|
|
270
344
|
|
|
271
345
|
/**
|
|
272
|
-
Instantiates a
|
|
346
|
+
Instantiates a GSKScanFlow with the provided configuration.
|
|
273
347
|
|
|
274
348
|
@param configuration The provided configuration
|
|
275
349
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/**
|
|
16
16
|
The output result from the scan flow.
|
|
17
17
|
*/
|
|
18
|
-
@interface
|
|
18
|
+
@interface GSKScanFlowScanInternal : NSObject
|
|
19
19
|
|
|
20
20
|
- (instancetype)init NS_UNAVAILABLE;
|
|
21
21
|
- (instancetype)initWithOriginalFilePath:(NSString *)originalFilePath;
|
|
@@ -305,15 +305,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
|
|
|
305
305
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
306
306
|
@end
|
|
307
307
|
|
|
308
|
-
@class
|
|
309
|
-
@class
|
|
308
|
+
@class GSKScanFlowScanInternal;
|
|
309
|
+
@class GSKScanFlowOCRConfiguration;
|
|
310
310
|
|
|
311
311
|
SWIFT_CLASS("_TtC13GSSDKScanFlow15GSKUIOCRService")
|
|
312
312
|
@interface GSKUIOCRService : NSObject
|
|
313
313
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIOCRService * _Nonnull shared;)
|
|
314
314
|
+ (GSKUIOCRService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
|
|
315
315
|
@property (nonatomic, readonly) NSInteger pendingCount;
|
|
316
|
-
- (void)process:(
|
|
316
|
+
- (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowOCRConfiguration * _Nonnull)configuration;
|
|
317
317
|
- (void)waitForCompletion:(void (^ _Nonnull)(void))onDone;
|
|
318
318
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
319
319
|
@end
|
|
@@ -13,5 +13,5 @@ FOUNDATION_EXPORT double GSSDKScanFlowVersionNumber;
|
|
|
13
13
|
//! Project version string for GSSDKScanFlow.
|
|
14
14
|
FOUNDATION_EXPORT const unsigned char GSSDKScanFlowVersionString[];
|
|
15
15
|
|
|
16
|
-
#import <GSSDKScanFlow/GSKScanFlowScan.h>
|
|
17
16
|
#import <GSSDKScanFlow/GSKScanFlow.h>
|
|
17
|
+
#import <GSSDKScanFlow/GSKScanFlowScanInternal.h>
|