Thanks guys for your help.
As to installing the service - I use a script I found on the net. It works so I dont worry about that.
I have tried:
ShellExecute(print => $file, 0, 0, 'SW_HIDDEN');
This works manually and not as service. AcroRd32.exe is called by that class and it does never quit.
I also installed ghostscript and tried:
system "c:\\apps\\gswin32c.lnk -dPrinted -dBATCH -q -sDEVICE=mswinpr2
+-dNoCancel -dNOPAUSE \"$file\"";
Works manually but not as service.
Interestingly, a dialogue box comes up to OK or Cancel the print (which probably is the show stopper for the service to work).
I assume if I can get the dialogue box to not appear I have a solution.
According to some ghostscript forum the -dNoCancel options is supposed to remedy that but in my case it does not.
I'll keep digging...
|