Is it possible to get the CUPS printer/queuename in to the job stream?

Fred Heeks fred.heeks at hp.com
Fri Oct 2 04:47:45 PDT 2009


>
> Hello,
>
> On Oct 2 02:44 Fred Heeks wrote (shortened):
> > I've done some CUPS development around parsing of print jobs
> > which so far works fine. I'm only using RAW print jobs.
> > I now need to be able to determine which CUPS printer
> > printed a print job.
> > This information needs to be within the job stream itself,
>
> I don't know what there is in the actual job data stream
> but according to "man 7 filter":
> -------------------------------------------------------------
> The command name (argv[0]) is set to the name of the
> destination printer.
> ....
> The following environment variables are defined
> by the CUPS server when executing the filter:
> ....
>   PRINTER   The name of the printer.
> -------------------------------------------------------------
>
> For "raw" jobs, no filters are executed but at least
> the backend is executed and "man 7 backend" reads
> -------------------------------------------------------------
> Backends are a special type of filter(7)
> -------------------------------------------------------------
> so that the above information is also available
> for a backend.
>
> By the way:
> I do not understand how you do "parsing of print jobs"
> without executing a filter i.e. when you are "only using
> RAW print jobs"?
>
>
> Kind Regards
> Johannes Meixner
> --
> SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
> AG Nuernberg, HRB 16746, GF: Markus Rex
>
Basically, I have a number of CUPS print queues. Each of which send their print jobs to a raw socket, listening on a particular port. This listener takes the job data and parses it and then send it elsewhere.

I need to be able to determine which print queue send the data.




More information about the cups mailing list