Using printers to hold files

I've had this little proof of concept tool sitting around for a while: it essentially acts as an ftp-like front end for storing files on a network aware printer.

Most modern printers are not only network aware, but they generally have an embedded hard disk, used to store fonts, templates and even jobs. The de facto standard for communicating with printers is PCL - an ASCII with escape codes system that has existed since the 1980s.

PCL can be extended by using the PJL - the Printer Job Language - which, amongst other things, presents an interface to the hard disk, including cataloguing the disk, uploading and downloading files.

As PJL is just a PCL escape code set, then any way that PCL can be passed to the printer, such as USB, parallel, LPD, jetdirect, can be used to pass PJL commands.

The attached script accesses the printer through the jetdirect port (9100/tcp), which is a network to PCL connection.

To use, treat it like ftp:

$ ftp
pjlftp> open printer
pjlftp> drives
pjlftp> cd 0:

There are bugs in it and it hasn't been tested on many devices, e.g. for some reason it doesn't always return successfully after uploading a file. But it can be a useful tool for checking out printers.