Integrate scanner, capture card, and digital camera support into your .NET applications. GdPicture’s TWAIN SDK handles single and batch image acquisition in both 32-bit and 64-bit modes — and then lets you edit and save documents to local storage, network drives, FTP, web servers, or databases.
TWAIN is the industry-standard API for image acquisition, connecting scanners, drivers, and software through a unified protocol. Supported across Windows, macOS, and Linux, it’s the most widely adopted scanning standard — and GdPicture gives you full access via .NET and ActiveX APIs for WinForms, WPF, and web applications.
Every scan requires three components: a device, a driver, and your application. TWAIN standardizes the communication layer so your code works with any compliant scanner.
TWAIN is the most widely adopted scanning protocol, maintained by the TWAIN Working Group since 1992. It outpaces alternatives like WIA, ISIS, and SANE in market adoption.
The protocol runs on Windows, macOS, and Linux/Unix, with standardized options for resolution, color depth, scanning regions, and feeder control.
GdPicture exposes both low-level and high-level .NET APIs, plus ActiveX components, giving you complete control over TWAIN 2.3 capabilities in WinForms, WPF, or web apps.
Enumerate and select image sources programmatically. Control Automatic Document Feeders (ADF) and negotiate transfer settings per scan job.
Scan both sides of a page in a single pass. Automatic blank page detection removes empty pages during acquisition, reducing file size and manual cleanup.
Control color depth, resolution, brightness, contrast, and dimensions for every scan. Fully compatible with Kofax VRS for advanced image cleanup.
Detect and read 1D and 2D barcodes during scanning — Code 39/128/93, EAN-8/13, PostNet, PDF417, DataMatrix, and more.
Save scans to PDF/A, searchable PDF (OCR), encrypted PDF, multipage TIFF, JPEG, JPEG 2000, JBIG2, GIF, PNG, or EXR. Upload directly to FTP or HTTP endpoints.
Supports 32-bit and 64-bit data sources, Citrix environments, Windows Terminal Services, and multithreaded applications.
Built on GdPicture.NET’s document imaging engine with more than 15 years of continuous development. Handles unstable TWAIN drivers gracefully through real-time device diagnostics.
Extend your scanning app with GdPicture’s broader toolkit — PDF generation, OCR, format conversion, and image processing. One consistent API across platforms means less ramp-up time.
Regular updates keep pace with new devices, OS changes, and feature requests. See the version history or subscribe to the developer newsletter for the latest improvements.
Compatible with both major scanning protocols. Acquire images from scanners and digital cameras in 32-bit or 64-bit environments.
get started
Download and install the GdPicture.NET package to access compiled demo applications and multi-language sample projects with full source code.
\Samples\Bin\PaperScan.exe.\Samples\WinForm\ (see TWAIN Scanning app).The example gets an image from a scanner and then saves it in a searchable PDF.
using GdPictureImaging gdpictureImaging = new GdPictureImaging();using GdPicturePDF gdpicturePDF = new GdPicturePDF();// Store the handle of the active window in a variable.IntPtr WINDOW_HANDLE = IntPtr.Zero;// Select the scanner.gdpictureImaging.TwainSelectSource(WINDOW_HANDLE);gdpictureImaging.TwainOpenDefaultSource(WINDOW_HANDLE);// (Optional) Hide the scanning user interface.gdpictureImaging.TwainSetHideUI(true);// Create the destination PDF document.gdpicturePDF.NewPDF(PdfConformance.PDF);// Get the image from the scanner.int imageID = gdpictureImaging.TwainAcquireToGdPictureImage(WINDOW_HANDLE);// Add the scanned image to a new page in the destination document.gdpicturePDF.AddImageFromGdPictureImage(imageID, false, true);// Run the OCR process.gdpicturePDF.OcrPage("eng", "C:\GdPicture.NET 14\Redist\OCR", "", 300);// Save the result in a PDF document.gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");// Release unnecessary resources.gdpictureImaging.ReleaseGdPictureImage(imageID);gdpictureImaging.TwainCloseSource();Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()Using gdpicturePDF As GdPicturePDF = New GdPicturePDF() ' Store the handle of the active window in a variable. Dim WINDOW_HANDLE = IntPtr.Zero ' Select the scanner. gdpictureImaging.TwainSelectSource(WINDOW_HANDLE) gdpictureImaging.TwainOpenDefaultSource(WINDOW_HANDLE) ' (Optional) Hide the scanning user interface. gdpictureImaging.TwainSetHideUI(True) ' Create the destination PDF document. gdpicturePDF.NewPDF(PdfConformance.PDF) ' Get the image from the scanner. Dim imageID As Integer = gdpictureImaging.TwainAcquireToGdPictureImage(WINDOW_HANDLE) ' Add the scanned image to a new page in the destination document. gdpicturePDF.AddImageFromGdPictureImage(imageID, False, True) ' Run the OCR process. gdpicturePDF.OcrPage("eng", "C:\GdPicture.NET 14\Redist\OCR", "", 300) ' Save the result in a PDF document. gdpicturePDF.SaveToFile("C:\temp\output.pdf") ' Release unnecessary resources. gdpictureImaging.ReleaseGdPictureImage(imageID) gdpictureImaging.TwainCloseSource()End UsingEnd UsingScanning in web applications
Add TWAIN scanning to web applications using DocuVieware, our HTML5 viewer and document management toolkit.
Use the built-in scanning snap-in for instant integration, or customize every step with high- and low-level JavaScript APIs. Supports 32-bit and 64-bit TWAIN devices through the driver UI or programmatic control.
Adaptive compression and automatic transfer mode selection optimize for available system resources. Save scans directly to PDF/A or TIFF with built-in document cleanup.
Preview scanned pages with zoom, rotate, and reorder controls. Fault-tolerant transfer handles low-bandwidth and intermittent connections without losing data.
Loading scanning viewer...
Microsoft Windows Image Acquisition (WIA) API is standardized for acquiring digital images from devices that are primarily used to capture still images and for managing these devices. WIA is a COM interface, which is very different from but overlapping with TWAIN.
Compared to TWAIN, WIA offers much better support for digital cameras and much less sophisticated support for scanners.
There are a few other parameters to keep in mind:
Refer to our WIA scanning page for more features and functionalities.
Yes. There are four main scanning protocols currently used in the document scanning industry: TWAIN, Microsoft Windows Image Acquisition (WIA), Image and Scanner Interface Specification (ISIS), and Scanner Access Now Easy (SANE). Each protocol has distinct features, adoption levels, and platform support.
TWAIN scanning protocol
Microsoft Windows Image Acquisition (WIA)
Image and Scanner Interface Specification (ISIS)
Scanner Access Now Easy (SANE)
Which scanning protocol should you choose?
The best scanning protocol depends on your specific needs:
If you don’t have a physical TWAIN scanner to test the SDK, you can download and use a virtual scanner (32- and 64-bit) here.
60-day free trial