Hi would use shell_exec for direct print a PDF file. My code is:
<?php
shell_exec( 'print /d:"EPSON MFC-J265W" c:\file.txt');
?>
When i try to run this code i receive this error:
Unable to initialize the device Epson
Hi would use shell_exec for direct print a PDF file. My code is:
<?php
shell_exec( 'print /d:"EPSON MFC-J265W" c:\file.txt');
?>
When i try to run this code i receive this error:
Unable to initialize the device Epson
I'd bet you need to put it in quotes.
<?php
shell_exec( 'print /d:"EPSON MFC-J265W" c:\file.txt');
?>
Ultimately, you should test this on the command line to see what actually needs done.
I've just found a workaround!
$updateCommand = "w32tm /config /syncfromflags:manual /manualpeerlist:\\\"".$timeServers."\\\" /update";
$updateCommandCmd = 'cmd /c " '.$updateCommand.' "';
$updateResult = shell_exec($updateCommandCmd);
using cmd /c and escaping both \ and " creating something like
cmd /c " w32tm /config /syncfromflags:manual /manualpeerlist:\"0.europe.pool.ntp.org 1.europe.pool.ntp.org\" /update "
does the trick on windows 7 ONLY (sorry)