Configure and Run the HTML5 Web Scanning Demo - C# ASP.NET

This tutorials shows how to configure and run the LEADTOOLS ASP.NET Web Scanning Demo.

The source code of the demo is installed with the main LEADTOOLS SDK setup.

Overview  
Summary This tutorial covers how to properly setup and run the LEADTOOLS ASP.NET Web Scanning Demo.
Completion Time 5 - 10 minutes
Platform HTML5/JS
IDE Visual Studio 2019, 2022
Development License Download LEADTOOLS

Required Knowledge

Be sure to download and install the LEADTOOLS SDK. For more information on Web Scanning and how it works, see Web Scanning Framework.

Configure LEADTOOLS Web Scanning Service

Navigate to the Web Scanning Demo in this file path <INSTALL_DIR>\LEADTOOLS23\Examples\Scanning\JS\ScanningDemo. Open the CSPROJ file in that directory.

Run the localhost from Visual Studio. From the main menu, click IIS Express (Browser) to build and load the index.html. This will launch the demo and attempt to connect to the Web Scanning Service. If the Scanning Service is not installed, the application will prompt the user to download and run it. If this is the case click Download Scan Application. This downloadable service can also be found in the ScanningDemo directory: <INSTALL_DIR>\LEADTOOLS23\Examples\Scanning\JS\ScanningDemo\Leadtools.WebScanning.Setup.msi

If you see the errors in the screenshot below, resolve by running the Command Prompt as admin and running this command: npm install --save @types/jquery

Screenshot of possible Scanning Demo errors.

Run the LEADTOOLS Web Scanning Demo

Once the Scanning Service is downloaded and installed, refresh the application and confirm that the scanning service has been started and accessed. If no TWAIN data source is detected, an error window will pop-up.

If this occurs, you can always use a software version of a TWAIN data source. To do this, you can go to twain.org and click on TWAIN 2.5 Specifications. Then click on TWAIN Sample Data Source and Application. This will open a GitHub repository where you can click on the code drop down box and select download ZIP. Within the TWAIN ZIP folder, go to TWAIN Samples Master -> Releases -> Twain DS folder -> TWAIN DS Installer.

Note

The virtual TWAIN scanner does not work with Windows 11.

Return to the demo and refresh the window. You should no longer see the data source error. After everything has loaded, click the button in the top left corner labeled Start Scanning. This will open a pop-up box with various settings which you can set to your specifications such as selecting your source, negotiating TWAIN capabilities, and acquiring images to a local cache, which the web application can load via URI. Once you have the settings you wish, you can press the Scan button.

Each page whether from a batch scanning job or multiple scans will be added to the thumbnail browser which you can click or tap to display in the primary viewer. The LEADTOOLS Web Scanning Demo makes use of the LEADTOOLS HTML5 viewer SDK, which includes client-side interactive tools such as fit to screen, zoom in and out, one-to-one size, magnifying glass, pan/zoom, and more. The Scanning Service also uses image processing functions to allow you to enhance the images. To access this, click the button 2nd to the right, next to the button with the questions mark icon.

Wrap-Up

This tutorial showed how to configure the Web Scanning Service, run the Web Scanning Demo, and scan an image from a TWAIN source.

See Also

Help Version 23.0.2024.5.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.