@thegrizzlylabs/react-native-genius-scan 4.7.4 → 4.9.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.
Files changed (23) hide show
  1. package/README.md +3 -1
  2. package/android/build.gradle +4 -4
  3. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/GSSDKCore +0 -0
  4. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/Headers/GSKError.h +2 -0
  5. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/Info.plist +0 -0
  6. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/GSSDKCore +0 -0
  7. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Headers/GSKError.h +2 -0
  8. package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Info.plist +0 -0
  9. package/ios/GSSDK/GSSDKOCR.xcframework/Info.plist +5 -5
  10. package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64/GSSDKOCR.framework/GSSDKOCR +0 -0
  11. package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64/GSSDKOCR.framework/Info.plist +0 -0
  12. package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/GSSDKOCR +0 -0
  13. package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/Info.plist +0 -0
  14. package/ios/GSSDK/GSSDKScanFlow.xcframework/Info.plist +5 -5
  15. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Assets.car +0 -0
  16. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
  17. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +2 -0
  18. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Info.plist +0 -0
  19. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Assets.car +0 -0
  20. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
  21. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +2 -0
  22. package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Info.plist +0 -0
  23. package/package.json +1 -1
package/README.md CHANGED
@@ -95,7 +95,7 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
95
95
  - `pdfPageSize`: `fit`, `a4`, `letter`, defaults to fit.
96
96
  - `pdfMaxScanDimension`: max dimension in pixels when images are scaled before PDF generation, for example 2000 to fit both height and width within 2000px. Defaults to 0, which means no scaling is performed.
97
97
  - `jpegQuality`: JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
98
- - `postProcessingActions`: an array with the desired actions to display during the post processing screen (defaults to all actions). Possible actions are `rotate`, `editFilter`.
98
+ - `postProcessingActions`: an array with the desired actions to display during the post processing screen (defaults to all actions). Possible actions are `rotate`, `editFilter` and `correctDistortion`.
99
99
  - `flashButtonHidden`: boolean (default to false)
100
100
  - `defaultFlashMode`: `auto`, `on`, `off` (default to `off`)
101
101
  - `foregroundColor`: string representing a color, must start with a `#`. The color of the icons, text (defaults to '#ffffff').
@@ -114,6 +114,7 @@ It returns a promise with `result` object containing:
114
114
  - `enhancedUrl`: the cropped and enhanced file, as processed by the SDK. "file://<filepath>.{jpeg|png}"
115
115
  - `ocrResult`: the result of text recognition for this scan
116
116
  - `text`: the raw text that was recognized
117
+ - `hocrTextLayout`: the recognized text in [hOCR](https://en.wikipedia.org/wiki/HOCR) format (with position, style…)
117
118
 
118
119
  ### (Optional) Generate a PDF document from multiple pages
119
120
 
@@ -127,6 +128,7 @@ The `document` parameter is a map containing the following values:
127
128
 
128
129
  - `pages`: an array of page objects. Each page object has:
129
130
  - `imageUrl`: the URL of the image file for this page, e.g. `file://<filepath>.{jpeg|png}`
131
+ - `hocrTextLayout`: the text layout in hOCR format
130
132
 
131
133
  The `configuration` parameter provides the following options:
132
134
 
@@ -12,11 +12,11 @@ buildscript {
12
12
  apply plugin: 'com.android.library'
13
13
 
14
14
  android {
15
- compileSdkVersion 31
15
+ compileSdkVersion 33
16
16
 
17
17
  defaultConfig {
18
18
  minSdkVersion 21
19
- targetSdkVersion 31
19
+ targetSdkVersion 33
20
20
  versionCode 1
21
21
  versionName "1.0"
22
22
  }
@@ -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.7.4'
44
- implementation 'com.geniusscansdk:gssdk-ocr:4.7.4'
43
+ implementation 'com.geniusscansdk:gssdk-scanflow:4.9.0'
44
+ implementation 'com.geniusscansdk:gssdk-ocr:4.9.0'
45
45
  }
@@ -25,6 +25,8 @@ typedef NS_ENUM(NSInteger, GSKError) {
25
25
  GSKBadInputError = 1003,
26
26
  /// A file not found error
27
27
  GSKFileNotFound = 1004,
28
+ /// A memory (not storage) error
29
+ GSKMemoryError = 1005
28
30
  };
29
31
 
30
32
  FOUNDATION_EXPORT NSString * const GSKPDFErrorDomain;
@@ -25,6 +25,8 @@ typedef NS_ENUM(NSInteger, GSKError) {
25
25
  GSKBadInputError = 1003,
26
26
  /// A file not found error
27
27
  GSKFileNotFound = 1004,
28
+ /// A memory (not storage) error
29
+ GSKMemoryError = 1005
28
30
  };
29
31
 
30
32
  FOUNDATION_EXPORT NSString * const GSKPDFErrorDomain;
@@ -6,30 +6,30 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64</string>
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-arm64_x86_64-simulator</string>
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>
@@ -6,30 +6,30 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_x86_64-simulator</string>
9
+ <string>ios-arm64</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>GSSDKScanFlow.framework</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
- <string>x86_64</string>
16
15
  </array>
17
16
  <key>SupportedPlatform</key>
18
17
  <string>ios</string>
19
- <key>SupportedPlatformVariant</key>
20
- <string>simulator</string>
21
18
  </dict>
22
19
  <dict>
23
20
  <key>LibraryIdentifier</key>
24
- <string>ios-arm64</string>
21
+ <string>ios-arm64_x86_64-simulator</string>
25
22
  <key>LibraryPath</key>
26
23
  <string>GSSDKScanFlow.framework</string>
27
24
  <key>SupportedArchitectures</key>
28
25
  <array>
29
26
  <string>arm64</string>
27
+ <string>x86_64</string>
30
28
  </array>
31
29
  <key>SupportedPlatform</key>
32
30
  <string>ios</string>
31
+ <key>SupportedPlatformVariant</key>
32
+ <string>simulator</string>
33
33
  </dict>
34
34
  </array>
35
35
  <key>CFBundlePackageType</key>
@@ -62,6 +62,8 @@ typedef NS_OPTIONS(NSUInteger, GSKScanFlowPostProcessingActions) {
62
62
  GSKScanFlowPostProcessingActionEditFilter = 1 << 0,
63
63
  /// The rotate scan action
64
64
  GSKScanFlowPostProcessingActionRotate = 1 << 1,
65
+ /// The distortion (book curvature) correction
66
+ GSKScanFlowPostProcessingActionDistortionCorrection = 1 << 2,
65
67
  /// All the actions
66
68
  GSKScanFlowPostProcessingActionAll = NSUIntegerMax,
67
69
  };
@@ -62,6 +62,8 @@ typedef NS_OPTIONS(NSUInteger, GSKScanFlowPostProcessingActions) {
62
62
  GSKScanFlowPostProcessingActionEditFilter = 1 << 0,
63
63
  /// The rotate scan action
64
64
  GSKScanFlowPostProcessingActionRotate = 1 << 1,
65
+ /// The distortion (book curvature) correction
66
+ GSKScanFlowPostProcessingActionDistortionCorrection = 1 << 2,
65
67
  /// All the actions
66
68
  GSKScanFlowPostProcessingActionAll = NSUIntegerMax,
67
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegrizzlylabs/react-native-genius-scan",
3
- "version": "4.7.4",
3
+ "version": "4.9.0",
4
4
  "description": "React Native Plugin for Genius Scan SDK",
5
5
  "author": "TheGrizzlyLabs <sdk@thegrizzlylabs.com> (https://www.thegrizzlylabs.com/)",
6
6
  "homepage": "https://geniusscansdk.com",