I tried printing a label to an Intermec printer from php using the following code:
$cmds .= "<STX><ESC>C<ETX>";
$cmds .= "<STX><ESC>P<ETX>";
$cmds .= "<STX>E4;F4;<ETX>";
$cmds .= "<STX>H0;o102,51;f0;c25;h20;w20;d0,30;<ETX>";
$cmds .= "<STX>L1;o102,102;f0;l575;w5;<ETX>";
$cmds .= "<STX>B2;o203,153;c0,0;h100;w2;i1;d0,10;<ETX>";
$cmds .= "<STX>I2;h1;w1;c20;<ETX>";
$cmds .= "<STX>R;<ETX>";
$cmds .= "<STX><ESC>E4<ETX>";
$cmds .= "<STX><CAN><ETX>";
$cmds .= "<STX>RO503C001IP0722RZ001-050<CR><ETX>";
$cmds .= "<STX>RO503C001IP0722RZ001-050<ETX>";
$cmds .= "<STX><ETB><ETX>";
$handle = printer_open("Intermec");
printer_set_option($handle, PRINTER_MODE, "raw");
printer_write($handle,$cmds);
printer_close($handle);
This is the site from which I copied the Intermec Programming Language commands.
The script connected to the printer successfully but after running it, the printer won't print anything, anything at all. The Printer Monitor keeps showing Syntax Error.
Did I do something really wrong? Is there a way to make it print again?
I didn't have the inspiration to note down the printer type (I won't have access to it until tomorrow), but it looks exactly like the one in the picture below:
Please help me, I have no idea what to do...
Did you get an answer elsewhere?
For me, I use the following in place of your first 3 lines
And for lines 8 to 10 I use
And in your last line I include
<FF>
after the<ETB>