Lower ticket virtual print resolution for testing
This commit is contained in:
@@ -1665,10 +1665,12 @@ const POS = (() => {
|
||||
// Paper width: 58 mm -> 48 mm printable; 80 mm -> 72 mm printable.
|
||||
const paperWidth = parseInt(rc('paper_width', '80'), 10) || 80;
|
||||
const is58 = paperWidth === 58;
|
||||
const printWidth = is58 ? 48 : 72;
|
||||
const fontSize = is58 ? '9.5pt' : '11pt';
|
||||
const smallFont = is58 ? '8pt' : '9.5pt';
|
||||
const nameMax = is58 ? '17mm' : '32mm';
|
||||
// Lower virtual resolution: render on a narrower canvas so the printer
|
||||
// driver scales content up, producing thicker/larger pixels.
|
||||
const printWidth = is58 ? 42 : 64;
|
||||
const fontSize = is58 ? '9pt' : '10.5pt';
|
||||
const smallFont = is58 ? '7.5pt' : '9pt';
|
||||
const nameMax = is58 ? '14mm' : '27mm';
|
||||
|
||||
let iframe = document.getElementById('ticketPrintFrame');
|
||||
if (!iframe) {
|
||||
@@ -1691,7 +1693,7 @@ const POS = (() => {
|
||||
<style>
|
||||
@page { margin: 0; size: ${printWidth}mm auto; }
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; padding: 0; height: auto; overflow: visible; background: #fff; color: #000; font-family: 'Courier New', Courier, 'Lucida Console', monospace; font-size: ${fontSize}; line-height: 1.55; -webkit-font-smoothing: none; -moz-osx-font-smoothing: unset; text-rendering: geometricPrecision; }
|
||||
html, body { margin: 0; padding: 0; height: auto; overflow: visible; background: #fff; color: #000; font-family: 'Courier New', Courier, 'Lucida Console', monospace; font-size: ${fontSize}; line-height: 1.55; -webkit-font-smoothing: none; -moz-osx-font-smoothing: unset; text-rendering: geometricPrecision; image-rendering: pixelated; }
|
||||
body { width: ${printWidth}mm; }
|
||||
.ticket { width: ${printWidth}mm; padding: 4mm 3mm 5mm; border: none !important; box-shadow: none !important; }
|
||||
.item-line-wide { display: grid !important; grid-template-columns: 8mm 1fr auto auto !important; gap: 2mm; font-size: ${fontSize}; margin-bottom: 2mm; padding-left: 1mm; align-items: start; }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// The fetch handler normalizes static asset URLs (strips ?v= query strings)
|
||||
// so templates can use cache-busting query params freely.
|
||||
|
||||
const VERSION = 48;
|
||||
const VERSION = 49;
|
||||
const CACHE_NAME = 'nexus-pos-v' + VERSION;
|
||||
|
||||
const APP_SHELL = [
|
||||
|
||||
Reference in New Issue
Block a user