Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

SRP_RUN_COMMAND with 3rd party software

Hi SRP'ers

We are using a 3rd party product to print PDF job(s) silently and without any dialog boxes.
The product is called SumatraPDF and has worked well for awhile.

This has worked fine for 1 off print jobs but we are changing our batch printing jobs over to this method and I want to make sure SRP_RUN_COMMAND is configured properly.

Currently the SumatraPDF product resides on the server and is just a small .exe.

It is currently being called with :
Cmd = "n:\SumatraPDF30\SumatraPDF.exe -print-to-default -silent -exit-when-done ":Quote(PDFFile)
Status = SRP_Run_Command(Cmd)

I am wondering if would it be preferable to put the sumatrapdf.exe in the OI root directory or the users C: drive? Also, would it be recommended to add an increased TimeDelay factor to allow any stacked up jobs time to complete?

Thanks. BC

Comments

  • "...it will not return until the command completes execution"
  • edited January 2018
    The location of the EXE is really up to you. The only time having it on the network is problematic is if you have a pretty slow or locked down network. Otherwise, there is no real performance issue. The upside of putting it in the OI directory, I guess, is that it will move with the software. At any rate, I wouldn't worry too much about it from a performance perspective.

    As Barry pointed out, SRP_Run_Command runs the EXE synchronously, so it won't return until the EXE exits. So, you shouldn't have to worry about timing. However, if you actually want it to be asynchronous, then you will have to switch to another tool for running the EXE, such as RUNWIN.
Sign In or Register to comment.