QZ Tray Barcode Test

This page tests if QZ Tray is properly configured for barcode printing from the LIS system.

Status logs will appear here...
`; log('Sending test barcode to printer...'); qz.websocket.connect() .then(() => qz.printers.getDefault()) .then((printer) => { if (!printer) { throw new Error('No default printer found'); } log(`Using printer: ${printer}`); // Configure the print job const config = qz.configs.create(printer, { size: {width: 1, height: 0.8}, units: 'in', orientation: 'portrait' }); // Print the HTML content return qz.print(config, [{ type: 'html', format: 'plain', data: labelHtml }]); }) .then(() => { log('✓ Test barcode sent to printer successfully!', 'success'); log('Check your printer for the test label', 'info'); }) .catch((err) => { log(`Error printing test barcode: ${err}`, 'error'); }) .finally(() => { qz.websocket.disconnect(); }); } catch (err) { log(`Error generating barcode: ${err}`, 'error'); } });