One of the best solution is to use
ippserver. It comes with
CUPSv2.2.2 and higher. You can alternatively get the project from here: IPP sample implementations.
According to the description on the manual page:
ippserver is a simple Internet Printing Protocol (IPP) server conforming to the IPP Everywhere and IPP Shared Infrastructure Extensions (INFRA) specifications. It can be used as a standalone print server and/or a very basic infrastructure server between standard IPP clients and IPP proxies conforming to the INFRA specification.
To use it, all you need to do is run
ippserver "My cool printer", and it will create a virtual printer with the name
My cool printer for you. It runs like a web server and listens on specific ports.
In case you need multiple printers, you can run the server on multiple ports using
ippserver "My other cool printer" -p 8888.
You can even supply printer attributes using an attributes file. For instance, your printer supports by default high quality prints, you can add the following attribute in the attributes file:
ATTR enum print-quality-default high
and run the server using:
ippserver "My high quality cool printer" -a attributes-file.txt
- PWG IPP Sample
- CUPS ipptoolfile man page