From f59e19349bf747d8b61fc877f9638f0ae19f87ec Mon Sep 17 00:00:00 2001 From: Frost Date: Wed, 6 Aug 2025 22:58:58 -0700 Subject: [PATCH] Print without the default length margins Brother's software may default to 0x0e, but that probably assumes you're making text labels and not printing images. For printing images you might want borderless (we certainly do), and for text labels you can always add the margins to the label before printing. This commit uses 1px length margins instead of 0 to prevent some leftover black on the edges of the next print. --- src/libptouch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libptouch.c b/src/libptouch.c index 9d59a55..b02e34b 100644 --- a/src/libptouch.c +++ b/src/libptouch.c @@ -228,10 +228,11 @@ int ptouch_send_d460bt_magic(ptouch_dev ptdev) uint8_t cmd[7]; /* n1 and n2 are the length margin/spacing, in px? (uint16_t value, little endian) */ /* A value of 0x06 is equivalent to the width margin on 6mm tape */ + /* A value of 0x01 adds barely any margin, suitable for image printing */ /* The default for P-Touch software is 0x0e */ /* n3 must be 0x4D or the print gets corrupted! */ /* n4 seems to be ignored or reserved. */ - memcpy(cmd, "\x1b\x69\x64\x0e\x00\x4d\x00", 7); + memcpy(cmd, "\x1b\x69\x64\x01\x00\x4d\x00", 7); return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd)); }