Linux Barcode Scanner
Integrate the Scanbot Linux Barcode Scanner SDK into your C, Java, Python, and Node.js applications. Deploy fast, reliable barcode scanning on your servers, embedded systems, and edge devices running Debian, Ubuntu, Raspberry Pi OS, or other Linux distributions.
Trusted by
400+
global
industry leaders
Barcode scanning for warehouse and logistics systems
Read barcodes from live camera streams and image files anywhere in your warehouse, without handheld scanners or a network connection. The SDK returns barcode values as structured data, ready for your WMS, ERP, or inventory database.
Barcode scanning in challenging conditions
The Linux Barcode Scanner SDK is designed to perform efficiently on low-power platforms like the Raspberry Pi, even in challenging conditions such as:
- Low-light environments
- Damaged barcodes
- Very small or distant barcodes
On-device intelligence
100% offline – no servers, no tracking, complete data security.
Fast.
Very fast.
Every scan happens in
Integrate a fast and reliable Linux Barcode Scanner with C, Java, Python, and Node.js
The Scanbot Linux Barcode Scanner SDK is a headless tool for fast and reliable barcode scanning on all Linux distributions with glibc version 2.27 or higher. Its core API is written in pure C, with convenient wrappers for Java, Python, and Node.js provided, so it slots into a wide variety of environments. On NVIDIA Jetson devices, you can enable GPU acceleration for even higher throughput.
It is built for high-volume warehouse and logistics scanning on robots, drones, fixed-mount stations, and edge devices. Cypher Robotics, for example, uses it on inventory-counting robots that scan shelf labels offline and sync with the warehouse database at the docking station.
Scanning barcodes in PDF files? Use the Barcode Module of the Apryse Server SDK to detect and extract barcodes from PDF documents.
Technical requirements
The Scanbot Linux Barcode Scanner SDK supports the following platforms:
- Linux systems with glibc ≥ 2.27 (e.g., Ubuntu ≥ 18.04, Debian ≥ 11, Raspberry Pi OS 64-bit)
- NVIDIA Jetson devices
-
- CPU only: all Jetson devices
-
- GPU acceleration: Jetson AGX Orin Series, Jetson Orin NX Series, Jetson Orin Nano Series
-
-
- Jetpack 6.1
-
-
-
- CUDA 12.6
-
-
-
- TensorRT 10.3
-
- Raspberry Pi devices
-
- Pi 4 series supported, but not recommended
-
- Pi 5 series recommended
Quick start guide: Implementing a Python barcode scanner
Here’s how you can build a lightweight barcode scanner with Python. The command-line interface accepts a single image path as input and the Scanbot SDK license key is embedded directly in the source code.
Head over to the Linux Barcode Scanner SDK documentation for quick start guides for C, Java, and Node.js.
Step 1: Install Python and OpenCV
sudo apt update
sudo apt install -y python3-venv python3-opencv
If you want to use GPU acceleration on an NVIDIA Jetson, you’ll need at least Jetpack 6.1, CUDA 12.6, and TensorRT 10.3.
sudo apt install -y nvidia-l4t-cuda libnvinfer10 libnvinfer-plugin10 libnvonnxparsers10
Step 2: Install the Scanbot SDK
Create and activate a virtual environment.
python3 -m venv .env --system-site-packages
source .env/bin/activate
pip install --upgrade pip setuptools wheel
When installing the Scanbot SDK, replace <SCANBOT_SDK_VERSION> with the version number you want to install.
For ARM64:
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_aarch64.whl
For x86_64:
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_x86_64.whl
You can verify the installation like this:
python -c "import scanbotsdk; print('scanbotsdk OK')"
On an NVIDIA Jetson, you can temporarily max out the clocks and fan to avoid throttling.
sudo jetson_clocks --store
sudo jetson_clocks
sudo jetson_clocks --restore
Now create a minimal project folder with a single entry-point script.
mkdir -p barcode-quickstart-python && \
touch barcode-quickstart-python/main.py
Step 3: Initialize the Scanbot SDK
Before using any feature of the Scanbot SDK in Python, initialize the SDK.
import scanbotsdk
from scanbotsdk import LicenseStatus
SCANBOT_LICENSE_KEY = "<SCANBOTSDK-LICENSE-KEY>"
def initialize_sdk() -> None:
scanbotsdk.initialize(SCANBOT_LICENSE_KEY)
license_info = scanbotsdk.get_license_info()
print(f"License Status: {license_info.status}")
if license_info.status != LicenseStatus.OKAY:
raise SystemExit("Invalid or expired license. Exiting.")
Step 4: Create and run the Barcode Scanner
After successful initialization, create a scanner configuration and run it on an ImageRef.
def run_barcode_scanner(image: ImageRef):
config = BarcodeScannerConfiguration()
scanner = BarcodeScanner(configuration=config)
result = scanner.run(image=image)
if not result.barcodes:
print("No barcodes found.")
return
for idx, barcode in enumerate(result.barcodes, 1):
print(f"{idx}) {barcode.text} [{barcode.format}]")
Here’s the complete example:
import sys
import scanbotsdk
from scanbotsdk import (
LicenseStatus,
DeviceSession,
ImageRef,
BarcodeScanner,
BarcodeScannerConfiguration,
)
SCANBOT_LICENSE_KEY = "<SCANBOTSDK-LICENSE-KEY>"
def initialize_sdk() -> None:
scanbotsdk.initialize(SCANBOT_LICENSE_KEY)
license_info = scanbotsdk.get_license_info()
print(f"License Status: {license_info.status}")
if license_info.status != LicenseStatus.OKAY:
raise SystemExit("Invalid or expired license. Exiting.")
def run_barcode_scanner(image: ImageRef) -> None:
config = BarcodeScannerConfiguration()
scanner = BarcodeScanner(configuration=config )
result = scanner.run(image=image)
if not result.barcodes:
print("No barcodes found.")
return
for idx, barcode in enumerate(result.barcodes, 1):
print(f"{idx}) {barcode.text} [{barcode.format}]")
def main():
if len(sys.argv) < 2:
print("Usage: python main.py <image_path>")
return
image_path = sys.argv[1]
initialize_sdk()
image = ImageRef.from_path(image_path)
run_barcode_scanner(image)
if __name__ == "__main__":
main()
Run the script like this:
python main.py /path/to/image_with_barcodes.jpg
That’s it! You’ve built a minimal barcode scanner in Python on Linux.
In this quick start guide, we use the SDK’s default scanner settings. However, you can freely customize the configuration, supported barcode types, and performance options.
Frequently Asked Questions
What hardware does the Linux Barcode Scanner SDK run on?
The Scanbot Linux Barcode Scanner SDK runs on any x86_64 or ARM64 Linux system with glibc 2.27 or higher, including Raspberry Pi 5 and NVIDIA Jetson devices. On Jetson Orin devices you can enable GPU acceleration.
Which solution should I use for reading barcodes in PDF files?
For extracting barcodes inside PDF documents, use the Apryse Server SDK Barcode Module, which runs on Linux and Windows and returns results as JSON.