From 28b52145ebfdd637b683d497e8cc6161e1dcb834 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Mon, 7 Sep 2026 10:56:01 +1000 Subject: [PATCH] Printer Adjustments --- README.md | 10 ++++++++-- public/js/admin.js | 47 ++++++++++++++++++++++++++++++++++++++++----- src/db.js | 5 +++++ src/printer.js | 27 +++++++++++++++++++++++--- src/routes/admin.js | 7 +++++-- src/sites.js | 1 + 6 files changed, 85 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cccff59..85fb5a1 100644 --- a/README.md +++ b/README.md @@ -179,10 +179,16 @@ the widest roll it will accept — the console warns you if you enter anything w | DK-11208 | 38 × 90 mm die-cut | Narrower; turn the photo off | | DK-11209 | 29 × 62 mm die-cut | Name and host only | +**Tell it which roll is loaded.** *Roll loaded in the printer* under **Sites → Edit → Printer** +must match what is physically in the machine. A two-colour job sent to a plain roll is refused +outright: the printer shows **Wrong Roll Type** and nothing comes out. The setting is separate +from the red styling option on purpose — a design choice should not silently change the media +type the printer is told to expect. + **The red option.** Tick *Print the heading and the no-check warning in red* and the site name and the **No WWCC / VIT** box print red instead of black, which makes a visitor without a check -obvious across a room. It only works on a DK-22251 roll — on any other roll the printer renders -it as grey. Two-colour printing is also far slower than black alone (Brother rate it at roughly +obvious across a room. It needs the roll setting above to be the DK-22251; with a plain roll +selected the badge is drawn in black instead and the console says so. Two-colour printing is also far slower than black alone (Brother rate it at roughly 15 labels a minute against 110), which is irrelevant for one badge at a time but worth knowing. ### Printing from the server diff --git a/public/js/admin.js b/public/js/admin.js index 986af67..08105ba 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -702,9 +702,9 @@ async function loadSites() {
Printer
${ s.printer.enabled && s.printer.host - ? `${esc(s.printer.model)} at ${esc(s.printer.host)}:${s.printer.port}${ - s.printer.rotate ? `, rotated ${s.printer.rotate}°` : '' - }${ + ? `${esc(s.printer.model)} at ${esc(s.printer.host)}:${s.printer.port}, ${ + s.printer.label === '62red' ? 'black and red roll' : 'black roll' + }${s.printer.rotate ? `, rotated ${s.printer.rotate}°` : ''}${ s.printerStatus ? s.printerStatus.ok ? ` last print ok, ${stamp(s.printerStatus.at)}` @@ -799,14 +799,21 @@ function openSiteModal(site) { -

Red needs a two-colour roll such as the Brother DK-22251. On any other - roll it prints as grey. Two-colour printing is also much slower than black alone.

+

+

Two-colour printing is much slower than black alone.

+ +

This must match the roll actually in the machine. Send a two-colour job to a + plain roll and the printer answers Wrong Roll Type and prints nothing.