Project Description

C# VB.NET TWAIN API library so that you can acquire images from and have total control on almost all kinds of TWAIN WIA scanners on Windows 32bit and 64bit. Equip your C# VB.NET applications (Windows Forms, WPF applications, Sliverlight and ActiveX controls, etc.) with functionality of high speed document scanning (e.g., ADF bulk scan to multi-page PDF) and image acquisition. Fully compliant with various government privacy acts such as HIPPA and HITECH.

Jump Start

  Install-Package asprise-scan-scanner-twain-wia-api # Dev guide »

 

using asprise_imaging_api;

Result result = new AspriseImaging().Scan(new Request()
    .SetTwainCap(TwainConstants.ICAP_PIXELTYPE, TwainConstants.TWPT_RGB)
    .SetTwainCap(TwainConstants.ICAP_SUPPORTEDSIZES, TwainConstants.TWSS_USLETTER)
    .SetPromptScanMore(true) // prompt to scan more pages
    .AddOutputItem(new RequestOutputItem(AspriseImaging.OUTPUT_SAVE, AspriseImaging.FORMAT_JPG)
      .SetSavePath(".\\${TMS}${EXT}")), // Environment variables in path will be expanded
  "select", true, true); // "select" prompts device selection dialog.

List<string> files = result == null ? null : result.GetImageFiles();
Console.WriteLine("Scanned: " + string.Join(", ", files == null ? new string[0] : files.ToArray())); 

Line 3: Invokes the scan function with a new scan request.

Line 4-5: Configures TWAIN scanning settings: color is RBG and paper size is US letter.

Line 7-8: Specifies the target output: save scanned images as JPEG files on local hard disk.

Line 11-12: Obtains the image files saved and prints out.

Note that above is a basic sample use of the API. It provides far more functions. For example, instead of saving the images as JPEG files, you may request to return the images as PNG in memory or upload as a multi-page PDF file or combination of them.

In addition to above object-oriented invocation of the scanning API, alternatively, you may specify scanning requests in JSON for brevity and readability.

Features

Supports Almost All Scanners

Acer, AGFA, Brother, Canon, Dell, Epson, Fujitsu, HP, IBM, Kodak, Konica Minolta, Lexmark, NEC, Nikon, Olympus, Panasonic, Ricoh, Samsung, Xerox and many more TWAIN WIA scanners and cameras.

TWAIN Scanner Access for 64bit and 32bit Applications

64bit applications (for example, C# VB.NET WinForms WPF and Java Swing JavaFX applications) become more and more common, the fact that most TWAIN scanners are not accessible to 64bit applications makes users less productive. Probably the only scanning library that works for both 64bit and 32bit applications accessing 32bit TWAIN scanners.

JPG, PDF, PDF/A, TIFF, CCITT G4

Regardless the scanner's native output formats, it supports a wide range of output formats such as BMP, PNG, JPEG and multi-page PDF, PDF/A (to meet compliance requirements), TIFF with CCITT G4 compression.

Fast Flatbed And ADF Scanning

High speed scanning from flatbed devices and automatic document feeder (ADF) scanners to increase the user's productivity effortless. Advanced features of scanners are supported: imprinter, endorser, barcode and patchcode;

Barcode Reading & Blank Page Detection

Reads barcode (CODE 128, EAN 8/13, UPC, Code 3 of 9, QR, etc.) from scanned documents - even if the scanner doesn't support it. Configurable blank page detection is available for you to discard blank pages.

More Information

 Learn more about C# VB.NET Scanning Library for 64bit & 32bit TWAIN WIA Scanners

 Access to C# VB.NET scanning Developer's Guide

 Browse API (MSDN style) online

 

Last edited Aug 25, 2016 at 3:51 AM by asprise, version 3