[cups.general] reading data from raw printer

Johannes Meixner jsmeix at suse.de
Thu Jul 5 02:59:46 PDT 2007


Hello,

On Jul 5 09:47 Tim Waugh wrote:
> On Thu, 2007-07-05 at 09:32 +0200, Johannes Meixner wrote:
> > And even for a queue with a usual current driver it may not work
> > because I assume that the usual current drivers do not yet
> > advertise support for the CUPS command file format.
> > At least this is how I understand
> > http://localhost:631/help/spec-command.html
> > "Printer drivers advertise support for the CUPS command file format
> >  by providing a filter for the application/vnd.cups-command file type."
> 
> It just means you need a line in the PPD saying what filters to run for
> the command files.

Therefore it cannot work for a raw queue.

> The command interface has the potential to be really useful, not least
> for things like finding out ink levels.  It's just that no-one seems to
> be using it or understand how it works...

At least for me this is true.

All I know is
http://localhost:631/help/spec-command.html

>From this I assume the CUPS command interface is just another
MIME type for usual print job data which is autodetected by CUPS
when the first line of the print job data is "#CUPS-COMMAND"
so that commands can be sent to the printer as usual print job like

echo -e "#CUPS-COMMAND\nPrintSelfTestPage" | lp -d queue

which will pass this print job data to the associated filter
for the CUPS command interface which then can convert the
"PrintSelfTestPage" command to whatever printer specific data
so that the printer actually prints its self-test page.

If I am right, then I still do not understand how the CUPS command
interface can be used to read data from a printer and how to do
some kind of "communication" with a printing application program.

I assume the CUPS 1.2 backchannel is also required to get data
from a printer.

But even if the associated filter for the commands gets back
data from the printer, there is still the problem of the initial
posting how to communicate with a printing application program.

As far as I understand "man filter" versus "man backend"
only backends can send specific exit codes to the cupsd
to trigger specific actions what the cupsd should do with
the print job or the queue which could be used for some very
basic "communication" with a printing application program
(better call it "feedback" to a printing application program).


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex





More information about the cups mailing list