0

I have a receipt printer TM-T88IV with usb access. Is it possible to print something directly to the printer from a .php website? Something like

<?
$text=random_text_method();
print_to_local_tm($text);
?>

? I have no clue how to get startet.

Adam
  • 25,960
  • 22
  • 158
  • 247
  • I don't see anything in the printer's documentations about php connection. I would download the windows utility that's available with that and see if you can connect with a php script to get data to print. If you are willing to go the fairly complicated route you can get a php-usb library and figure out how to use the printer with libusb: https://github.com/oasynnoum/php-usb – evan.stoddard Jul 07 '13 at 21:15
  • fopen('printers address') fwrite(file) –  Jul 07 '13 at 21:18
  • how do I get printers address? – Adam Jul 07 '13 at 21:27
  • @Adam The printers network address. `192.168.x.y` for example. – Daryl Gill Jul 07 '13 at 22:28

1 Answers1

0

If TM-T88IV's USB connection are recognized as COM(serial-port), You can use PHP serial-port extension.

Gorilla(PHP serial-port extension)
https://github.com/oasynnoum/Gorilla

Basic usage of Gorilla
https://gist.github.com/oasynnoum/6076496