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:
This works manually and not as service. AcroRd32.exe is called by that class and it does never quit.ShellExecute(print => $file, 0, 0, 'SW_HIDDEN');
I also installed ghostscript and tried:
Works manually but not as service.system "c:\\apps\\gswin32c.lnk -dPrinted -dBATCH -q -sDEVICE=mswinpr2 +-dNoCancel -dNOPAUSE \"$file\"";
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...
In reply to Re^2: Printing PDFs as a windows service
by stephanm
in thread Printing PDFs as a windows service
by stephanm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |