flutter_web_twain

Last updated:

0 purchases

flutter_web_twain Image
flutter_web_twain Images
Add to Cart

Description:

flutter web twain

flutter_web_twain #
The Flutter plugin is a wrapper for Dynamsoft's Web TWAIN SDK. It allows you to build web document scanning applications with Flutter.
Getting a License Key for Dynamic Web TWAIN #

Installation #


Add flutter_web_twain as a dependency in your pubspec.yaml file.


In the root of your project, download the Dynamic Web TWAIN npm package:
npm install dwt
copied to clipboard


Include the following line in your index.html file:
<script src="node_modules/dwt/dist/dynamsoft.webtwain.min.js"></script>
copied to clipboard


Usage #


Initialize the Flutter Web TWAIN SDK:
final FlutterWebTwain _flutterWebTwain = FlutterWebTwain();
WebTwainController _controller = await _flutterWebTwain.createWebTwainController();
await _controller!.init('node_modules/dwt/dist/',
'LICENSE-KEY');
copied to clipboard


Embed the image container into your widget tree:
Expanded(
child: _controller == null
? const CircularProgressIndicator()
: HtmlElementView(viewType: _controller!.webviewId),
),
copied to clipboard


Acquire documents from a document scanner:
await _controller!.scan(
'{"IfShowUI": false, "PixelType": ${_pixelFormat!.index}}');
copied to clipboard


Load images from the local file system:
await _controller!.load();
copied to clipboard


Save single or multiple images as PDF, TIFF or JPEG:
await _controller!.download(FileFormat.PDF.index, 'filename');
copied to clipboard


Try the Example #
cd example
flutter run -d chrome
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.