GeniusScanSDK.ScanFlow.iOS 5.9.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package GeniusScanSDK.ScanFlow.iOS --version 5.9.1
                    
NuGet\Install-Package GeniusScanSDK.ScanFlow.iOS -Version 5.9.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="5.9.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GeniusScanSDK.ScanFlow.iOS" Version="5.9.1" />
                    
Directory.Packages.props
<PackageReference Include="GeniusScanSDK.ScanFlow.iOS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GeniusScanSDK.ScanFlow.iOS --version 5.9.1
                    
#r "nuget: GeniusScanSDK.ScanFlow.iOS, 5.9.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.
#addin nuget:?package=GeniusScanSDK.ScanFlow.iOS&version=5.9.1
                    
Install GeniusScanSDK.ScanFlow.iOS as a Cake Addin
#tool nuget:?package=GeniusScanSDK.ScanFlow.iOS&version=5.9.1
                    
Install GeniusScanSDK.ScanFlow.iOS as a Cake Tool

Genius Scan SDK for Xamarin

Description

The Genius Scan SDK for Xamarin enables you to integrate the document scanning experience that powers the Genius Scan app in your Xamarin app.

It offers a component enabling you to implement the Genius Scan SDK Scan Flow, an all-in-one configurable scanner module with the following key features:

  • Automatic document detection
  • Document perspective correction
  • Image enhancement with 4 different modes (Black & white, Monochrome, Color, Photo)
  • Batch scanning of several pages in row
  • OCR to extract raw text from images and generate PDF with invisible text layer

License

You can try the "demo" version for free without a license key, the only limitation being that the app will stop working after 60 seconds.

You need to set a license key for unlimited demo time, or for production.

To buy a license:

  1. Sign up to our developer console
  2. Submit a quote request for each application

You can learn more about licensing in our website and contact us at sdk@geniusscan.com for further questions.

Demo application

As an example, you can check our demo application

Usage

Set the license key

Initialize the SDK with a valid license key:

GSK.SetLicenseKey(licenseKey, , /* autoRefresh = */ true);

This method doesn't return anything. However, other methods of the plugin will fail if the license key is invalid or expired. Note that, for testing purpose, you can also use the plugin without setting a license 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, image or library (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.
  • multiPageFormat: pdf, tiff, none (defaults to pdf)
  • defaultFilter: the filter that will be applied by default to enhance scans, or none if no enhancement should be performed by default. Possible values are listed in the Available filters section. Default value is automatic.
  • availableFilters: an array of filters that the user can select when they tap on the edit filter button. Defaults to [none, automatic, automaticMonochrome, automaticBlackAndWhite, automaticColor, photo].
  • 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.
  • pdfFontFileUrl: Custom font file used during the PDF generation to embed an invisible text layer. If null, a default font is used, which only supports Latin languages.
  • 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 and correctDistortion.
  • defaultCurvatureCorrection: enabled or disabled whether a curvature correction should be applied by default. Disabled by default.
  • defaultScanOrientation: automatic to rotate scan automatically after capture or original to keep original scan orientation (defaults to automatic).
  • photoLibraryButtonHidden: boolean specifying whether the button allowing the user to pick an image on the Camera screen should be hidden (default to false).
  • 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 the BCP 47 language codes (eg ["en-US"]) for which to run text recognition. Note that the text recognition will take longer if multiple languages are specified.
    • 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.
  • structuredData: an array of the structured data you want to extract. E.g.: ['receipt', 'businessCard']. Possible values are bankDetails, receipt, businessCard. Only available on iOS.
  • structuredData: an array of the structured data you want to extract. E.g.: ['receipt', 'businessCard']. Possible values are receipt, readableCode, bankDetails (iOS only), businessCard (iOS only).
  • structuredDataReadableCodeTypes: an array of the readable code types to extract, e.g. ['qr', 'code39']. Possible values are aztec, code39, code93, code128, dataMatrix, ean8, ean13, itf, pdf417, qr, upca (Android only), upce, codabar (iOS 15+ only), gs1DataBar (iOS 15+ only), microPDF417 (iOS 15+ only), microQR (iOS 15+ only), msiPlessey (iOS 15+ only).

The successBlock will be called with the following result dictionary:

  • multiPageDocumentUrl: a document containing all 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
      • hocrTextLayout: the recognized text in hOCR format (with position, style…)
    • structuredData: the result of the structured data extraction. A subdictionary will be present for each type of structured data detected by the scan flow.

An implicit API contract is that you have to take ownership of the resulting files referenced by the result object. You are responsible for moving them to the appropriate place and deleting them if you don’t need them anymore.

Available filters

The ScanFlow offers a variety of filters to enhance the appearance of different kinds of documents. Some filters are dynamic (or automatic), meaning they will apply the best enhancement possible, possibly with some constraints. For example, the automaticBlackAndWhite filter will apply the best enhancement, assuming that the scan is a text document and making sure the output will have a grayscale color palette. Here is a list of all possible dynamic filters: automatic, automaticColor, automaticBlackAndWhite, automaticMonochrome.

Other filters are static filters, which means they always perform the same enhancement operation, without any logic on the document characteristics. The different static filters are: photo, softBlackAndWhite, softColor, strongMonochrome, strongBlackAndWhite, strongColor, darkBackground.

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 device's locale determines the languages used by the plugin for all strings: user guidance, menus, dialogs…

The plugin supports a wide variety of languages: English (default), Arabic, Chinese (Simplified), Chinese (Traditional), Danish, Dutch, French, German, Hebrew, Indonesian, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish, Turkish, Vietnamese.

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. To learn more about the procurement and replacement of license keys, refer to the Licensing FAQ.

Troubleshooting

Refer to the troubleshooting guides of the native iOS libraries to resolve common configuration and build problems.

Changelog

See changelog

Product Compatible and additional computed target framework versions.
.NET net8.0-ios16.1 is compatible.  net9.0-ios was computed.  net10.0-ios was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-ios16.1

    • 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.10.0 229 14 days ago
5.9.1 189 a month ago
5.9.0 168 2 months ago
5.8.0 506 2 months ago
5.7.0 325 3 months ago
5.6.1 283 4 months ago
5.6.0 133 4 months ago
5.5.0 188 4 months ago
5.4.1 131 5 months ago
5.4.0 207 6 months ago
5.3.1 206 7 months ago
5.3.0 543 8 months ago
5.2.0 267 9 months ago
5.1.5 205 10 months ago
5.1.4 133 10 months ago
5.1.3 163 7/26/2024
5.1.2 147 7/23/2024
5.1.1 127 7/11/2024
5.1.0 512 6/19/2024
5.0.8 316 6/5/2024
5.0.7 189 6/3/2024
5.0.6 245 5/24/2024
5.0.5 371 4/22/2024
5.0.4 185 4/18/2024
5.0.3 224 4/15/2024
5.0.2 271 4/9/2024
5.0.1 412 4/4/2024
5.0.0 220 4/3/2024
5.0.0-beta9 190 3/19/2024
5.0.0-beta8 302 3/5/2024
5.0.0-beta7 227 2/20/2024
5.0.0-beta6 225 2/15/2024
5.0.0-beta5 219 2/13/2024
5.0.0-beta4 193 2/9/2024
5.0.0-beta3 176 2/9/2024
5.0.0-beta2 176 2/7/2024
5.0.0-beta1 163 1/19/2024
4.21.1 460 2/14/2024
4.21.0 422 12/20/2023
4.20.1 363 12/12/2023
4.20.0 300 12/11/2023
4.19.0 275 11/27/2023
4.18.0 288 11/15/2023
4.17.0 241 11/15/2023
4.16.0 273 11/7/2023
4.15.0 1,618 11/2/2023
4.14.0 362 10/17/2023
4.13.0 364 9/1/2023
4.12.0 1,219 6/1/2023
4.11.0 840 5/24/2023
4.10.1 896 4/20/2023
4.10.0 465 4/13/2023
4.9.0 548 3/14/2023
4.8.0 1,394 1/24/2023
4.7.4 860 12/9/2022
4.7.3 652 11/17/2022
4.7.2 596 11/11/2022
4.7.1 590 11/9/2022
4.7.0 571 11/7/2022
4.6.0 568 10/4/2022
4.5.0 1,162 4/22/2022
4.4.7 811 3/26/2022
4.4.6 829 3/15/2022
4.4.5 864 3/1/2022
4.4.4 824 2/16/2022
4.4.3 880 1/16/2022
4.4.2 654 12/15/2021
4.4.1 637 12/8/2021
4.3.0 605 11/23/2021
4.2.2 585 11/12/2021
4.2.1 489 11/9/2021
4.2.0 521 11/8/2021
4.1.4 536 10/26/2021
4.1.3 539 9/28/2021
4.1.2 509 9/14/2021
4.1.1 560 9/10/2021
4.1.0 766 9/9/2021
4.0.12 515 8/26/2021
4.0.11 518 8/18/2021
4.0.10 554 7/2/2021
4.0.9 550 6/24/2021
4.0.8 634 5/7/2021
4.0.7 549 3/31/2021
4.0.6 536 3/29/2021
1.0.7 751 3/10/2021
1.0.6 744 3/8/2021
1.0.5 785 2/9/2021