Introduction
It’s ideal to get a single yet comprehensive document
processing SDK to handle various kinds of scanners, webcams and other devices.
And the SDK should help you organize different types of documents, convert them
to digital copies and store the documents to the target place(s). Dynamic .NET
TWAIN enables you to implement the functions above in the most flexible way.
Compatible with both 32-bit & 64-bit Windows OS, Dynamic
.NET TWAIN allows you to acquire images from any devices that are compatible
with TWAIN, Windows Image Acquisition (WIA) and USB video device class (UVC).
The library is optimized for use in C# and VB.NET. After you acquired images
from your device or from your local system, the SDK allows you edit the images
and upload them to your local disk, FTP site, web server or database.
Barcode Reader, OCR and Annotation add-ons for Dynamic .NET
TWAIN allow you to integrate document processing all-in-one. Barcode Reader SDK
is able to detect and read 1-D & 2-D barcode symbols on the scanned
documents, such as Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A,
UPC-E, Codabar, RSS-14Aztec, DataMatrix, PDF417 and QR Code. OCR add-on accurately
performs Optical Character Recognition (OCR) and converts the documents to
searchable PDF/text files. The SDK supports recognizing more than 40 languages
which include English, Spanish, Arabic, Chinese, etc. If you’d like to try it
out, a 30-day free trial is available.
Key Features
-
Compatible with Windows OS (both 32-bit and 64-bit)
-
Capture images from scanners, cameras and other devices
compatible with TWAIN, WIA or UVC.
-
Capture live video streams from webcams.
-
Load/Download images from your local folder, web server and/or
database.
-
Support for auto document feeder (ADF) and batch scanning.
-
Support for setting and reading device features, such as
brightness, resolution, contrast, pixel type, duplex and more.
-
Support for storing and restoring default scanning settings.
-
Edit scanned images, such as, Rotate, Mirror, Flip, Crop, Erase,
etc.
-
Zoom in/out a selected image.
-
Support for annotation. Add text, lines, eclipses or rectangles
to the scanned document(s).
-
Convert scanned images to searchable PDF/text files.
-
Detect and decode 1-D & 2D barcode symbols.
-
Upload the scanned documents to your local folder, web server,
FTP site and/or database.
-
Support for BMP, PNG, JPEG, TIFF and PDF. Multi-page TIFF and PDF
are supported as well.
-
Support for SSL to secure the image data transit.
Sample Code
- Capture
images from your device. With a rich set of properties provided, the whole
scanning process is customizable, such as whether to show the user interface of
the selected source, duplex scanning, resolution, etc.
private void AcquireImage()
{
dynamicDotNetTwain.OpenSource();
dynamicDotNetTwain.IfDisableSourceAfterAcquire = true;
dynamicDotNetTwain.Resolution = 300;
dynamicDotNetTwain.IfShowUI = chkIfShowUI.Checked;
dynamicDotNetTwain.IfFeederEnabled = chkIfUseADF.Checked;
dynamicDotNetTwain.IfAutoFeed = chkIfUseADF.Checked;
dynamicDotNetTwain.IfDuplexEnabled = chkDuplex.Checked;
if ((dynamicDotNetTwain.Duplex == 0) && (chkDuplex.Checked == true))
{
string errorstr = "Current source does not support duplex scan.";
errorstr += "\r\n";
txtErrorString.Text = txtErrorString.Text + errorstr;
chkDuplex.Checked = false;
}
dynamicDotNetTwain.AcquireImage(); }
- Set
the image layout.
dynamicDotNetTwain.SelectSource();
dynamicDotNetTwain.OpenSource();
if (dynamicDotNetTwain.SetImageLayout(fFrameLeft,fFrameTop,fFrameRight,fFrameBottom) == false)
MessageBox.Show(dynamicDotNetTwain.ErrorString, "Error");
dynamicDotNetTwain.IfShowUI = false;
dynamicDotNetTwain.IfDisableSourceAfterAcquire = true;
dynamicDotNetTwain.EnableSource();
- Set
the view mode. You can create two controls, one for the thumbnail, the other
for viewing/editing.
dynamicDotNetTwainThum.MouseShape = true;
dynamicDotNetTwainThum.MaxImagesInBuffer = 100;
dynamicDotNetTwainThum.SetViewMode(1,3);
dynamicDotNetTwainView.MaxImagesInBuffer = 1;
dynamicDotNetTwainView.SetViewMode(-1,-1);
dynamicDotNetTwainView.IfFitWindow = true;
dynamicDotNetTwainView.MouseShape = false;
- Save
scanned images to your local folder. Besides PDF as showed in the sample code
below, other formats including BMP, JPEG, PNG and TIFF are also supported. You
can also upload the images to your web server and database.
private void TrySavingFile(string fileName)
{
if (AlreadyAddedFile(fileName))
{
MessageBox.Show("Can't save over one of the source files.");
}
else
{
this.dynamicDotNetTwain1.SaveAllAsPDF(fileName);
}
}
- Read barcode information from the scanned documents.
this.textBox1.Text = "";
Result[] aryResult = this.dynamicDotNetTwain1.ReadBarcode(this.dynamicDotNetTwain1.CurrentImageIndexInBuffer, BarcodeFormat.All);
StringBuilder strText = new StringBuilder();
strText.AppendFormat(aryResult.Length + " total barcode" + (aryResult.Length == 1 ? "" : "s") + " found.\r\n");
for (int i = 0; i < aryResult.Length; i++)
{
Result objResult = aryResult[i];
strText.AppendFormat(" Result " + (i + 1) + "\r\n");
strText.AppendFormat(" BarcodeFormat: " + objResult.BarcodeFormat.ToString() + "\r\n");
strText.AppendFormat(" Text read: " + objResult.Text + "\r\n");
}
this.textBox1.Text = strText.ToString();
Distribution
To distribute the application to your end users, you only
need to distribute DynamicDotNetTwain.dll with your application. The DLL file
doesn’t need to be registered.
Dynamic .NET TWAIN also supports Xcopy deployment.
The distribution is royalty free.
Get Samples
To try out the above mentioned
features by yourself, you can download the 30-day free trial of Dynamic .NET
TWAIN below. The samples can be found in the installation folder of the SDK.
Dynamic
.NET TWAIN 30-day Free Trial
If you have any questions, you
can contact our support team at nettwain@dynamsoft.com.