in reply to Printing PDFs as a windows service

You may want to have a look at Win32::FileOp, using ShellExecute to print your pdf(s).

For example, ShellExecute(print => 'C:/MyPdfFile.pdf');

Replies are listed 'Best First'.
Re^2: Printing PDFs as a windows service
by stephanm (Sexton) on Jun 25, 2010 at 02:24 UTC
    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...