TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

How do I read barcode text?

Forums › TWAIN Classic › How do I read barcode text?

  • This topic has 14 replies, 13 voices, and was last updated 6 years, 1 month ago by barcelomn.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • July 9, 2007 at 3:57 pm #22168 Reply
    fperry
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    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.

    July 11, 2007 at 2:50 pm #23872 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    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

    July 13, 2007 at 4:54 pm #23873 Reply
    fperry
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    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.

    February 15, 2010 at 9:00 am #23874 Reply
    nicky
    Participant
    • Topics - 3
    • Replies - 1
    • Total Posts - 4
    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 :->

    nicky_mk007@yahoo.co.in

    February 16, 2010 at 11:49 pm #23875 Reply
    jimwatters
    Participant
    • Topics - 2
    • Replies - 72
    • Total Posts - 74

    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.
    **************************************************

    September 12, 2013 at 8:08 am #23876 Reply
    marioclimn
    Participant
    • Topics - 0
    • Replies - 1
    • Total Posts - 1

    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);

    October 9, 2013 at 2:56 am #23877 Reply
    cindy313
    Participant
    • Topics - 0
    • Replies - 7
    • Total Posts - 7

    @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!

    October 23, 2013 at 7:16 am #23878 Reply
    matesew
    Participant
    • Topics - 0
    • Replies - 2
    • Total Posts - 2

    @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!!!

    November 1, 2013 at 8:54 am #23879 Reply
    jane313
    Participant
    • Topics - 0
    • Replies - 7
    • Total Posts - 7

    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

    November 8, 2013 at 6:48 am #23880 Reply
    ericward
    Participant
    • Topics - 0
    • Replies - 7
    • Total Posts - 7

    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.

    December 3, 2013 at 8:03 am #23881 Reply
    peterlee
    Participant
    • Topics - 0
    • Replies - 24
    • Total Posts - 24

    @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,
    Arron

    June 3, 2014 at 6:51 am #23882 Reply
    sarahwhite0
    Participant
    • Topics - 0
    • Replies - 2
    • Total Posts - 2

    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
    Sarah

    June 26, 2014 at 6:55 am #23883 Reply
    peterlee
    Participant
    • Topics - 0
    • Replies - 24
    • Total Posts - 24

    @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
    Sarah

    Hi, sarahwhite0.
    Yup indeed, I agree with you and I hope you success. Good luck.

    Best regards,
    Peter

    February 12, 2015 at 3:30 am #23884 Reply
    abbyleem3@yahoo.com
    Participant
    • Topics - 0
    • Replies - 9
    • Total Posts - 9

    @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. 😀

    February 28, 2015 at 2:00 am #23885 Reply
    barcelomn
    Participant
    • Topics - 0
    • Replies - 5
    • Total Posts - 5

    @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
    Sarah

    I believe this is the right solution for you.

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: How do I read barcode text?
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • TWAIN for dental imaging integration
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.