I have been all over stack looking at what is required to do this and have wound up being slightly confused.
Lets get one thing straight this is a local based intra-
Use PHP::PRINT::IPP
It is the most secure and easiest way for printing from Web using PHP. Here you don't have to enable exploitable php functions like exec()
, shell_exec()
etc.
Basic Usage
setHost("localhost");
$ipp->setPrinterURI("/printers/epson");
$ipp->setData("./testfiles/test-utf8.txt"); // Path to file.
$ipp->printJob();
?>
Reference