Barcode scan with Mobile or Desktop Camera

As the title suggests i am trying to integrate barcode scanning using mobile/desktop camera below is the picture of what i have achieved so far

the library i am using is QuaggaJS and it doesnt seem to work very nice or smooth, can anyone have done anything like this before or can suggest a better library for this purpose, also i have noticed that its not working on the mobile app, what can i do to make it work on mobile also?



Is camera used designed for scanning barcode? Is this camera able to scan and fetch barcode value in your system? If yes, then it should work fine in your ERPNext account as well. Barcode scanner needs a compatibilty with your system rather than ERPNext. If it’s working fine on your machine, then you can also use it in ERPNext.


No experience with quaggajs but some experience on the base library. Zxing They recommend a 10Mp image for universal decode on their web app.

You should also check the setting on your camera. even with a 12 mp camera, When it was set to 2 MP it was frustrating to get a 1D Scan and impossible to get a 2D UPC-E scan. This bug was there about a year ago. Don’t know if that bug has been fixed. But it is worth tinkering with it anyway.

Also Zxing has a popular opensource moble app you can look at as reference.

thanks for the suggestion ill definitely try and post comments here

i agree, thats y i asked for library suggestions if anyone have done anything like this before, im using normal mobile camera

I did a little reading on the zxing Google Groups.

Found this section that would help you make your reader scan faster.!searchin/zxing/speed|sort:relevance
also I was wrong about the megapixel limits. They don’t mater that much according to the author of Zxing

Hi @Wasif_Khalil or anyone,

can teach me how to implement quaggajs? I aim is to create a button and when user click the button, it will access smartphone native camera app to perfrom scanning.

Lets say my custom button name scan_barcode, then what should i write in custom script for this button to access smartphone native carema app?

I do looks through the QuaggaJS site and I see they use getusermedia but I have no idea how to include those script to my buttons.

your help is much appreciated.

1 Like