mirror of
https://git.familie-radermacher.ch/linux/ptouch-print.git
synced 2026-08-01 12:17:26 +00:00
c8ce56e0545a5f7bd4e6b4198588eaec991f1a61
The raster packet buffer was fixed at 64 bytes, but a full raster line is max_px/8 bytes plus up to 4 header bytes. For printers with a printhead wider than 480px this overflows the buffer and smashes the stack. No previously supported printer was wide enough to trigger it (the widest, PT-9200DX at 384px, needs 52 bytes), but a 560px printhead needs 74. Size the buffer to 128 bytes, which is the maximum a single packet can be since ptouch_send() caps transfers at 128 bytes.
About: ptouch-print is a command line tool to print labels on Brother P-Touch printers on Linux. There is no need to install the printer via CUPS, the printer is accessed directly via libusb. The tool was written for and tested with the PT-2430PC, but meanwhile is also used with others (see "ptouch-print --list-supported") Maybe others work too (please report USB VID and PID so I can include support for further models, too). Further info can be found at: https://dominic.familie-radermacher.ch/projekte/ptouch-print/ Compile instructions: ./compile.sh Note: Dear visitor, currently I have absolutely no time for improvements on this project (my free time currently is about one or two hours PER MONTH). Therefore, I can not look at suggestions about improvements.
Languages
C
76.3%
CMake
18%
Roff
5.6%