feat: increase PAGE-WIDTH and line length to utilize full 58mm width

This commit is contained in:
Wartana
2026-02-28 22:29:11 +08:00
parent f3c3145c08
commit 03269c9430

10
app.js
View File

@@ -198,8 +198,8 @@ labelForm.addEventListener('submit', async (e) => {
// 200 dpi, 200 dpi, height ~ 800 dots (100mm)
cpcl.push("! 0 200 200 800 1\r\n");
// PAGE-WIDTH 384 (48mm printable area on 200dpi is ~384 dots)
cpcl.push("PAGE-WIDTH 384\r\n");
// PAGE-WIDTH 450 (Maximize printable area on 58mm)
cpcl.push("PAGE-WIDTH 480\r\n");
let currentY = 20;
@@ -225,7 +225,7 @@ labelForm.addEventListener('submit', async (e) => {
}
// --- Divider ---
cpcl.push(`LINE 0 ${y} 384 ${y} 2\r\n`);
cpcl.push(`LINE 0 ${y} 430 ${y} 2\r\n`);
} else {
// --- Header ---
cpcl.push(`TEXT 7 0 0 ${y} ITEM NAME\r\n`);
@@ -234,7 +234,7 @@ labelForm.addEventListener('submit', async (e) => {
y += 50;
// --- Divider ---
cpcl.push(`LINE 0 ${y} 384 ${y} 2\r\n`);
cpcl.push(`LINE 0 ${y} 430 ${y} 2\r\n`);
y += 20;
// --- Price ---
@@ -242,7 +242,7 @@ labelForm.addEventListener('submit', async (e) => {
y += 60;
// --- Divider ---
cpcl.push(`LINE 0 ${y} 384 ${y} 2\r\n`);
cpcl.push(`LINE 0 ${y} 430 ${y} 2\r\n`);
y += 20;
// --- Notes ---