Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Tue May 20, 2014 3:51 pm

Hi,
I wonder, can you per example take a picture of a codebar with your cellphone and scan it with the methods in the libraries or
you are forced to generate a codebar image to be able to scan it? Resuming, can you scan from any images or only the one generate by methods from the spire.barcode library?
thanks!

cottohn
 
Posts: 2
Joined: Tue May 20, 2014 3:44 pm

Wed May 21, 2014 3:05 am

Hello,

Spire.Barcode can meet your need. Here is a demo:
I take a picture of barcode of this book “The Hidden Reality: Parallel Universes and the Deep Laws of the Cosmos” in Amazon and save it as “barcode.png”. Check this picture in attachment. Then I use the following code to scan it.
Code: Select all
string data = Spire.Barcode.BarcodeScanner.ScanOne("barcode.png",true);
Console.WriteLine("The scanning result is: {0}.", data);
Console.ReadLine();

Check the results in the attachment.
If you have any questions, welcome to get it back to us.

Thanks and Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Wed May 21, 2014 4:43 pm

perfect! this is very appreciated.
amazing support you have here.
Keep the good work!
thank you.

cottohn
 
Posts: 2
Joined: Tue May 20, 2014 3:44 pm

Fri Aug 01, 2014 9:38 am

How can I do it for Visual C#... and is it possible to get it from picturebox? thanks in advance

here is my code:
Code: Select all
string barcode = Spire.Barcode.BarcodeScanner.ScanOne("barkod.png", true);
//if (barcodes.Length > 0)
 this.txt_prebaruvanje.Text = barcode;


I get error here in this part: Spire.Barcode.BarcodeScanner.ScanOne("barkod.png", true); it says No overload for method 'ScanOne takes 2 arguments

albpower
 
Posts: 3
Joined: Fri Aug 01, 2014 9:33 am

Mon Aug 04, 2014 7:00 am

Hello,

Please refer to the following code:
//string data = Spire.Barcode.BarcodeScanner.ScanOne(@"..\..\barcode.png");

Bitmap img = (Bitmap)pictureBox1.Image;
string data = Spire.Barcode.BarcodeScanner.ScanOne(img);
MessageBox.Show(data);
If you get any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Fri Aug 08, 2014 12:30 pm

Benjamin Du wrote:Hello,

Please refer to the following code:
//string data = Spire.Barcode.BarcodeScanner.ScanOne(@"..\..\barcode.png");

Bitmap img = (Bitmap)pictureBox1.Image;
string data = Spire.Barcode.BarcodeScanner.ScanOne(img);
MessageBox.Show(data);
If you get any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team


I have a problem I am generating QR Codes properly from the Entry Form and I tried with my iPhone QR Code scanner and it is able to read the QR code from the Screen and from the paper. In the second form (Exit Form) I'm trying to scan that QR Code from the paper using camera snapshot which I save to picturebox at the bottom but it gives me error it is something wrong with the code I'm using or the quality of the Captured images is not good for that it can't recognize it properly..?

PS: At the attachments below I uploaded both a screenshot from the Error and from the captured image from which I tried to scan.

albpower
 
Posts: 3
Joined: Fri Aug 01, 2014 9:33 am

Mon Aug 11, 2014 3:51 am

Hello,

The quality of the image is not good enough for Spire.Barcode to read. Please try to improve the quality of the captured images.
If you get any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Mon Aug 11, 2014 10:26 am

Benjamin Du wrote:Hello,

The quality of the image is not good enough for Spire.Barcode to read. Please try to improve the quality of the captured images.
If you get any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team


I am using DynamicDotNetTwain library to get the code from scanner and I believe the quality can't be better but I don't know how to place the image from .Net Twain control to PictureBox so i can convert to Bitmap and then try to recognize it.

albpower
 
Posts: 3
Joined: Fri Aug 01, 2014 9:33 am

Thu Aug 14, 2014 12:09 pm

Can someone help me to give code for how get scanner data in textbox...but directly from scan device...


Thanks in advance

Peeyush
 
Posts: 1
Joined: Wed Aug 06, 2014 4:53 am

Fri Aug 15, 2014 2:41 am

Dear Peeyush,

Thanks for your inquiry.

Please refer to the following code:
Code: Select all
string fileName = this.textBox1.Text;//Your barcode image path
string data = BarcodeScanner.ScanOne(fileName);

If i misunderstand your problem,please point it out.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Sep 09, 2015 2:10 pm

Hello,

I just downloaded the bardcode scanner sdk. I have studied the examples and can understand that when the scan button is clicked the image displayed in the image box ("barcode.png") is read into text.

Here is my question, I am building a POS application, how to i capture the barcode on a product into the image box, using a hand-held scanner so that i can read it and fetch the price of the corresponding product from database.

Thanks

Emmado
 
Posts: 1
Joined: Wed Sep 09, 2015 1:04 pm

Thu Sep 10, 2015 7:47 am

Hello,

Thanks for your inquiry.
Please first find save path of the scanning image in settings of your hand-held scanner software.
Then change the path of corresponding code in your application.
Code: Select all
string datas = BarcodeScanner.ScanOne(@"scanning image save path"+"imageName.png");

Now you can read it.
Finally fetch the price of the corresponding product from database.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Wed Mar 27, 2019 6:58 pm

hi how can i only read some barcode family ? example VB.NET :

Dim CodiciRicettaLetti() As String = Spire.Barcode.BarcodeScanner.Scan(BmpTmp, BarCodeType.Code39 OR BarCodeType.Code128)

the "OR" operator is allowed ?

Best Regards
Alex

farmacia.pellegrino@live.it
 
Posts: 3
Joined: Thu Jan 17, 2019 9:48 am

Thu Mar 28, 2019 5:59 am

Hi Alex,

Thank you for contacting us.
The "OR" operator is not allowed, you need to scan the different barcode types respectively. If you have other questions, just feel free to write back.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Thu Mar 28, 2019 11:00 am

Hi Nina

You can give me an example on vb.net

Thank you
Alex

farmacia.pellegrino@live.it
 
Posts: 3
Joined: Thu Jan 17, 2019 9:48 am

Return to Spire.BarCode