I want to print .pdf files on a Zebra ZT411 via PHP or Cups.
I am currently using a PHP script which extracts labels from my database and sends them to the printer. Currently they are all formatted in ZPL. This works perfectly. Now I want to send PDF files to the Zebra printer. Unfortunately, this does not work like ZPL by simply sending it to the printer via port 9100. I have already tried to solve this via a CUPS but unfortunately this did not work.
Code for ZPL print:
$fp = @pfsockopen($printer_out, 9100, $errno, $errstr);
fputs($fp, $zpl_string);
fclose($fp);