Jump to content

siric

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by siric

  1. You create a port in Windows which is mapped to the USB port - in my case named Terow. You then create your text file and copy it to the port. $file = "print.txt"; $handle = fopen($file, 'w'); $linefeed = chr(10); $Data = "This is a test\n"; $Data .= "\n"; $Data .= "Line 1"; $Data .= "\n"; $Data .= "Line 2"; $Data .= $linefeed; $Data .= $linefeed; fwrite($handle, $Data); fclose($handle); copy($file, "//localhost/terow"); If I do the same with an image, as expected it prints junk. Can't find information on how to convert the image file to data that will be accepted by the printer.
  2. I am trying to print an image to a thermal POS printer from a PHP script. I have managed to get a text file to print by saving it to a file and copying to the USB port and that works fine. Am running PHP on Windows. Would appreciate any assistance. Thanks Steve
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.