Adding custom PJL instructions to print job

Getting sick of always having toner saver active when printing in Linux, I’ve used windows today to “print to file” and examine how the windows driver for my printer manages to override the toner saver settings.

It turns out that the windows driver prepends some PJL commands to the PostScript file that is sent to the printer. Nothing really fancy, so I would like to:

  • Define two logical printers: one that uses the “toner save” feature and one that prints with the highes quality.
  • For the “high quality” printer, prepend the same PJL commands that the windows driver adds.

Any hints on how I can do that (especially adding the PJL commands to the data that is sent to the printer)? My search skills seem to let me down on this one :frowning:

Hardware and software details:

  • OpenSuse 11.2
  • HP LaserJet 6MP
  • Printer networked through a D-Link one-port printer server (of the type you are supposed to plug into the printers parallel port)

I’ve managed to get things sort of working by defining a raw printer queue. After printing to a (PostScript) file and adding the PJL prologue and trailer, I can override the toner saver settings. Is it possible to add a filter on a raw queue (and only on that raw queue)? (The filter would be a rather dumb shell script that cats the prologue, the document and the trailer together.)