Barcode Reader SDK Technical Questions

[SDK] A barcode was not decoded. Why?
Our barcode reading engine uses various methods to achieve maximum recognition. But sometimes it is impossible to decode a barcode due to its poor quality. Send us this image, it may help us improve our software.
[SDK] 1 extra character in the code
We have used the SDK in our application to decode the Barcode(code-128)/QRCode, but it has decoded the code and appended 1 extra character. In our case:
Same has happened with 1 other code in which extra 'D' is appended by the SDK at the end of the code.
What can be the possible reason for this? Please explain and suggest the solution.
Some barcode types contain check digit. Our SDK transfers the whole barcode with 1 (or 2 for Code93) extra character. You can change this behaviour using LinearShowCheckDigit property
[SDK] How to find an undecoded barcode (or add barcode type)?
If a barcode is recognized but cannot be decoded can that information be made available from this SDK? For example, a smudge on the ticket is present. What type of information is provided back?
SDK for each platform contains BarcodeTypes property, you should to add required barcode type: The BarcodeTypes is binary combination of SDK supported types.
dec.BarcodeTypes = 0x40000000|0x08000000; //find QRCode and unrecognized QRCode
SDK returns all information as for decoded barcode excluding barcode text.
[SDK] Can I use the image just from the device memory?
After checked some document on your web, I have a question. Can I use the image just from the device memory? For example my source from the device:
IplImage * videoImgLearn; 
videoImgLearn = cvCreateImage (cvSize (m_nSizeX[0], m_nSizeY[0]), IPL_DEPTH_8U, 1);
videoImgLearn->imageData = (char*) m_pcImageMemory[0];
m_pcImageMemory[0] is from the device memory.
So, Can I directly use your method to send the m_pcImageMemory[0]? Would you pls give me an example?
[Windows SDK]
If your image in memory already converted to gray map you can use DecodeGrayMap.
If your image is encoded (jpg, tiff, bmp, etc.) you can use DecodeStream
The SDK examples contains source code how to use these methods.
[Android, Java SDK]
byte[] data; //contains gray scale image
DecodingResult[] decRes = mbr.Decode(data, FrameWidth, FrameHeight, 0, 0, 0, 0);
[Linux/MacOS SDK]
int res = Decode(&m_pcImageMemory[0], width, height, 0);
[SDK. Windows] My file contains several barcodes, but only one barcode was decoded. Why did it happen?
First of all, check whether you use the standard or professional edition. The standard edition decodes only one barcode in a file.
If you use the professional edition, check how the properties are set. By default, this property is set to 1, i.e. only one barcode is decoded in a file. For example, if you want to decode up to 5 barcodes, set the required property to 5.
[SDK. Windows] Cannot decode PDF file
I download the demo (I use the vb6 project1 demo). I need to recognize a barcode in an image embedded in a PDF file. But when I tried to decode the PDF file, the demo stops with the message 'Error: PDF library not found' in the
cnt = BarcodeDecoder1.DecodeFile(Text1.Text)
You need to copy "qpdf.dll" file in folder where your VB6 application .exe file placed. The "qpdf.dll" you can find in
C:\Program Files\RKD\BarcodeReaderAx\32bit or 64 bit
or where you installed the SDK.
[SDK. Windows] How to use DecodeStream method?
I've got DecodeFile method to work fine with QR Code. But I can't make the DecodeStream to work. What should be the data structure required for the FileStream input? In the documentation said array of bytes, so I just send it the bitmap file data in bytes, but doesn't seem to work.
DecodeStream gets one dimension byte array. This byte array should to contain the whole image file (jpg, bmp, png, etc.) like on the disk. See VB6 example
Dim bytes() As Byte

bytes = ReadFile("c:\MyFolder\linear-7.gif")

c = BarcodeDecoder1.DecodeStream(bytes)

For i = 0 To BarcodeDecoder1.Barcodes.length - 1
	Dim bc As Barcode
	Set bc = BarcodeDecoder1.Barcodes.Item(i)
	txt = bc.Text
	MsgBox txt
Next i
[SDK. Windows] Is there a way to integrate the SDK into a WPF (Windows Presentation Foundation)?
Yes you can use it in WPF application. Our SDK contains WPF app source code here:
../Program Files/RKD/BarcodeReaderAx/32bit/Examples/C#/WpfApplication1
[SDK. Windows] How to activate in silent mode?
Can you please provide instructions for running the activation program in silent mode?
You have several ways to do it.
  • You can Install and Activate at once using our installation program.
    BarcodeReader.exe /VERYSILENT /t 030-XXXXXXXX
    030-XXXXXXXX is your Activation Key

  • If you need just to activate then start ActivateSoft program like
    ActivateSoft.exe /t 030-XXXXXXXX
    ActivateSoft.exe /v /t 030-XXXXXXXX
    /v - start the ActivateSoft.exe program in visible mode.

  • You can request the key from our activation server via HTTPS and save it in Windows registry. We send the C# source code on request.
[SDK. Windows] How to use your Barcode Reader SDK in Java application?
How to use your Barcode Reader SDK in Java application?

The following information is only for Windows platform. You can still use it in Windows application. But now we recommend the native (for Windows/Linux/MacOS) Java SDK.

To use Barcode Reader ActiveX in a Java application, you need to use special software to connect COM and Java for instance, JACOB. This combination will only work on a Windows machine. Below is an example of a Java application that calls the methods of our barcode decoding SDK.

import com.jacob.activeX.*;

public class BarcodeReader
  public static void main(String args[])
    System.out.println("\nUsing Barcode Reader SDK in Java\n");

      ActiveXComponent barcodeDecoder = new ActiveXComponent("BarcodeReader.BarcodeDecoder");

      barcodeDecoder.setProperty("LinearFindBarcodes", new Variant(7));

      int cBarcodes =, "DecodeFile", 
        new Variant("c:\\barcodes.jpg")).getInt();
      System.out.println("Decoded barcodes: " + cBarcodes + "\n");

      if (cBarcodes != 0)
        int i;
        Dispatch barcodeList = barcodeDecoder.getProperty("Barcodes").toDispatch();

        for (i = 0; i < cBarcodes; ++i)
          Dispatch barcode =, "item", new Variant(i)).toDispatch();
          System.out.println( Dispatch.get(barcode, "Text").getString() );
    catch (Exception e)

Compiling Java application with Barcode Reader SDK

Java application as Barcode Reader

[SDK. Android] Missing a few characters. Why?
We are looking for barcode reader SDK on the Android. We gave a try your Android app. It seems it will get the barcode but it seems missing a few characters. For example, the full barcode is "C4AX1012000158". After scanning, it will get "**AX1012000158". Do you know why?
This is demo limitation. You should to activate the app. In production mode you will get the whole barcode text.
[SDK. Linux] How to use under Linux/MacOS?
On the list of supported platforms, it shows Linux. It looks like you only provide a DLL component. How would I run this under Linux? Is there a performance degradation because of this? And how would this run under Mac OSX?
We provide DLL only for Windows platform. We have the native 32&64 bit libraries for Linux and MacOS so you can use it without any problem.
[SDK. Java. Windows/Linux/MacOS] Cannot find any barcode using Java SDK.
I'm trying to use the following Java code.
Path path = Paths.get("/home/mike/Desktop/java/img_lin.pgm/barcode.jpg");
byte[] data = Files.readAllBytes(path);

DecoderParameters dp = new DecoderParameters();
dp.barcodeTypes = DecoderParameters.ST_CODE128|DecoderParameters.ST_CODE39;

DecodingResult res[] = dec.DecodePgm(data, 0, 0, 0, 0);

But it doesn't find any barcode in my image. Can you explain why?
You are trying to use the DecodePgm method. This method accepts only PGM (portable gray map) images. First you need to convert your jpeg, png, bmp (etc.) file in PGM or gray map. You can do it "manually" (for example, convert your image in RGB24 then using red, green and blue pixel components calculate the gray byte) or using Java methods (see the following code).
[SDK. Java]
BarcodeReaderWrapper dec = new BarcodeReaderWrapper();
      System.out.println(String.format("Error: %d", dec.decError));

DecoderParameters dp = new DecoderParameters();
dp.uiLinearFindBarcodes = 7;
dp.barcodeTypes = DecoderParameters.ST_CODE128|DecoderParameters.ST_CODE39|DecoderParameters.ST_INTERL25|

BufferedImage in = new File("/home/mike/Desktop/Images/linear-4.jpg") );
BufferedImage newImage = new BufferedImage(in.getWidth(), in.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
Graphics2D g = newImage.createGraphics();
g.drawImage(in, 0, 0, null);

DataBufferByte buffer = (DataBufferByte) newImage.getRaster().getDataBuffer();
byte[] data = buffer.getData();
DecodingResult res[] = dec.Decode(data, in.getWidth(), in.getHeight(), 0, 0, 0, 0);

for(int j=0; res!=null && j < res.length; ++j)
	String sBarcode = new String( res[j].data, 0, res[j].data.length );
[BarcodeScanner. Windows] How to use BarcodeScanner app with Python?
We use your Barcode Scanner as "Barcode Scanner Automation". It's possible to send us a code example that allows to handle decoded Barcodes with a Python script ?
Please see the following Python code.
import win32com.client  #
import pythoncom
import time

class EvHandler:
    def OnBarcodeIn(self, _1):

scanner = win32com.client.DispatchWithEvents("BarcodeScanner.Reader", EvHandler)
scanner.Visible = True

while 1:
    time.sleep(0.8) # Don't use up all our CPU checking constantly
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 (Compact, Micro), QRCode (Micro), DataMatrix, Aztec Code
Windows 32 & 64, 10(UWP), Phone 8/8.1/10,Windows Mobile, Android, Linux, Raspberry Pi, MacOS, iPhone