Install Samba
smbclient "\\\\your.server.com\\YourSharedPrinter" -U "Domain\User" -c "print YouFileToPrint"
cat ~/.smbclient.conf
username=fboender
password=s3cr3t
$ smbclient -A ~/.smbclient.conf //192.168.10.10/MyShare
PHP with shell_exec()
echo shell_exec('smbclient "\\\\\\ip_or_name_computer\\\\nameofprintshare" -A /home/administrador/.smbclient.conf -c "print /home/..../file_to_print"');