Skip to main content

Initializing the Flutter Document Scanner SDK

License key

To run the Scanbot SDK within your production app, you must purchase and use a valid Scanbot SDK license.

Each license key is valid only for a given app bundle identifier. You will be unable to use any of the SDK features if the license key is corrupted, expired, or invalid in any other way.

Example code for initialization with a license:

Initialize With License
loading...

Getting a trial license

The Scanbot SDK will run without a license for one minute per session.

To get a free 7-day trial license, please submit the trial license form.

Please note that a trial license may only be used in a development and staging environment. You are not allowed to publish your app to the App Store, Play Store, or any third-party app store with a trial license.

Purchasing a production license

To get pricing information and purchase a production license for the Scanbot SDK, please request a quote.

App identifier

Every app has a unique identifier (also known as "bundle identifier" or "application ID"). Your license will be bound to this identifier.

To request a trial license or purchase a production license, you need to provide the app identifier of your application.

Initialization

The Scanbot SDK must be initialized before usage. Make sure to call the initialization after entering the main widget creation.

To initialize the SDK, add the following code snippet:

Initialize Scanbot SDK
loading...

All available initialization options are documented in SdkConfiguration.

Logging

When initializing the Scanbot SDK, you have the option to enable logging. By default, logging is disabled.

Initialize With Logging
loading...

On Android, logs are printed into LogCat and saved on the device. The easiest way to check the log outputs on Android is to use the Android Debug Bridge (adb) (e.g., adb -s <DEVICE_ID> shell "logcat").

On iOS, all logs are printed to the console. Please use Xcode to check the log outputs.

No log files are created by the Scanbot SDK itself.

warning

While it is useful for development, we recommend disabling logging in production builds for security and performance reasons.

Image quality/compression

The initialize method can take some optional parameters that specify the image storage format and compression for generated images.

Initialize With Image Quality
loading...
  • storageImageFormat: Either 'JPG' or 'PNG'. The default value is 'JPG'.
  • storageImageQuality: Defines the quality factor of JPEG images. The value must be between 1 and 100, where 100 means maximum quality and the largest file size. This parameter is optional. The default value is 80, which is a good compromise between image file size and document legibility.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license