New RPM 7 is now available — see what’s new →

Doing a command line test of your filter program

Screenshots in this article are from RPM 7.0.

Let’s say you are not getting the results from your filter action that you expect. Maybe you suspect that the command line has problems, and you want to see what RPM is really doing.

In the user interface, open the Message Log tab.

Filter command line in log

Look for the message with code 605 in the Code column: “Filter job … cmdline …”. Here it is job 1583, between the job arriving and the filter action finishing.

RPM logs message 605 only when the filter action has Interact with Desktop checked. If yours doesn’t, turn it on while you test.

This message shows the arguments RPM passes to your program, after it has filled in %s and the other variables. Put the Program path from your filter setup in front of them and you have the full command line, which you could enter in a command window if you had the print job. Here’s how to get the data file to work with:

  1. In the user interface, select the queue you are working with

  2. Under Queue States, at the bottom left of the window, make sure Suspend is checked

  3. Send another job

  4. In the UI, right-click on the job and select Find File In Explorer

    Filter folder open

  5. Note the job’s Id in the job list. Mine was job 55134, and in the Windows Explorer folder we see a file with that name:

    Filter folder

    Copy that file to the working directory of your filter action. If you can do all this, you don’t need me to explain how to copy a file. You’ll have to decide what name to use for the file so I’ll leave that to you. If it were me, I’d use the job name or whatever your filter action setup dictated.

  6. Now that you see the command line, and have the job available, run the command. Let the troubleshooting commence.

Presumably, at this point, you can track down any errors in the command line by experimenting in the command shell, and fixing the filter action setup accordingly.

How to test if you are using transforms

If you are using transforms before running your filter action, we use a slightly different approach for this command window test.

This is my recommendation:

  • In the queue setup, disable the filter action
  • Add an archive action and deposit your print job into the same folder you use for the working directory in the filter action
  • Send a sample print job

Now you will have a file in the right folder, and you have the sample command line from the log window, so you should be ready to test. This is actually a little easier than the steps we used above to look for the data file. The main reason I didn’t mention it is that some might find it disconcerting to disable the filter action and add another. To me, it’s the flexibility that makes the job easy, not complicated.

When you have completed troubleshooting your filter setup, don’t forget to delete the archive action (if you added it just for testing) and enable your filter action.

Continue to: System acct →