#A php class for printing out labels on Brother P-touch printers ###Supported models include (PT-P700, PT-H500, PT-E500)
The code is being developed / tested using a PT-P700, but the protocol should be the same on all three models.
The php class is intended to be used as part of a web page allowing it to print labels on a printer connected to the web server.
However the code also includes some php scripts to allow printing from the command line.
This is NOT A CUPS DRIVER nor is cups or any other printer systems required to print.
- PHP
- libusb module for PHP see: php-usb for details on installing it
- GD module
sudo apt-get install php5 php5-gd
Note:
The user running the command/script must have permission to use the USB device.
Please consider looking into using udev to grant you permission to use the printer.
Alternatively you can test the script using 'sudo'.
- ptouch-utils/PtouchPrinter.php The printer class file
- ptouch-utils/ptouch-img A script that prints an image on a label
- test/test.png A test image that fits on 24mm labels
A class for printing GD images, see the code for doxygen comments explaining how to use it
Usage: ptouch-img path_to_file
The image file may be a .png .jpg or .gif.
It must currently be 128 pixels high.
Only the red value of the pixels are considered in order to determine if a black pixel should be printed
As an example from a fresh git clone:
sudo ./ptouch-utils/ptouch-img test/test.png