TwainControl Platforms: Windows XP, Vista, 7, 8, Server from 2003 to 2012 Supports Barcode Decoding Linear: Interleaved 2/5, Industrial 2/5, Code 39, Code 39 Extended, Codabar, Code 11, Code 128, Code 128 Extended, EAN/UCC 128, UPC-E, UPC-A, EAN-8, EAN-13, Code 93, Code 93 Extended, DataBar Omnidirectional (RSS-14), DataBar Truncated (RSS-14 Truncated), DataBar Limited (RSS Limited), DataBar Stacked, DataBar Expanded, DataBar Expanded Stacked. 2D: PDF417 QRCode DataMatrix Aztec Code | ||
Twain Control InformationSee Twain Control documentation.TwainControl is extremely easy to use. You just add a few lines of code to your app and then you are ready to get images from any Twain device. Example 1. Acquire image and save it in the image file.
[VB6]
Dim twain As TwainControl Set twain = CreateObject("TwainControlAx.TwainControl.1") twain.Connect (twain.Devices.Item(0).Id) twain.GetImage twain.JPEGQuality = 90 twain.SaveImage ("c:\MyImage.jpg") Example 2. Acquire image and save it in the PDF file.
[VB6]
Dim twain As TwainControl Set twain = CreateObject("TwainControlAx.TwainControl.1") twain.Connect (twain.Devices.Item(0).Id) twain.GetImage twain.SavePDF ("c:\My.pdf") Example 3. Enumerate Twain devices.
[VB6]
For i = 0 To twain.Devices.length - 1 Dim dev As Device Set dev = twain.Devices.Item(i) MsgBox dev.Id & "-" & dev.ProductName Next i Example 4. Find barcode using Twain devices.
[VB6]
Call TwainControl1.Connect(TwainControl1.Devices.Item(Combo1.ListIndex).Id) TwainControl1.ResolutionX = 100 TwainControl1.ResolutionY = 100 TwainControl1.ImageType = itGrayScale TwainControl1.GetImage 'TwainControl1.BarcodeSetProperty "DataMatrixSymbologyID", 1 TwainControl1.BarcodeTypes = TwainControl1.BarcodeTypes Or DataMatrix Or PDF417 TwainControl1.BarcodeScan For i = 0 To TwainControl1.Barcodes.length - 1 Dim bc As Barcode Set bc = TwainControl1.Barcodes.Item(i) MsgBox bc.Text Next i Example 5. Gets image from Twain device.
[C#]
axTwainControl1 = new AxTwainControlAxLib.AxTwainControl(); axTwainControl1.Connect(axTwainControl1.Devices.item(0).Id); axTwainControl1.GetImage(); axTwainControl1.JPEGQuality = 50; axTwainControl1.SaveImage("c:\\1.jpg"); Example 6. Gets image from Twain device.
[Internet Explorer, vbscript]
<html> | ||
Copyright © 1999-2017, RKD Software & RKD System Inc., All rights reserved.
All trademarks mentioned are the property of their respective owners.