fbpx FAQ for RPM filter processing, running a program from RPM | Brooksnet

FAQ for RPM filter processing, running a program from RPM

When I first scoped out the capabilities for 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.

History of the Filter

What we call a "filter" is just a program.

What programs are candidates to be RPM filters

Not every program would be a good candidate to run as an RPM filter.

Basic filter program setup

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.

About standard output

Don’t I need stdin and stdout? My program has both input and output

About standard input

We talked about standard output, but what is standard input?

What "Launch as a Shell Program" is about

The option to "launch as a Shell Program (cmd.exe)" primarily makes a more stable environment for running Windows batch files.

We have supported customers who used this and found their processing went according to their plan. If you want to try it, please take note of your results with and without the setting.

What "Idle timeout" is about

Once in a while, we run into a vendor program with behavior that is a little puzzling.

Detailed command line options

Let’s take a closer look at the Arguments field in the filter setup.

How RPM quotes arguments on the command line

When RPM executes your command, it passes the command line to Windows as a string.

Doing a command line test of your filter program

Let’s say you are not getting the results from your filter action that you expect.

Running 32-bit programs in a 64-bit environment

If you are running the 32-bit RPM on 64-bit Windows, you may run into problems.

Differences between the system account and a desktop user

RPM runs as a system service and by default, it uses the Windows system account.

Migrating your filter program to a new server

One 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 troubleshooting

At the bottom of the filter setup form is the error handling setting: