Plan 9: Network Printer (HP Deskjet Ink Advantage 3545)
Internet Printing Protocol Printing with Internet Printing Protocol (IPP) involves sending a Unirast Format (URF) image with appropriate protocol headers to port 631. It is the basis for standards like Windows Mopria Alliance , Apple AirPrint , and IPP Everywhere . It is also called Driverless Printing since this doesn't involve installing any printer specific driver. On Plan 9, printing involves three steps: Convert the document to PDF using lp Convert the PDF to URF using gs (use urfgray, urfrgb or urfcmyk device) Send the request to the printer using hget IPP header ( req.bin in the below script) contains page output options like paper size, margins etc. This is generated using ippenc.c . #!/bin/rc HOST=$1 FILE=$2 TFILE=/tmp/a.pdf URL=( http://$HOST:631/ipp/print/ ) if (! ~ $#* 2) echo 'Usage: $0 <printer-ip> <file>' lp -d stdout $FILE > $TFILE...