Can anybody help me: I am trying to run the following code with which I am trying to print a pdf file which is in a folder in the web directory, to a printer shared on a network.
<?
$WshShell = new COM("WScript.Shell");
if(!$WshShell){
echo "WshShell not working";
}
$theExe = '"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe"';
$pmcd = "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /t "C:\Inetpub\wwwroot\PMBDEV\PMB\printQ\memLetter.pdf" \MHSHOD2007\HPOffice "HP OfficeJet Pro 1150 C" LPT1:
$oExec = $WshShell->Run($pmcd, 3, 0);
?>
I am running PHP on IIS5 on windows 2000
AcroRd32.exe appears in the Windows task manager which to my mind means it is running. However, nothing prints, the pdf gets locked and I cannot terminate the task.
I think it has something to do with sharing the printer to the web apllication (is this necessary). How do I do this, I'm sure it is quite simple - HELP?
- note, \MHSHOD2007\HPOffice is the share name of the printer on the network, and my machine prints to it from the command line using the $pmcd string.:bemused: