Just wanted to see if anyone has some input on this. Even if not completely specific to this use case.
1 of 1 people found this helpful
and it works great.
I am only using the Client.php code - which a nice wrapper for TCP/IP sockets.
Idk if this is useful to anyone or not, but we use a php passthrough script to send zpl data as a string to the printer. The zpl is generated from the UPS shipping response and then just gets forwarded to the printer.
* File Allows printing from web interface, simply connects to the Zebra Printer and then pumps data
* into it which gets printed out.
$print_data = $_POST['zpl'];
// Open a telnet connection to the printer, then push all the data into it.
$print_data = str_replace('^XA^','^XA^^LT10^LS-5',$print_data); //this corrects the label top and label side properties to align the label correctly
echo 'Successfully Printed';
catch (Exception $e)
echo 'Print Failed.';