@regulaforensics/cordova-plugin-document-reader-api 6.4.0 → 6.6.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.
@@ -305,6 +305,8 @@
305
305
  [expectedPass addObject:str];
306
306
  image.expectedPass = expectedPass;
307
307
  }
308
+ if([dict valueForKey:@"documentPositionIndent"] != nil)
309
+ image.documentPositionIndent = [dict valueForKey:@"documentPositionIndent"];
308
310
 
309
311
  return image;
310
312
  }
@@ -320,6 +322,7 @@
320
322
  result[@"colornessCheck"] = input.colornessCheck;
321
323
  result[@"moireCheck"] = input.moireCheck;
322
324
  result[@"expectedPass"] = input.expectedPass;
325
+ result[@"documentPositionIndent"] = input.documentPositionIndent;
323
326
 
324
327
  return result;
325
328
  }
@@ -447,6 +450,37 @@
447
450
  return group;
448
451
  }
449
452
 
453
+ +(RGLOnlineProcessingConfig*)RGLOnlineProcessingConfigFromJSON:(NSDictionary*)dict {
454
+ if([dict valueForKey:@"mode"] == nil) return nil;
455
+
456
+ RGLOnlineProcessingConfig *result = [[RGLOnlineProcessingConfig alloc] initWithMode:[[dict valueForKey:@"mode"] integerValue]];
457
+
458
+ if([dict valueForKey:@"imageFormat"] != nil)
459
+ result.imageFormat = [[dict valueForKey:@"imageFormat"] integerValue];
460
+ if([dict valueForKey:@"url"] != nil)
461
+ result.serviceURL = [dict valueForKey:@"url"];
462
+ if([dict valueForKey:@"imageCompressionQuality"] != nil)
463
+ result.imageCompressionQuality = [[dict valueForKey:@"imageCompressionQuality"] floatValue];
464
+ if([dict valueForKey:@"processParams"] != nil) {
465
+ RGLProcessParams *params = [RGLProcessParams new];
466
+ [self setProcessParams:[dict valueForKey:@"processParams"] :params];
467
+ result.processParams = params;
468
+ }
469
+
470
+ return result;
471
+ }
472
+
473
+ +(RGLReprocParams*)RGLReprocParamsFromJSON:(NSDictionary*)dict {
474
+ RGLReprocParams *result = [RGLReprocParams new];
475
+
476
+ if([dict valueForKey:@"serviceUrl"] != nil)
477
+ result.serviceURL = [dict valueForKey:@"serviceUrl"];
478
+ if([dict valueForKey:@"failIfNoService"] != nil)
479
+ result.failIfNoService = [dict valueForKey:@"failIfNoService"];
480
+
481
+ return result;
482
+ }
483
+
450
484
  +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization {
451
485
  if([options valueForKey:@"cameraFrameBorderWidth"] != nil)
452
486
  customization.cameraFrameBorderWidth = [[options valueForKey:@"cameraFrameBorderWidth"] floatValue];
@@ -590,12 +624,8 @@
590
624
  functionality.singleResult = [[options valueForKey:@"singleResult"] boolValue];
591
625
  if([options valueForKey:@"cameraPosition"] != nil)
592
626
  functionality.cameraPosition = [self AVCaptureDevicePositionWithNSInteger:[[options valueForKey:@"cameraPosition"] integerValue]];
593
- if([options valueForKey:@"onlineMode"] != nil)
594
- functionality.onlineMode = [[options valueForKey:@"onlineMode"] boolValue];
595
- if([options valueForKey:@"serviceURL"] != nil)
596
- functionality.serviceURL = [[options valueForKey:@"serviceURL"] stringValue];
597
627
  if([options valueForKey:@"btDeviceName"] != nil)
598
- functionality.btDeviceName = [[options valueForKey:@"btDeviceName"] stringValue];
628
+ functionality.btDeviceName = [options valueForKey:@"btDeviceName"];
599
629
  if([options valueForKey:@"useAuthenticator"] != nil)
600
630
  functionality.useAuthenticator = [[options valueForKey:@"useAuthenticator"] boolValue];
601
631
  if([options valueForKey:@"showCaptureButtonDelayFromDetect"] != nil)
@@ -614,6 +644,8 @@
614
644
  functionality.recordScanningProcess = [[options valueForKey:@"recordScanningProcess"] boolValue];
615
645
  if([options valueForKey:@"manualMultipageMode"] != nil)
616
646
  functionality.manualMultipageMode = [[options valueForKey:@"manualMultipageMode"] boolValue];
647
+ if([options valueForKey:@"onlineProcessingConfiguration"] != nil)
648
+ functionality.onlineProcessingConfig = [self RGLOnlineProcessingConfigFromJSON:[options valueForKey:@"onlineProcessingConfiguration"]];;
617
649
  }
618
650
 
619
651
  +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams {
@@ -713,6 +745,20 @@
713
745
  processParams.parseBarcodes = [options valueForKey:@"parseBarcodes"];
714
746
  if([options valueForKey:@"shouldReturnPackageForReprocess"] != nil)
715
747
  processParams.shouldReturnPackageForReprocess = [options valueForKey:@"shouldReturnPackageForReprocess"];
748
+ if([options valueForKey:@"imageOutputMaxWidth"] != nil)
749
+ processParams.imageOutputMaxWidth = [options valueForKey:@"imageOutputMaxWidth"];
750
+ if([options valueForKey:@"imageOutputMaxHeight"] != nil)
751
+ processParams.imageOutputMaxHeight = [options valueForKey:@"imageOutputMaxHeight"];
752
+ if([options valueForKey:@"disablePerforationOCR"] != nil)
753
+ processParams.disablePerforationOCR = [options valueForKey:@"disablePerforationOCR"];
754
+ if([options valueForKey:@"respectImageQuality"] != nil)
755
+ processParams.respectImageQuality = [options valueForKey:@"respectImageQuality"];
756
+ if([options valueForKey:@"splitNames"] != nil)
757
+ processParams.splitNames = [options valueForKey:@"splitNames"];
758
+ if([options valueForKey:@"processAuth"] != nil)
759
+ processParams.processAuth = [options valueForKey:@"processAuth"];
760
+ if([options valueForKey:@"documentGroupFilter"] != nil)
761
+ processParams.documentGroupFilter = [options mutableArrayValueForKey:@"documentGroupFilter"];
716
762
  }
717
763
 
718
764
  +(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
@@ -797,8 +843,6 @@
797
843
  result[@"videoSessionPreset"] = [NSNumber numberWithInteger:[self NSIntegerWithAVCaptureSessionPreset:functionality.videoSessionPreset]];
798
844
  result[@"videoCaptureMotionControl"] = [NSNumber numberWithBool:functionality.videoCaptureMotionControl];
799
845
  result[@"orientation"] = [NSNumber numberWithInteger:[self NSIntegerWithUIInterfaceOrientationMask:functionality.orientation]];
800
- result[@"onlineMode"] = [NSNumber numberWithBool:functionality.onlineMode];
801
- result[@"serviceURL"] = functionality.serviceURL;
802
846
  result[@"cameraPosition"] = [NSNumber numberWithInteger:[self NSIntegerWithAVCaptureDevicePosition:functionality.cameraPosition]];
803
847
  result[@"btDeviceName"] = functionality.btDeviceName;
804
848
  result[@"useAuthenticator"] = [NSNumber numberWithBool:functionality.isUseAuthenticator];
@@ -866,6 +910,13 @@
866
910
  result[@"forceReadMrzBeforeLocate"] = processParams.forceReadMrzBeforeLocate;
867
911
  result[@"parseBarcodes"] = processParams.parseBarcodes;
868
912
  result[@"shouldReturnPackageForReprocess"] = processParams.shouldReturnPackageForReprocess;
913
+ result[@"imageOutputMaxWidth"] = processParams.imageOutputMaxWidth;
914
+ result[@"imageOutputMaxHeight"] = processParams.imageOutputMaxHeight;
915
+ result[@"disablePerforationOCR"] = processParams.disablePerforationOCR;
916
+ result[@"respectImageQuality"] = processParams.respectImageQuality;
917
+ result[@"splitNames"] = processParams.splitNames;
918
+ result[@"processAuth"] = processParams.processAuth;
919
+ result[@"documentGroupFilter"] = processParams.documentGroupFilter;
869
920
 
870
921
  return result;
871
922
  }
@@ -969,6 +1020,10 @@
969
1020
  rfidScenario.authorizedInstallCert = [[options valueForKey:@"authorizedInstallCert"] boolValue];
970
1021
  if([options valueForKey:@"authorizedInstallQCert"] != nil)
971
1022
  rfidScenario.authorizedInstallQCert = [[options valueForKey:@"authorizedInstallQCert"] boolValue];
1023
+ if([options valueForKey:@"reprocessParams"] != nil)
1024
+ rfidScenario.reprocParams = [self RGLReprocParamsFromJSON: [options valueForKey:@"reprocessParams"]];
1025
+ if([options valueForKey:@"defaultReadingBufferSize"] != nil)
1026
+ rfidScenario.defaultReadingBufferSize = [[options valueForKey:@"defaultReadingBufferSize"] intValue];
972
1027
  }
973
1028
 
974
1029
  @end