dmtxwrite
TLDR
Encode text as Data Matrix barcode
SYNOPSIS
dmtxwrite [options] [-o output]
DESCRIPTION
dmtxwrite generates Data Matrix barcode images from input text or binary data. Data Matrix barcodes are 2D square or rectangular patterns that encode data with built-in error correction.
The tool reads data from standard input and produces images in various formats. Symbol size is automatically chosen based on data length, or can be specified manually. Error correction is automatically included per the Data Matrix standard.
Data Matrix barcodes are widely used for small item marking (electronics, medical devices), logistics, and anywhere high data density is needed in a small space.
PARAMETERS
-o, --output file
Output filename (format from extension).-d, --resolution dpi
Image resolution in DPI.-m, --module pixels
Module (cell) size in pixels.-M, --margin pixels
Margin size in pixels.-s, --symbol-size size
Symbol size: s(quare), r(ectangle), or NxN.-e, --encoding scheme
Encoding scheme: b(est), a(scii), c(40), etc.-f, --format format
Output format: png, tif, gif, pdf, svg.-b, --background color
Background color.-c, --foreground color
Foreground color.-v, --verbose
Verbose output.
SYMBOL SIZES
s: Automatic square selection
r: Automatic rectangle selection
10x10 to 144x144: Specific square sizes
8x18 to 16x48: Specific rectangle sizes
CAVEATS
Data capacity depends on symbol size and encoding; larger symbols hold more data. Binary data encoding may require specific encoding schemes. Very small module sizes may not scan reliably. Some scanners have difficulty with rectangular Data Matrix codes.
HISTORY
dmtxwrite is part of libdmtx, created by Mike Laughton in 2006. The library provides open-source tools for Data Matrix barcode generation and reading. Data Matrix is an ISO/IEC 16022 standard, originally developed for industrial marking applications.


