From a03ea047c1469071e3059e525e78fdf21c71d451 Mon Sep 17 00:00:00 2001 From: radex Date: Fri, 2 Feb 2024 22:21:56 +0100 Subject: [PATCH] fix printing? --- index.html | 6 +++--- src/functions.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9998e65..bafb173 100644 --- a/index.html +++ b/index.html @@ -9,14 +9,14 @@ - + "> --> @@ -831,4 +831,4 @@ - \ No newline at end of file + diff --git a/src/functions.js b/src/functions.js index 0b4683d..e572bcc 100644 --- a/src/functions.js +++ b/src/functions.js @@ -1078,8 +1078,9 @@ function file_save(maybe_saved_callback = () => { }, update_from_saved = true) { function print_zebra() { write_image_file(main_canvas, 'image/png', (blob) => { console.log(blob) - fetch(`print?printer=zebra`, { + fetch(`/print?printer=zebra`, { method: 'POST', + headers: { 'content-type': 'image/png' }, body: blob, }).then(response => { console.log({response})