Listing Printers, and printing to the iPrint server

lpstat Is perfectly able to list the printers the iPrint server serves:

apprentice@pc:~$ lpstat -h -a
PRN104201 accepting requests since do 01 jan 1970 01:00:00 CET
PRN104202 accepting requests since do 01 jan 1970 01:00:00 CET
PRN104203 accepting requests since do 01 jan 1970 01:00:00 CET
<snip many more>

And this already suffices to print through the iPrint queue:

apprentice@pc:~$ lpadmin -pPRN104210 -v ipp:// -E
apprentice@pc:~$  lp -d PRN104210 2bprinted
request id is PRN104210-1 (1 file(s))

(The file is indeed printed.)

We could easily feed the output of lpstat through a script that would add all these available printers to the local CUPS config. But they would all show up as "Local Raw Printer"... (Btw, a 'raw' printer in CUPS is one that gets sent unfiltered input. But since there is a filter at the iPrint server as well, we can also print PostScript, or anything we like.)