Let’s walk through the steps involved in creating a filter action with a simple program that takes its input and output arguments on the command line, runs, and exits cleanly.
In the UI, create a queue. I’ll call mine "a2ps" since I am using a program that goes by that name. Ironically, this program converts plain text to PostScript.
I found this particular program in a larger package of Unix utilities for Windows systems called "Cygwin". Obviously, this is not an endorsement of them, or of us by them. I use it here strictly for the sake of example.
Add an action by selecting "Select Action Type to Add" then choose "Filter Action". Click the "Add Action" button:
Since this is a simple setup on purpose, I’ll restrict the command line options I use here. Please note that the program actually has a wide variety of switches and seemingly thorough online help. If you need to convert text to PostScript, it's worth taking a look at this program.
The following shows the very minimalistic setup I used for this action:
I’ve selected the path for the a2ps program using the "browse" button for the "Executable" field.
RPM fills the Arguments field in with "%s". I amended that to "-o %s.ps %s" which means, make an output file with the same name as my input file, only add a ".ps" extension. That’s going to be my PostScript file.
The working directory is set to a folder on my D drive which I use for data. The working directory is the directory (or folder) which your program will be working in at launch time. As a general rule, you should set this to be the folder where you want the output created. We do not recommend setting this to any system folder or child of a system folder such as Windows or Program Files, so you should also change it if your program is in one of these folders.
In this example, we’ve used a program which is very uncomplicated to illustrate how RPM does not require many options if your program doesn’t require many options.