New RPM 7 Beta is now available — try the new release →

FAQ for filter setup, running programs from RPM

When I first scoped out the capabilities of RPM Remote Print Manager® (“RPM”), I planned text print, raw print, and the filter for program execution. The program option was based on an earlier experience where having a program to translate a file from one format to another made it printable in my environment. In Unix, these were “filters”.

A common use for a filter is to transform the print job from one format to another, perhaps plaintext or the nroff markup language into PostScript. Another typical use we find in RPM is to inject a print job into a database. Obviously, that’s the work of a custom program.

TopicDescription
History of the FilterWhat we call a “filter” is just a program
What programs are candidates to be RPM filtersNot every program would be a good candidate to run as an RPM filter }
Basic filter program setupLet’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.
About standard outputDon’t I need stdin and stdout? My program has both input and output
About standard inputWe talked about standard output, but what is standard input?
What “Launch as a Shell Program” is aboutNote: “launch as shell program” is no longer supported under the newest versions of RPM.
What “Idle timeout” is aboutOnce in a while, we run into a vendor program with behavior that is a little puzzling. The program finishes but waits for user input to exit.
Detailed command line optionsLet’s take a closer look at the Arguments field in the filter setup.
How RPM quotes arguments on the command lineWhen RPM executes your command, it passes the command line to Windows as a string. You need to know how some arguments are treated as a single entity using quotes.
Doing a command line test of your filter programLet’s say you are not getting the results from your filter action that you expect. This article will help you test interactively.
Running 32-bit programs in a 64-bit environmentIf you are running the 32-bit RPM on 64-bit Windows, you may run into problems.
Differences between the system account and a desktop userRPM runs as a system service and by default, it uses the Windows system account.
Migrating your filter program to a new serverOne of the problems customers report to us with alarming frequency is that when they migrate their RPM configuration to a new system, the filters don’t seem to work at all.
Suggestions for troubleshootingAt the bottom of the filter setup form is the error handling setting.

Continue to: Logging →