Implement professional PDF-based label printing for boxes and locations
- Replace ZPL/image-based printing with ReportLab PDF generation - Box labels: 8cm x 5cm landscape with 'BOX Nr:' header and CODE128 barcode - Location labels: 8cm x 5cm landscape with 'Location nr:' header and CODE128 barcode - Add /generate_box_label_pdf endpoint using same approach as print_module - Update FG scan quick box creation to use PDF printing with default printer - Switch from CDN QZ Tray to local patched version for pairing-key auth - Improve error handling and logging throughout printing workflow - Fix import issues (add mm unit to warehouse.py) - Optimize barcode size and spacing for better readability
This commit is contained in:
@@ -510,11 +510,13 @@ async function printLocationBarcode() {
|
||||
|
||||
printStatus.textContent = 'Sending to printer...';
|
||||
|
||||
// Configure QZ Tray for PDF printing with 4x8cm size
|
||||
// Configure QZ Tray for PDF printing with 8x5cm size in landscape
|
||||
const config = qzTray.configs.create(selectedPrinter, {
|
||||
size: { width: 4, height: 8, units: 'cm' },
|
||||
margins: { top: 0, right: 0, bottom: 0, left: 0 },
|
||||
orientation: 'portrait'
|
||||
scaleContent: false,
|
||||
rasterize: false,
|
||||
size: { width: 80, height: 50 },
|
||||
units: 'mm',
|
||||
margins: { top: 0, right: 0, bottom: 0, left: 0 }
|
||||
});
|
||||
|
||||
const data = [{
|
||||
|
||||
Reference in New Issue
Block a user