1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-05-13 15:22:56 +00:00

Add chain mode and set precut flag for PT-2700

This commit is contained in:
Kevin Thibedeau 2024-06-10 16:54:07 +02:00 committed by Dominic Radermacher
parent a51fcf98f8
commit da9ed2600a
6 changed files with 286 additions and 168 deletions

View File

@ -105,7 +105,7 @@ int ptouch_ff(ptouch_dev ptdev);
size_t ptouch_get_max_width(ptouch_dev ptdev);
size_t ptouch_get_tape_width(ptouch_dev ptdev);
int ptouch_page_flags(ptouch_dev ptdev, uint8_t page_flags);
int ptouch_eject(ptouch_dev ptdev);
int ptouch_finalize(ptouch_dev ptdev, int chain);
int ptouch_getstatus(ptouch_dev ptdev);
int ptouch_getmaxwidth(ptouch_dev ptdev);
int ptouch_send_d460bt_magic(ptouch_dev ptdev);

150
po/de.po
View File

@ -8,193 +8,233 @@ msgid ""
msgstr ""
"Project-Id-Version: ptouch-print 1.3.1\n"
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
"PO-Revision-Date: 2015-11-11 09:35+0100\n"
"Last-Translator: <dominic@familie-radermacher.ch>\n"
"POT-Creation-Date: 2024-05-23 22:20-0400\n"
"PO-Revision-Date: 2024-05-23 22:27-0400\n"
"Last-Translator: dominic@familie-radermacher.ch\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.4.2\n"
#: src/libptouch.c:59
#: src/libptouch.c:95 src/libptouch.c:99 src/libptouch.c:103
#, c-format
msgid "out of memory\n"
msgstr "Nicht genug Speicher\n"
#: src/libptouch.c:63
#: src/libptouch.c:107
#, c-format
msgid "libusb_init() failed\n"
msgstr "ptouch_init() fehlgeschlagen\n"
#: src/libptouch.c:72
#: src/libptouch.c:116
#, c-format
msgid "failed to get device descriptor"
msgstr ""
#: src/libptouch.c:78
#: src/libptouch.c:122
#, c-format
msgid "%s found on USB bus %d, device %d\n"
msgstr "Drucker %s am USB Bus %d, Gerät %d gefunden\n"
#: src/libptouch.c:83
#: src/libptouch.c:137
#, c-format
msgid "libusb_open error :%s\n"
msgstr ""
#: src/libptouch.c:89
#: src/libptouch.c:143
#, c-format
msgid "error while detaching kernel driver: %s\n"
msgstr ""
#: src/libptouch.c:93
#: src/libptouch.c:147
#, c-format
msgid "interface claim error: %s\n"
msgstr ""
#: src/libptouch.c:101
#: src/libptouch.c:158
#, c-format
msgid ""
"No P-Touch printer found on USB (remember to put switch to position E)\n"
msgid "No P-Touch printer found on USB (remember to put switch to position E)\n"
msgstr "Kein P-Ptouch Drucker am USB gefunden (Schalter muss auf E stehen)\n"
#: src/libptouch.c:121
#: src/libptouch.c:178
#, c-format
msgid "write error: %s\n"
msgstr ""
#: src/libptouch.c:125
#, c-format
msgid "write error: could send only %i of %i bytes\n"
msgstr ""
#: src/libptouch.c:182
#, fuzzy, c-format
#| msgid "read error: got %i instead of 32 bytes\n"
msgid "write error: could send only %i of %ld bytes\n"
msgstr "Lesefehler: %i anstatt 32 bytes empfangen\n"
#: src/libptouch.c:194
#: src/libptouch.c:302
#, c-format
msgid "debug: dumping raw status bytes\n"
msgstr ""
#: src/libptouch.c:218 src/libptouch.c:263
#: src/libptouch.c:326 src/libptouch.c:362
#, c-format
msgid "read error: %s\n"
msgstr ""
#: src/libptouch.c:223
#: src/libptouch.c:331
#, c-format
msgid "timeout while waiting for status response\n"
msgstr ""
#: src/libptouch.c:231
#, c-format
msgid "Error 1 = %02x\n"
msgstr "Fehlerbyte1 = %02x\n"
#: src/libptouch.c:234
#, c-format
msgid "Error 2 = %02x\n"
msgstr "Fehlerbyte2 = %02x\n"
#: src/libptouch.c:244
#: src/libptouch.c:345
#, c-format
msgid "unknown tape width of %imm, please report this.\n"
msgstr "Unbekannte Schriftband breite (%i mm), bitte melden\n"
#: src/libptouch.c:252
#: src/libptouch.c:351
#, c-format
msgid "got only 16 bytes... wondering what they are:\n"
msgstr "nur 16 bytes empfangen... mal gucken was die sind:\n"
#: src/libptouch.c:256
#: src/libptouch.c:355
#, c-format
msgid "read error: got %i instead of 32 bytes\n"
msgstr "Lesefehler: %i anstatt 32 bytes empfangen\n"
#: src/libptouch.c:259
#: src/libptouch.c:358
#, c-format
msgid "strange status:\n"
msgstr "Seltsamer Status:\n"
#: src/libptouch.c:261
#: src/libptouch.c:360
#, c-format
msgid "trying to flush junk\n"
msgstr ""
#: src/libptouch.c:266
#: src/libptouch.c:365
#, c-format
msgid "got another %i bytes. now try again\n"
msgstr "weitere %i bytes empfangen. probiere es nochmal.\n"
#: src/ptouch-print.c:71
#: src/ptouch-print.c:82
#, c-format
msgid "nothing to print\n"
msgstr ""
#: src/ptouch-print.c:89
#, c-format
msgid "image is too large (%ipx x %ipx)\n"
msgstr "Bild ist zu gross (%ipx x %ipx)\n"
#: src/ptouch-print.c:72 src/ptouch-print.c:356
#: src/ptouch-print.c:90 src/ptouch-print.c:556
#, c-format
msgid "maximum printing width for this tape is %ipx\n"
msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
#: src/ptouch-print.c:77
#: src/ptouch-print.c:104
#, c-format
msgid "ptouch_rasterstart() failed\n"
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
#: src/ptouch-print.c:88
#: src/ptouch-print.c:110
#, c-format
msgid "ptouch_send() failed\n"
msgid "send print information command\n"
msgstr ""
#: src/ptouch-print.c:116
#, c-format
msgid "send PT-D460BT magic commands\n"
msgstr ""
#: src/ptouch-print.c:122
#, c-format
msgid "send precut command\n"
msgstr ""
#: src/ptouch-print.c:133
#, fuzzy, c-format
#| msgid "ptouch_send() failed\n"
msgid "ptouch_sendraster() failed\n"
msgstr "ptouch_send() fehlgeschlagen\n"
#: src/ptouch-print.c:128
#: src/ptouch-print.c:182
#, c-format
msgid "writing image '%s' failed\n"
msgstr "Schreiben der Bilddatei '%s' fehlgeschlagen\n"
#: src/ptouch-print.c:197
#: src/ptouch-print.c:206
#, c-format
msgid "debug: o baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:207
#, c-format
msgid "debug: text baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:266
#, c-format
msgid "render_text(): %i lines, font = '%s'\n"
msgstr ""
#: src/ptouch-print.c:269
#, c-format
msgid "warning: font config not available\n"
msgstr "Warnung: fontconfig ist nicht verfügbar\n"
#: src/ptouch-print.c:201
#: src/ptouch-print.c:273
#, c-format
msgid "setting font size=%i\n"
msgstr "setze Zeichensatzgrösse=%i\n"
#: src/ptouch-print.c:205
#: src/ptouch-print.c:277
#, c-format
msgid "could not estimate needed font size\n"
msgstr "Konnte die notwendige Zeichensatzgrösse nicht bestimmen\n"
#: src/ptouch-print.c:212
#: src/ptouch-print.c:284
#, c-format
msgid "choosing font size=%i\n"
msgstr "Wähle Zeichensatzgrösse %i\n"
#: src/ptouch-print.c:226 src/ptouch-print.c:232
#: src/ptouch-print.c:300 src/ptouch-print.c:328
#, c-format
msgid "error in gdImageStringFT: %s\n"
msgstr "Fehler in Funktion gdImageStringFT(): %s\n"
#: src/ptouch-print.c:299
#: src/ptouch-print.c:495
#, c-format
msgid "ptouch-print version %s by Dominic Radermacher\n"
msgstr "ptouch-print Version %s von Dominic Radermacher\n"
#: src/ptouch-print.c:326
#: src/ptouch-print.c:526
#, c-format
msgid "ptouch_init() failed\n"
msgstr "ptouch_init() fehlgeschlagen\n"
#: src/ptouch-print.c:329
#: src/ptouch-print.c:529
#, c-format
msgid "ptouch_getstatus() failed\n"
msgstr "ptouch_getstatus() fehlgeschlagen\n"
#: src/ptouch-print.c:373
#: src/ptouch-print.c:568
#, c-format
msgid "failed to load image file\n"
msgstr ""
#: src/ptouch-print.c:584
#, c-format
msgid "could not render text\n"
msgstr "Konnte Text nicht rendern\n"
#: src/ptouch-print.c:389
#: src/ptouch-print.c:616
#, c-format
msgid "ptouch_eject() failed\n"
msgstr "ptouch_eject() fehlgeschlagen\n"
msgid "ptouch_finalize(%d) failed\n"
msgstr "ptouch_finalize(%d) fehlgeschlagen\n"
#, c-format
#~ msgid "Error 1 = %02x\n"
#~ msgstr "Fehlerbyte1 = %02x\n"
#, c-format
#~ msgid "Error 2 = %02x\n"
#~ msgstr "Fehlerbyte2 = %02x\n"

152
po/en.po
View File

@ -7,194 +7,232 @@ msgid ""
msgstr ""
"Project-Id-Version: ptouch-print 1.3.1\n"
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
"PO-Revision-Date: 2015-11-11 09:47+0100\n"
"Last-Translator: <dominic@familie-radermacher.ch>\n"
"POT-Creation-Date: 2024-05-23 22:20-0400\n"
"PO-Revision-Date: 2024-05-23 22:26-0400\n"
"Last-Translator: dominic@familie-radermacher.ch\n"
"Language-Team: English <en@translate.freefriends.org>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.4.2\n"
#: src/libptouch.c:59
#: src/libptouch.c:95 src/libptouch.c:99 src/libptouch.c:103
#, c-format
msgid "out of memory\n"
msgstr "out of memory\n"
#: src/libptouch.c:63
#: src/libptouch.c:107
#, c-format
msgid "libusb_init() failed\n"
msgstr "libusb_init() failed\n"
#: src/libptouch.c:72
#: src/libptouch.c:116
#, c-format
msgid "failed to get device descriptor"
msgstr "failed to get device descriptor"
#: src/libptouch.c:78
#: src/libptouch.c:122
#, c-format
msgid "%s found on USB bus %d, device %d\n"
msgstr "%s found on USB bus %d, device %d\n"
#: src/libptouch.c:83
#: src/libptouch.c:137
#, c-format
msgid "libusb_open error :%s\n"
msgstr "libusb_open error :%s\n"
#: src/libptouch.c:89
#: src/libptouch.c:143
#, c-format
msgid "error while detaching kernel driver: %s\n"
msgstr "error while detaching kernel driver: %s\n"
#: src/libptouch.c:93
#: src/libptouch.c:147
#, c-format
msgid "interface claim error: %s\n"
msgstr "interface claim error: %s\n"
#: src/libptouch.c:101
#: src/libptouch.c:158
#, c-format
msgid ""
"No P-Touch printer found on USB (remember to put switch to position E)\n"
msgstr ""
"No P-Touch printer found on USB (remember to put switch to position E)\n"
msgid "No P-Touch printer found on USB (remember to put switch to position E)\n"
msgstr "No P-Touch printer found on USB (remember to put switch to position E)\n"
#: src/libptouch.c:121
#: src/libptouch.c:178
#, c-format
msgid "write error: %s\n"
msgstr "write error: %s\n"
#: src/libptouch.c:125
#, c-format
msgid "write error: could send only %i of %i bytes\n"
#: src/libptouch.c:182
#, fuzzy, c-format
#| msgid "write error: could send only %i of %i bytes\n"
msgid "write error: could send only %i of %ld bytes\n"
msgstr "write error: could send only %i of %i bytes\n"
#: src/libptouch.c:194
#: src/libptouch.c:302
#, c-format
msgid "debug: dumping raw status bytes\n"
msgstr "debug: dumping raw status bytes\n"
#: src/libptouch.c:218 src/libptouch.c:263
#: src/libptouch.c:326 src/libptouch.c:362
#, c-format
msgid "read error: %s\n"
msgstr "read error: %s\n"
#: src/libptouch.c:223
#: src/libptouch.c:331
#, c-format
msgid "timeout while waiting for status response\n"
msgstr "timeout while waiting for status response\n"
#: src/libptouch.c:231
#, c-format
msgid "Error 1 = %02x\n"
msgstr "Error 1 = %02x\n"
#: src/libptouch.c:234
#, c-format
msgid "Error 2 = %02x\n"
msgstr "Error 2 = %02x\n"
#: src/libptouch.c:244
#: src/libptouch.c:345
#, c-format
msgid "unknown tape width of %imm, please report this.\n"
msgstr "unknown tape width of %imm, please report this.\n"
#: src/libptouch.c:252
#: src/libptouch.c:351
#, c-format
msgid "got only 16 bytes... wondering what they are:\n"
msgstr "got only 16 bytes... wondering what they are:\n"
#: src/libptouch.c:256
#: src/libptouch.c:355
#, c-format
msgid "read error: got %i instead of 32 bytes\n"
msgstr "read error: got %i instead of 32 bytes\n"
#: src/libptouch.c:259
#: src/libptouch.c:358
#, c-format
msgid "strange status:\n"
msgstr "strange status:\n"
#: src/libptouch.c:261
#: src/libptouch.c:360
#, c-format
msgid "trying to flush junk\n"
msgstr "trying to flush junk\n"
#: src/libptouch.c:266
#: src/libptouch.c:365
#, c-format
msgid "got another %i bytes. now try again\n"
msgstr "got another %i bytes. now try again\n"
#: src/ptouch-print.c:71
#: src/ptouch-print.c:82
#, c-format
msgid "nothing to print\n"
msgstr ""
#: src/ptouch-print.c:89
#, c-format
msgid "image is too large (%ipx x %ipx)\n"
msgstr "image is too large (%ipx x %ipx)\n"
#: src/ptouch-print.c:72 src/ptouch-print.c:356
#: src/ptouch-print.c:90 src/ptouch-print.c:556
#, c-format
msgid "maximum printing width for this tape is %ipx\n"
msgstr "maximum printing width for this tape is %ipx\n"
#: src/ptouch-print.c:77
#: src/ptouch-print.c:104
#, c-format
msgid "ptouch_rasterstart() failed\n"
msgstr "ptouch_rasterstart() failed\n"
#: src/ptouch-print.c:88
#: src/ptouch-print.c:110
#, c-format
msgid "ptouch_send() failed\n"
msgstr "ptouch_send() failed\n"
msgid "send print information command\n"
msgstr ""
#: src/ptouch-print.c:128
#: src/ptouch-print.c:116
#, c-format
msgid "send PT-D460BT magic commands\n"
msgstr ""
#: src/ptouch-print.c:122
#, c-format
msgid "send precut command\n"
msgstr ""
#: src/ptouch-print.c:133
#, c-format
msgid "ptouch_sendraster() failed\n"
msgstr "ptouch_sendraster() failed\n"
#: src/ptouch-print.c:182
#, c-format
msgid "writing image '%s' failed\n"
msgstr "writing image '%s' failed\n"
#: src/ptouch-print.c:197
#: src/ptouch-print.c:206
#, c-format
msgid "debug: o baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:207
#, c-format
msgid "debug: text baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:266
#, c-format
msgid "render_text(): %i lines, font = '%s'\n"
msgstr ""
#: src/ptouch-print.c:269
#, c-format
msgid "warning: font config not available\n"
msgstr "warning: font config not available\n"
#: src/ptouch-print.c:201
#: src/ptouch-print.c:273
#, c-format
msgid "setting font size=%i\n"
msgstr "setting font size=%i\n"
#: src/ptouch-print.c:205
#: src/ptouch-print.c:277
#, c-format
msgid "could not estimate needed font size\n"
msgstr "could not estimate needed font size\n"
#: src/ptouch-print.c:212
#: src/ptouch-print.c:284
#, c-format
msgid "choosing font size=%i\n"
msgstr "choosing font size=%i\n"
#: src/ptouch-print.c:226 src/ptouch-print.c:232
#: src/ptouch-print.c:300 src/ptouch-print.c:328
#, c-format
msgid "error in gdImageStringFT: %s\n"
msgstr "error in gdImageStringFT: %s\n"
#: src/ptouch-print.c:299
#: src/ptouch-print.c:495
#, c-format
msgid "ptouch-print version %s by Dominic Radermacher\n"
msgstr "ptouch-print version %s by Dominic Radermacher\n"
#: src/ptouch-print.c:326
#: src/ptouch-print.c:526
#, c-format
msgid "ptouch_init() failed\n"
msgstr "ptouch_init() failed\n"
#: src/ptouch-print.c:329
#: src/ptouch-print.c:529
#, c-format
msgid "ptouch_getstatus() failed\n"
msgstr "ptouch_getstatus() failed\n"
#: src/ptouch-print.c:373
#: src/ptouch-print.c:568
#, c-format
msgid "failed to load image file\n"
msgstr ""
#: src/ptouch-print.c:584
#, c-format
msgid "could not render text\n"
msgstr "could not render text\n"
#: src/ptouch-print.c:389
#: src/ptouch-print.c:616
#, c-format
msgid "ptouch_eject() failed\n"
msgstr "ptouch_eject() failed\n"
msgid "ptouch_finalize(%d) failed\n"
msgstr "ptouch_finalize(%d) failed\n"
#, c-format
#~ msgid "Error 1 = %02x\n"
#~ msgstr "Error 1 = %02x\n"
#, c-format
#~ msgid "Error 2 = %02x\n"
#~ msgstr "Error 2 = %02x\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ptouch 1.3.3\n"
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
"POT-Creation-Date: 2024-05-23 22:20-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,183 +17,213 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/libptouch.c:59
#: src/libptouch.c:95 src/libptouch.c:99 src/libptouch.c:103
#, c-format
msgid "out of memory\n"
msgstr ""
#: src/libptouch.c:63
#: src/libptouch.c:107
#, c-format
msgid "libusb_init() failed\n"
msgstr ""
#: src/libptouch.c:72
#: src/libptouch.c:116
#, c-format
msgid "failed to get device descriptor"
msgstr ""
#: src/libptouch.c:78
#: src/libptouch.c:122
#, c-format
msgid "%s found on USB bus %d, device %d\n"
msgstr ""
#: src/libptouch.c:83
#: src/libptouch.c:137
#, c-format
msgid "libusb_open error :%s\n"
msgstr ""
#: src/libptouch.c:89
#: src/libptouch.c:143
#, c-format
msgid "error while detaching kernel driver: %s\n"
msgstr ""
#: src/libptouch.c:93
#: src/libptouch.c:147
#, c-format
msgid "interface claim error: %s\n"
msgstr ""
#: src/libptouch.c:101
#: src/libptouch.c:158
#, c-format
msgid ""
"No P-Touch printer found on USB (remember to put switch to position E)\n"
msgstr ""
#: src/libptouch.c:121
#: src/libptouch.c:178
#, c-format
msgid "write error: %s\n"
msgstr ""
#: src/libptouch.c:125
#: src/libptouch.c:182
#, c-format
msgid "write error: could send only %i of %i bytes\n"
msgid "write error: could send only %i of %ld bytes\n"
msgstr ""
#: src/libptouch.c:194
#: src/libptouch.c:302
#, c-format
msgid "debug: dumping raw status bytes\n"
msgstr ""
#: src/libptouch.c:218 src/libptouch.c:263
#: src/libptouch.c:326 src/libptouch.c:362
#, c-format
msgid "read error: %s\n"
msgstr ""
#: src/libptouch.c:223
#: src/libptouch.c:331
#, c-format
msgid "timeout while waiting for status response\n"
msgstr ""
#: src/libptouch.c:231
#, c-format
msgid "Error 1 = %02x\n"
msgstr ""
#: src/libptouch.c:234
#, c-format
msgid "Error 2 = %02x\n"
msgstr ""
#: src/libptouch.c:244
#: src/libptouch.c:345
#, c-format
msgid "unknown tape width of %imm, please report this.\n"
msgstr ""
#: src/libptouch.c:252
#: src/libptouch.c:351
#, c-format
msgid "got only 16 bytes... wondering what they are:\n"
msgstr ""
#: src/libptouch.c:256
#: src/libptouch.c:355
#, c-format
msgid "read error: got %i instead of 32 bytes\n"
msgstr ""
#: src/libptouch.c:259
#: src/libptouch.c:358
#, c-format
msgid "strange status:\n"
msgstr ""
#: src/libptouch.c:261
#: src/libptouch.c:360
#, c-format
msgid "trying to flush junk\n"
msgstr ""
#: src/libptouch.c:266
#: src/libptouch.c:365
#, c-format
msgid "got another %i bytes. now try again\n"
msgstr ""
#: src/ptouch-print.c:71
#: src/ptouch-print.c:82
#, c-format
msgid "nothing to print\n"
msgstr ""
#: src/ptouch-print.c:89
#, c-format
msgid "image is too large (%ipx x %ipx)\n"
msgstr ""
#: src/ptouch-print.c:72 src/ptouch-print.c:356
#: src/ptouch-print.c:90 src/ptouch-print.c:556
#, c-format
msgid "maximum printing width for this tape is %ipx\n"
msgstr ""
#: src/ptouch-print.c:77
#: src/ptouch-print.c:104
#, c-format
msgid "ptouch_rasterstart() failed\n"
msgstr ""
#: src/ptouch-print.c:88
#: src/ptouch-print.c:110
#, c-format
msgid "ptouch_send() failed\n"
msgid "send print information command\n"
msgstr ""
#: src/ptouch-print.c:128
#: src/ptouch-print.c:116
#, c-format
msgid "send PT-D460BT magic commands\n"
msgstr ""
#: src/ptouch-print.c:122
#, c-format
msgid "send precut command\n"
msgstr ""
#: src/ptouch-print.c:133
#, c-format
msgid "ptouch_sendraster() failed\n"
msgstr ""
#: src/ptouch-print.c:182
#, c-format
msgid "writing image '%s' failed\n"
msgstr ""
#: src/ptouch-print.c:197
#: src/ptouch-print.c:206
#, c-format
msgid "debug: o baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:207
#, c-format
msgid "debug: text baseline offset - %d\n"
msgstr ""
#: src/ptouch-print.c:266
#, c-format
msgid "render_text(): %i lines, font = '%s'\n"
msgstr ""
#: src/ptouch-print.c:269
#, c-format
msgid "warning: font config not available\n"
msgstr ""
#: src/ptouch-print.c:201
#: src/ptouch-print.c:273
#, c-format
msgid "setting font size=%i\n"
msgstr ""
#: src/ptouch-print.c:205
#: src/ptouch-print.c:277
#, c-format
msgid "could not estimate needed font size\n"
msgstr ""
#: src/ptouch-print.c:212
#: src/ptouch-print.c:284
#, c-format
msgid "choosing font size=%i\n"
msgstr ""
#: src/ptouch-print.c:226 src/ptouch-print.c:232
#: src/ptouch-print.c:300 src/ptouch-print.c:328
#, c-format
msgid "error in gdImageStringFT: %s\n"
msgstr ""
#: src/ptouch-print.c:299
#: src/ptouch-print.c:495
#, c-format
msgid "ptouch-print version %s by Dominic Radermacher\n"
msgstr ""
#: src/ptouch-print.c:326
#: src/ptouch-print.c:526
#, c-format
msgid "ptouch_init() failed\n"
msgstr ""
#: src/ptouch-print.c:329
#: src/ptouch-print.c:529
#, c-format
msgid "ptouch_getstatus() failed\n"
msgstr ""
#: src/ptouch-print.c:373
#: src/ptouch-print.c:568
#, c-format
msgid "failed to load image file\n"
msgstr ""
#: src/ptouch-print.c:584
#, c-format
msgid "could not render text\n"
msgstr ""
#: src/ptouch-print.c:389
#: src/ptouch-print.c:616
#, c-format
msgid "ptouch_eject() failed\n"
msgid "ptouch_finalize(%d) failed\n"
msgstr ""

View File

@ -48,7 +48,7 @@ struct _pt_dev_info ptdevs[] = {
{0x04f9, 0x2007, "PT-2420PC", 128, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, 128px, maximum tape width 24mm, must send TIFF compressed pixel data */
{0x04f9, 0x2011, "PT-2450PC", 128, 180, FLAG_RASTER_PACKBITS},
{0x04f9, 0x2019, "PT-1950", 128, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, apparently 112px printhead ?, maximum tape width 18mm - unconfirmed if it works */
{0x04f9, 0x201f, "PT-2700", 128, 180, FLAG_NONE},
{0x04f9, 0x201f, "PT-2700", 128, 180, FLAG_HAS_PRECUT},
{0x04f9, 0x202c, "PT-1230PC", 128, 180, FLAG_NONE}, /* 180dpi, supports tapes up to 12mm - I don't know how much pixels it can print! */
/* Notes about the PT-1230PC: While it is true that this printer supports
max 12mm tapes, it apparently expects > 76px data - the first 32px
@ -280,13 +280,17 @@ int ptouch_ff(ptouch_dev ptdev)
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
}
/* print and cut tape */
int ptouch_eject(ptouch_dev ptdev)
/* finish print and either cut or leave tape in machine */
int ptouch_finalize(ptouch_dev ptdev, int chain)
{
char cmd[]="\x1a";
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
char cmd_eject[]="\x1a"; /* Print command with feeding */
char cmd_chain[]="\x0c"; /* Print command (no cut) */
char *cmd = chain ? cmd_chain : cmd_eject;
return ptouch_send(ptdev, (uint8_t *)cmd, 1);
}
void ptouch_rawstatus(uint8_t raw[32])
{
fprintf(stderr, _("debug: dumping raw status bytes\n"));

View File

@ -57,6 +57,7 @@ char *save_png=NULL;
int verbose=0;
int fontsize=0;
bool debug=false;
bool chain=false;
/* --------------------------------------------------------------------
-------------------------------------------------------------------- */
@ -428,6 +429,7 @@ void usage(char *progname)
printf("\t\t\t\tIf the text contains spaces, use quotation marks\n\t\t\t\taround it.\n");
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("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");
@ -464,6 +466,8 @@ int parse_args(int argc, char **argv)
}
} else if (strcmp(&argv[i][1], "-cutmark") == 0) {
continue; /* not done here */
} else if (strcmp(&argv[i][1], "-chain") == 0) {
chain=true;
} else if (strcmp(&argv[i][1], "-debug") == 0) {
debug=true;
} else if (strcmp(&argv[i][1], "-info") == 0) {
@ -595,6 +599,8 @@ int main(int argc, char *argv[])
out=img_append(out, im);
gdImageDestroy(im);
im = NULL;
} else if (strcmp(&argv[i][1], "-chain") == 0) {
chain = true;
} else if (strcmp(&argv[i][1], "-debug") == 0) {
debug = true;
} else {
@ -606,8 +612,8 @@ int main(int argc, char *argv[])
write_png(out, save_png);
} else {
print_img(ptdev, out);
if (ptouch_eject(ptdev) != 0) {
printf(_("ptouch_eject() failed\n"));
if (ptouch_finalize(ptdev, chain) != 0) {
printf(_("ptouch_finalize(%d) failed\n"), chain);
return -1;
}
}