What Data Matrix Rectangular is
Data Matrix Rectangular is the rectangular-symbol variant of Data Matrix (ISO/IEC 16022): bwip-js implements it by calling its own Data Matrix encoder with the symbol shape fixed to rectangular instead of letting it also consider square sizes.
Generate it now
Enter any text or data to see a live preview.
Valid input
Data Matrix Rectangular accepts arbitrary text or binary data. Only 6 real rectangular sizes are actually selectable here -- 8x18, 8x32, 12x26, 12x36, 16x36, and 16x48 -- and bwip-js auto-selects the smallest of them that fits your payload; 18 other rectangular sizes exist in bwip-js's underlying size table but require the separate Data Matrix Rectangular Extension capability instead and are rejected under this one.
Key options
Supported options include "version" (fix one of the 6 real rectangular sizes instead of auto-selecting).
Output and printing
Export SVG for direct part-marking artwork or PNG for a quick proof.
Common uses
Data Matrix Rectangular suits narrow labels -- cable/wire wraps, small parts, PCB silkscreens -- where a square symbol would not fit the available width.
Example
See the live preview above, seeded with a bwip-js-verified example payload.
Size guidance
The 6 real selectable sizes range from 8x18 (smallest) to 16x48 (largest); each has a fixed data capacity, and bwip-js rejects a payload that exceeds it rather than silently switching to a larger size outside this set.
Troubleshooting
A rejected render usually means the payload exceeds the largest real selectable size (16x48), or an explicitly requested "version" is one of the 18 DMRE-only sizes this capability does not support -- shorten the payload or use the Data Matrix Rectangular Extension capability instead.
Related formats
Related formats: Data Matrix (the square-capable general form this capability delegates its drawing to) and Data Matrix Rectangular Extension (the wider DMRE size range).
FAQ
Why did my requested rectangular size get rejected?
Of bwip-js's full rectangular Data Matrix size table, only 6 sizes -- 8x18, 8x32, 12x26, 12x36, 16x36, 16x48 -- are selectable from this capability. The other 18 rectangular sizes require the separate "dmre" (Data Matrix Rectangular Extension) mode, which this capability does not enable.