bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

How to read binary barcode data

admin May 17, 2022 Documentation, Knowledge Base, Software Development Kits

Most barcodes store text information but 2-D barcodes (such as QR-Code, Datamatrix and PDF-417) can also be used to store binary data. This article explains how to get at the binary data using the Softek Barcode Reader Toolkit. 2-D barcodes don’t have any way of telling the barcode reader how they’ve been encoded so it’s not possible to automatically tell whether they represent a string (say of UTF-8 data) or binary data.

You can access the binary data in a 2-D barcode using the GetRawBarString or GetRawBarStringBytes functions rather than the GetBarString function.

Important note: Do not change the default value of the Encoding property if you are going to use this function.

C++

int __stdcall mtGetRawBarString (HANDLE hBarcode, short index, LPSTR pBarCode, int length)

Example:

…
int n = mtScanBarCode(hBarcode, filePath);
for (int i = 1; i <= n; i++)
{
char data[BUFSIZ];
int l = mtGetRawBarString(hBarcode, i, data, BUFSIZ);
…
}

C#

byte[] GetRawBarStringBytes(int nBarcode)

Example:

…
int n = barcode.ScanBarCode(FilePath.Text);
for (int i = 1; i <= nBarCode; i++)
{
byte[] b = barcode.GetRawBarStringBytes(i);
}

← BardecodeFiler Version 2.7.1 Released
Updates for both the Windows and Linux versions of the SDK →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved