Home › Forums › TWAIN Classic › How do I read barcode text?
- This topic has 14 replies, 13 voices, and was last updated 9 years, 2 months ago by barcelomn.
- AuthorPosts
Howdy,
I’m new to TWAIN programming. I am starting a C++ project to use a Fujitsu scanner (5750c) to scan documents that may contain a barcode. I would like to read the text of the barcode as I scan it.
There is a value TWEI_BARCODETEXT that looks like it is what I need but I can’t find anything on how to use it.
What is the format of the call? I’m using the twaintest program as a base for the code. Is the CallTwainProc the correct entry?
BOOL CTwain::CallTwainProc(pTW_IDENTITY pOrigin,pTW_IDENTITY
pDest, TW_UINT32 DG,TW_UINT16 DAT,
TW_UINT16 MSG, TW_MEMREF pData)If so, what do I use for the DAT and MSG? I am guessing the pData is related to TW_MEMORY.
Thanks in advance.
the dat will be ExtImageInfo and the Msg will be Get.
I have a sample in vb.net if you’re interested (sorry no c++ samples yet) that runs thru an enum of all of the standard twei over at codeplex/opentwain the method name in the sample is GatherAllStandardExtImageInfo and it is in the file cTwain.vb
Thanks for pointing me to the code.
I will have to sort out how to convert the VB to C++ but that should be possible.
gabe wrote:the dat will be ExtImageInfo and the Msg will be Get.I have a sample in vb.net if you’re interested (sorry no c++ samples yet) that runs thru an enum of all of the standard twei over at codeplex/opentwain the method name in the sample is GatherAllStandardExtImageInfo and it is in the file cTwain.vb
as per you say you have a vb.net code for barcode recognisation, i m also working on the project which needs this code so, can you send me this code, it will be helpful to me…
below is my id :->
The TWAIN2 Sample Application displays the ExtImageInfo including barcode strings from the scanner.
It will either retrieve all advertised ExtImageInfo or if the DS does not support ICAP_SUPPORTEDEXTIMAGEINFO it will attempt a small set of known types that includes TWEI_BARCODETEXT.
https://sourceforge.net/projects/twain-samples/files/TWAIN%202%20Sample%20Application/
Regards,
Jim Watters**************************************************
JFL Peripheral Solutions Inc.
http://www.jflinc.com/
Your Expert Source of Custom Software and Services
for TWAIN Applications, Data Sources,
Peripheral Drivers and Support Software.
**************************************************Hi, nicky. I find some sample codes for barcode recognition in VB.NET.
QR Code:Dim barcodes() As string = BarcodeScanner.Scan(“qr-code-barcode-image.gif”, BarcodeType.QRCode);
Code 39: Dim barcodes() As string = BarcodeScanner.Scan(“code-39-barcode-image.gif”, BarcodeType.Code39);@marioclimn wrote:
Hi, nicky. I find some sample codes for barcode recognition in VB.NET.
QR Code:Dim barcodes() As string = BarcodeScanner.Scan(“qr-code-barcode-image.gif”, BarcodeType.QRCode);
Code 39: Dim barcodes() As string = BarcodeScanner.Scan(“code-39-barcode-image.gif”, BarcodeType.Code39);thanx for sharing!i’m also interested in whether it helps!
@cindy313 wrote:
@marioclimn wrote:
Hi, nicky. I find some sample codes for barcode recognition in VB.NET.
QR Code:Dim barcodes() As string = BarcodeScanner.Scan(“qr-code-barcode-image.gif”, BarcodeType.QRCode);
Code 39: Dim barcodes() As string = BarcodeScanner.Scan(“code-39-barcode-image.gif”, BarcodeType.Code39);thanx for sharing!i’m also interested in whether it helps!
Have you tried the sample code? It seems that it does not work!!!
here,found on google,you may see the barcode reader code sample in vb.net of interleaved 2 of 5,and the code 128 barcode,just take it for example
Hey,jane313. Yes, you are right, I can find many barcode scanning SDKs for reading barcode text by googling, but none of them can work with twain programming project. So if you can some twain-compatible barcode reader, would you please give me some links? thanks in advance.
@jane313 wrote:
here,found on google,you may see the barcode reader code sample in vb.net of interleaved 2 of 5,and the code 128 barcode,just take it for example
Hi, jane313.
The Twain Scanner is of great help to the barcode reading work. I am also testing about the related programs these days. We can have some communication later.Best regards,
ArronI am developing twain scanning application and interested in barcode scanner integration in asp.net.
Is it possible to do a barcode reading from the browser without sending the image to the server?Thanks in advance
Sarah@sarahwhite0 wrote:
I am developing twain scanning application and interested in barcode scanner integration in asp.net.
Is it possible to do a barcode reading from the browser without sending the image to the server?Thanks in advance
SarahHi, sarahwhite0.
Yup indeed, I agree with you and I hope you success. Good luck.Best regards,
Peter@marioclimn wrote:
Hi, nicky. I find some sample codes for barcode recognition in VB.NET.
QR Code:Dim barcodes() As string = BarcodeScanner.Scan(“qr-code-barcode-image.gif”, BarcodeType.QRCode);
Code 39: Dim barcodes() As string = BarcodeScanner.Scan(“code-39-barcode-image.gif”, BarcodeType.Code39);Hi, marioclimn
Thank you so much. 😀@sarahwhite0 wrote:
I am developing twain scanning application and interested in barcode scanner integration in asp.net.
Is it possible to do a barcode reading from the browser without sending the image to the server?Thanks in advance
SarahI believe this is the right solution for you.
- AuthorPosts