Lpoptions not when IPP submissions?

Enrique Perez-Terron enrio at online.no
Fri Jul 9 18:00:17 PDT 2004

I wrote my driver to use the fifth command line argument to set some options, but it turns out that the fifth argument comes empty unless
I actually use lpr to submit the job. (I have not tried lp, I assume that would be the same.)

The reason I need these options is that the printer heads get misaligned after replacement of the ink cartridges, and the alignment is different anyway for each instance of the printer.

But even If I put some option values in the PPD file, how are those values communicated to the filters and to the backend? My filter is a raster filter, i.e. it comes after pstoraster.

Is there a way to specify in the PPD file that an option belongs in the fifth argument to the filters?

For the time being I have written C code to open $CUPS_SERVERROOT/lpoptions, scan for a line starting with "Dest $PRINTER" (modulo whitespace), and process the remainder of that line as a white-space-separated list of options. (Actually, it comes to me now, it will even process in turn all lines starting "Dest $PRINTER", so the last setting of each variable wins.)

Any objections?

I have not (yet) implemented reading "~$2/.lpoptions" (where ~$2 denotes the home directory of the user named in the second argument). While this is feasible for my single-computer environment, other environments may not be able to do that.



More information about the cups mailing list