diff --git a/app/templates/mobile.html b/app/templates/mobile.html
index a90a4ed..ebb2f49 100644
--- a/app/templates/mobile.html
+++ b/app/templates/mobile.html
@@ -67,6 +67,23 @@
+
+
+
diff --git a/patches/ptouch-print-cut-options.patch b/patches/ptouch-print-cut-options.patch
new file mode 100644
index 0000000..c16c077
--- /dev/null
+++ b/patches/ptouch-print-cut-options.patch
@@ -0,0 +1,52 @@
+--- a/src/ptouch-print.c
++++ b/src/ptouch-print.c
+@@ -58,6 +58,7 @@
+ int fontsize = 0;
+ bool debug = false;
+ bool chain = false;
++int precut = 1;
+ int forced_tape_width = 0;
+
+ /* --------------------------------------------------------------------
+@@ -123,8 +124,8 @@
+ }
+ }
+ if ((ptdev->devinfo->flags & FLAG_HAS_PRECUT) == FLAG_HAS_PRECUT) {
+- ptouch_send_precut_cmd(ptdev, 1);
+- if (debug) {
++ if (precut) ptouch_send_precut_cmd(ptdev, 1);
++ if (debug && precut) {
+ printf(_("send precut command\n"));
+ }
+ }
+@@ -439,6 +440,8 @@
+ printf("\t--cutmark\t\tPrint a mark where the tape should be cut\n");
+ printf("\t--pad \t\tAdd n pixels padding (blank tape)\n");
+ printf("\t--chain\t\t\tSkip final feed of label and any automatic cut\n");
++ printf("\t--halfcut\t\tEnable half cut / precut when supported\n");
++ printf("\t--no-halfcut\t\tDisable half cut / precut when supported\n");
+ printf("other commands:\n");
+ printf("\t--version\t\tshow version info (required for bug report)\n");
+ printf("\t--info\t\t\tshow info about detected tape\n");
+@@ -484,6 +487,10 @@
+ continue; /* not done here */
+ } else if (strcmp(&argv[i][1], "-chain") == 0) {
+ chain=true;
++ } else if (strcmp(&argv[i][1], "-halfcut") == 0) {
++ precut=1;
++ } else if (strcmp(&argv[i][1], "-no-halfcut") == 0) {
++ precut=0;
+ } else if (strcmp(&argv[i][1], "-debug") == 0) {
+ debug=true;
+ } else if (strcmp(&argv[i][1], "-info") == 0) {
+@@ -634,6 +641,10 @@
+ im = NULL;
+ } else if (strcmp(&argv[i][1], "-chain") == 0) {
+ chain = true;
++ } else if (strcmp(&argv[i][1], "-halfcut") == 0) {
++ precut = 1;
++ } else if (strcmp(&argv[i][1], "-no-halfcut") == 0) {
++ precut = 0;
+ } else if (strcmp(&argv[i][1], "-debug") == 0) {
+ debug = true;
+ } else if (strcmp(&argv[i][1], "-copies") == 0) {
diff --git a/start.sh b/start.sh
index e8aa905..19a47e1 100644
--- a/start.sh
+++ b/start.sh
@@ -56,9 +56,12 @@ if ! python3 -c "import qrcode, barcode" >/dev/null 2>&1; then
python3 -m pip install --root-user-action=ignore --no-cache-dir qrcode python-barcode
fi
-if ! command -v ptouch-print >/dev/null 2>&1; then
+if ! command -v ptouch-print >/dev/null 2>&1 || ! ptouch-print --help 2>&1 | grep -q -- "--no-halfcut"; then
rm -rf "$PTOUCH_SRC_DIR"
git clone --depth 1 --branch farix-main https://github.com/farixembedded/ptouch-print.git "$PTOUCH_SRC_DIR"
+ if [ -f "$APP_DIR/patches/ptouch-print-cut-options.patch" ]; then
+ patch -d "$PTOUCH_SRC_DIR" -p1 < "$APP_DIR/patches/ptouch-print-cut-options.patch"
+ fi
cmake -S "$PTOUCH_SRC_DIR" -B "$PTOUCH_SRC_DIR/build" -DCMAKE_BUILD_TYPE=Release
cmake --build "$PTOUCH_SRC_DIR/build"
install -m 0755 "$PTOUCH_SRC_DIR/build/ptouch-print" /usr/local/bin/ptouch-print