🖨️ RawBT Example 04 - Barcode Printing
📌 Note: Barcode printing requires a compatible thermal printer that supports ESC/POS barcode
commands.
Supported Barcode Types:
| Type |
Description |
Example Data |
| CODE128 |
Most versatile, alphanumeric |
ABC123 |
| EAN13 |
13-digit product codes |
5901234123457 |
| EAN8 |
8-digit product codes |
96385074 |
| UPC_A |
12-digit US product codes |
012345678905 |
| CODE39 |
Alphanumeric industrial |
CODE39 |
| ITF |
Interleaved 2 of 5 |
1234567890 |
Basic Usage:
// Simple barcode
job.barcode('123456789', 'CODE128');
// With options
job.barcode('123456789', 'CODE128', {
width: 2, // 1-6 (barcode width)
height: 60, // Height in dots
position: 2 // 0=none, 1=above, 2=below, 3=both
});
Try Different Barcodes:
Custom Barcode: