Files
P-Touch-Web/patches/ptouch-print-cut-options.patch
T

53 lines
1.8 KiB
Diff

--- 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 <n>\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) {