Tagged as

Stats

How to Scan Documents with your WPF Application

In this article, I’ll share with you how to utilize Dynamic .NET TWAIN in a WPF application to process your documents.

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Introduction

Windows Presentation Foundation (WPF), introduced with .NET
framework 3.0, is an API for creating graphical user interfaces for the Windows
platform. Although WinForm is a mature proven technology, more and more
developers turn to WPF for its better handling of Graphics and animation.
Compared to the traditional forms applications, WPF allows you to customize
controls in a most efficient and flexible way.

Dynamsoft’s Dynamic .NET
TWAIN is a .NET component that can be embedded into a WPF application. You
can use the component in different stages of document processing, from image
scanning, editing to the final image storage. In this article, I’ll provide the
integration steps and the image-processing functions/features that can be
implemented.

Image
Scanning. After you add the buttons, you can insert the source code to
implement the planned functions. btnSelect is going to show all the
available sources of your devices, including attached/remote scanners, webcams,
etc. The latest version of Dynamic .NET TWAIN (v4.1) is compatible with all
TWAIN, WIA and UVC compatible devices.

By default, most of the devices (including TWAIN2 FreeImage
Software Scanner 2.1 shown in the screenshot) will prompt you the user
interface of the source when clicking on "Acquire". Through the user interface,
users can adjust the properties of the images, for instance, single/duplex
scan, color mode, resolution, page size, brightness, contrast, etc. This gives
your customers the most flexibility during the document scanning process.
However, some businesses and organizations, such as the banks and governments
planning to scan user IDs, may want to standardize the page size, resolution
and/or other image properties. This is also supported by Dynamic .NET TWAIN. A
rich set of properties are provided by the control that enables you to hard
code the properties. Here is an example:

Other Features Supported by
Dynamic .NET TWAIN

Besides image scanning, you can add many more functions to
your WPF application with the help of Dynamic .NET TWAIN.