GeniusScanSDK.ScanFlow.iOS 4.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package GeniusScanSDK.ScanFlow.iOS --version 4.2.1                
NuGet\Install-Package GeniusScanSDK.ScanFlow.iOS -Version 4.2.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GeniusScanSDK.ScanFlow.iOS" Version="4.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GeniusScanSDK.ScanFlow.iOS --version 4.2.1                
#r "nuget: GeniusScanSDK.ScanFlow.iOS, 4.2.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GeniusScanSDK.ScanFlow.iOS as a Cake Addin
#addin nuget:?package=GeniusScanSDK.ScanFlow.iOS&version=4.2.1

// Install GeniusScanSDK.ScanFlow.iOS as a Cake Tool
#tool nuget:?package=GeniusScanSDK.ScanFlow.iOS&version=4.2.1                

Description

This Xamarin plugin allows you to access the Genius Scan SDK core features from a Xamarin.iOS application:

  • Automatic document detection
  • Document perspective correction
  • Image enhancement with 3 different modes (Black & white, Color, Photo)

Licence

This plugin is based on the Genius Scan SDK for which you need to setup a licence. You can aleady try the "demo" version for free by not setting a licence key, the only limitation being that the app will exit after 60 seconds.

To buy a licence or for any question regarding the SDK, please contact us at sdk@thegrizzlylabs.com!

Demo application

As an example, you can check our demo application

Usage

Set the licence key

Initialize the SDK with a valid licence key:

GSK.InitWithLicenseKey(licenseKey, errorHandler);

The error handler will be called if the license key is not valid anymore or if it does not match the application ID. Note that, for testing purpose, you can also use the plugin without a licence key, but it will only work for 60 seconds.

It is recommended to show a message to users asking them to update the application in case the license has expired.

Start the scanner module

The following line will start a scan flow with the corresponding configuration:

var configuration = GSKScanFlowConfiguration_Dictionary.ConfigurationWithDictionary(new GSKScanFlowConfiguration(), configurationDictionary, out outError);
var scanFlow = GSKScanFlow.ScanFlowWithConfiguration(configuration);
var viewController = UIApplication.SharedApplication.Delegate.GetWindow().RootViewController;
scanFlow.StartFromViewController(viewController, successBlock, errorBlock);

The scan flow configuration dictionary takes the following options:

  • source: camera or image (defaults to camera)
  • sourceImageUrl: an absolute image url, required if source is image. Example: file:///var/…/image.png
  • 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.
  • defaultFilter: none, blackAndWhite, color, photo (by default, the filter is chosen automatically)
  • pdfPageSize: fit, a4, letter, defaults to fit.
  • 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.
  • jpegQuality: JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
  • postProcessingActions: an array with the desired actions to display during the post processing screen (defaults to all actions). Possible actions are rotate, editFilter.
  • flashButtonHidden: boolean (default to false)
  • defaultFlashMode: auto, on, off (default to off)
  • foregroundColor: string representing a color, must start with a #. The color of the icons, text (defaults to '#ffffff').
  • backgroundColor: string representing a color, must start with a #. The color of the toolbar, screen background (defaults to black)
  • highlightColor: string representing a color, must start with a #. The color of the image overlays (default to blue)
  • menuColor: string representing a color, must start with a #. The color of the menus (defaults to system defaults.)
  • 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.
    • 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.
    • languagesDirectoryUrl: folder containing the language files used for text recognition. Language files can be downloaded from https://github.com/tesseract-ocr/tessdata_fast.

The successBlock will be called wiht the following result dictionary:

  • pdfUrl: a PDF file of the scanned pages (example: "file://<filepath>.pdf")
  • scans: an array of scan objects. Each scan object has:
    • originalUrl: the original file as scanned from the camera. "file://<filepath>.jpeg"
    • enhancedUrl: the cropped and enhanced file, as processed by the SDK. "file://<filepath>.{jpeg|png}"
    • ocrResult: the result of text recognition for this scan
      • text: the raw text that was recognized

Architectures

This plugin only embeds arm64 slice for now as Xamarin iOS does not support xcframeworks yet: https://github.com/xamarin/xamarin-macios/issues/6246

This means this plugin cannot run on simulators for now, but only on iOS devices.

FAQ

How do I get the UI translated to another language?

The plugin supports a wide variety of languages:

  • English (default)
  • Arabic
  • Danish
  • German
  • Spanish
  • French
  • Hebrew
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Dutch
  • Portuguese
  • Russian
  • Swedish
  • Turkish
  • Vietnamese
  • Chinese (Simplified)
  • Chinese (Traditional)

The device's locale determines the languages used by the plugin for all strings: user guidance, menus, dialogs…

NB: iOS applications must be localized in XCode by adding each language to the project.

What should I do if my license is invalid?

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. Contact us at sdk@thegrizzlylabs.com for any information regarding the procurement and replacement of license keys.

Product Compatible and additional computed target framework versions.
Xamarin.iOS xamarinios10 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.3.1 132 11/12/2024
5.3.0 409 10/4/2024
5.2.0 236 9/11/2024
5.1.5 174 8/6/2024
5.1.4 104 7/29/2024
5.1.3 131 7/26/2024
5.1.2 118 7/23/2024
5.1.1 99 7/11/2024
5.1.0 449 6/19/2024
5.0.8 292 6/5/2024
5.0.7 158 6/3/2024
5.0.6 219 5/24/2024
5.0.5 346 4/22/2024
5.0.4 166 4/18/2024
5.0.3 193 4/15/2024
5.0.2 259 4/9/2024
5.0.1 393 4/4/2024
5.0.0 200 4/3/2024
5.0.0-beta9 182 3/19/2024
5.0.0-beta8 292 3/5/2024
5.0.0-beta7 209 2/20/2024
5.0.0-beta6 208 2/15/2024
5.0.0-beta5 201 2/13/2024
5.0.0-beta4 177 2/9/2024
5.0.0-beta3 159 2/9/2024
5.0.0-beta2 170 2/7/2024
5.0.0-beta1 148 1/19/2024
4.21.1 423 2/14/2024
4.21.0 407 12/20/2023
4.20.1 347 12/12/2023
4.20.0 284 12/11/2023
4.19.0 255 11/27/2023
4.18.0 274 11/15/2023
4.17.0 220 11/15/2023
4.16.0 249 11/7/2023
4.15.0 1,281 11/2/2023
4.14.0 347 10/17/2023
4.13.0 347 9/1/2023
4.12.0 1,194 6/1/2023
4.11.0 798 5/24/2023
4.10.1 856 4/20/2023
4.10.0 439 4/13/2023
4.9.0 515 3/14/2023
4.8.0 1,360 1/24/2023
4.7.4 829 12/9/2022
4.7.3 616 11/17/2022
4.7.2 555 11/11/2022
4.7.1 554 11/9/2022
4.7.0 535 11/7/2022
4.6.0 526 10/4/2022
4.5.0 1,113 4/22/2022
4.4.7 760 3/26/2022
4.4.6 777 3/15/2022
4.4.5 811 3/1/2022
4.4.4 764 2/16/2022
4.4.3 817 1/16/2022
4.4.2 602 12/15/2021
4.4.1 584 12/8/2021
4.3.0 546 11/23/2021
4.2.2 535 11/12/2021
4.2.1 434 11/9/2021
4.2.0 473 11/8/2021
4.1.4 486 10/26/2021
4.1.3 489 9/28/2021
4.1.2 462 9/14/2021
4.1.1 513 9/10/2021
4.1.0 674 9/9/2021
4.0.12 469 8/26/2021
4.0.11 469 8/18/2021
4.0.10 510 7/2/2021
4.0.9 501 6/24/2021
4.0.8 581 5/7/2021
4.0.7 499 3/31/2021
4.0.6 481 3/29/2021
1.0.7 641 3/10/2021
1.0.6 629 3/8/2021
1.0.5 665 2/9/2021