made the print lost label page

This commit is contained in:
2025-10-04 17:17:07 +03:00
parent e1438a476b
commit f105da2012
6 changed files with 472 additions and 20 deletions

View File

@@ -912,10 +912,13 @@ async function generatePDFAndPrint(selectedPrinter, orderData, pieceNumber, tota
console.log(`🖨️ Sending PDF to printer ${selectedPrinter}...`);
// Configure QZ Tray for PDF printing
// Configure QZ Tray for PDF printing with explicit paper size
const config = qz.configs.create(selectedPrinter, {
scaleContent: false,
rasterize: false
rasterize: false,
size: { width: 80, height: 100 },
units: 'mm',
margins: { top: 0, right: 0, bottom: 0, left: 0 }
});
// Prepare PDF data for QZ Tray
@@ -1033,7 +1036,7 @@ function generateHTMLLabel(orderData, pieceNumber, totalPieces) {
<meta charset="UTF-8">
<style>
@page {
size: 80mm 110mm;
size: 80mm 100mm;
margin: 0;
}
* {
@@ -1044,7 +1047,7 @@ function generateHTMLLabel(orderData, pieceNumber, totalPieces) {
padding: 0;
font-family: Arial, sans-serif;
width: 80mm;
height: 110mm;
height: 105mm;
position: relative;
background: white;
font-size: 12px;