1

On my network I want to use driverless printing with IPPEverywhere using the Linux CUPS printing system.

I have some network printer which does support driverless printing with IPP only very buggy. One does not print some pdf files, the other doesn't print more than one copy and so on. But they all print very well using its native PPD printer drivers. So I want to present a print server on my network that serves the network printer with its own printer drivers but appear on the network as a (virtual?) full powered IPP device for each network printer.

That means in general that the print server is "translating" the driverless IPP print commands from the network clients to the printers legacy print commands, so I have only IPPEverywhere print queues on the network. By default CUPS creates a local print queue that serves the printer either driverless using IPPEverywhere or with the legacy driver of the printer using its PPD file.

┏━━━━━━━━━━━━━┓
┃ localhost   ┃
┃   ┌───────┐ ┃                ┏━━━━━━━━━┓
┃   │ Queue │═╋════════════════┫ Printer ┃
┃   └───────┘ ┃                ┗━━━━━━━━━┛
┗━━━━━━━━━━━━━┛

The idea now is to have a printserver that behaves like a driverless printer on the network:

┏━━━━━━━━━━━━━┓                ┏━━━━━━━━━━━━━┓
┃ localhost   ┃                ┃ printserver ┃
┃   ┌───────┐ ┃ IPPEverywhere  ┃   ┌───────┐ ┃  legacy PPD driver  ┏━━━━━━━━━┓
┃   │ Queue │═╋════════════════┫   │ Queue │═╋═════════════════════┫ Printer ┃
┃   └───────┘ ┃                ┃   └───────┘ ┃                     ┗━━━━━━━━━┛
┗━━━━━━━━━━━━━┛                ┗━━━━━━━━━━━━━┛

Connecting the printer to the printserver with its legacy driver is no problem. This is the old method (but will become deprecated and removed with upstream CUPS versions).

But how can I find the printserver on the network so I can connect to it for example with my Android smartphone and print, using IPPEverywhere?

1 Answer 1

0

At time I use a partial solution that can only be used with Linux devices on the network but not as general printing solution for also mobile devices. But to have it documented I will share it. Maybe there are some pointers or answers from the community so we get the final solution.

I assume the Printer is successful connected and you can print to it from the Print Server:

printserver ~$ lp -E -d myprinter /usr/share/cups/data/testprint

I use Printer Sharing to have direct access to the Queue at printserver. For this I have to configure it as default Server instead of localhost for the local print queue.

┏━━━━━━━━━━━━━┓                ┏━━━━━━━━━━━━━┓
┃ localhost   ┃                ┃ printserver ┃
┃             ┃ IPPEverywhere  ┃   ┌───────┐ ┃  legacy PPD driver  ┏━━━━━━━━━━━┓
┃             ┃════════════════╋═══│ Queue │═╋═════════════════════┫ myprinter ┃
┃             ┃                ┃   └───────┘ ┃                     ┗━━━━━━━━━━━┛
┗━━━━━━━━━━━━━┛                ┗━━━━━━━━━━━━━┛

Using Debian Buster on the Print Server with CUPS installed you have to enable sharing:

printserver ~$ sudo cupsctl -E --share-printers
printserver ~$ sudo cupsctl -E   # check settings

Also with Debian on a device with CUPS installed set the default Print Server in /etc/cups/client.conf:

client ~$ sudo bash -c 'echo "ServerName printserver" >> /etc/cups/client.conf'

That's all we need to do to get access to the Printer. Check its status and options with:

client ~$ lpstat -E -t
client ~$ lpoptions -E
client ~$ lpoptions -E -l

With the last command you will find special options of the Printer that are not generic from lp, for example BRMonoColor of my color Printer. This example will print two copies of a two sided paper in grey instead default colored:

client ~$ lp -E -d myprinter -n 2 -o fit-to-page -o collate=true -o sides=two-sided-long-edge -o BRMonoColor=Mono ./two-pages.pdf

There may be a problem if you have for example, a USB Printer local connected to the client. You will not see its queue on localhost. In this case you can always specify the Print Server with the environment variable CUPS_SERVER:

client ~$ CUPS_SERVER=localhost lpstat -E -t
client ~$ CUPS_SERVER=localhost lp -E ...

References:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .