Notes about Linux printing

Updated: 2023-12-30
Created: 2023-12-30

Printing overview (231230)

Printing is not complicated:

  1. Files to print are converted by some document processor from some kind of text markup or image format into a display format, often PDF or PostScript.
  2. Then the PDF or PostScript files are rendered into whatever format the printer requires (which can be a simple bit or pixel raster) unless the printer accept PDF or PostScript directly.
    Note: sometimes it is better to render on the print server even if the printer supports PDF or PostScript if the printer support is very slow or is constrained by limited memory.
    Note: in addition to PDF or PostScript many printers support the PCL by HP or many others.
  3. Finally the data is sent to the printer using some kind of transmission protocol.

So in general all that is needed apart from a queueing system is a way for PDF or PostScript to be rendered or left alone, and then for a way to send the data to the printer.

The rest of this document is mostly about the spooler CUPS and related tools, because it is by far the most complicated, and underdocumented (and most common unfortunately), but it also covers more general issues.

Print spooler (231230)

CUPS (231230)

CUPS is designed to be user friendly (actually developer job security friendly) so all this is done in as complicated and fragile a way as possible by using a creepy web frontend that actually edits files under /etc/:

Future releases of CUPS will only support IPP Everywhere printers, which must support as page languages JPEG, PWG raster and PDF and therefore CUPS will become driverless:

CUPS printer drivers and backends are deprecated and will no longer be supported in a future feature release of CUPS. Printers that do not support IPP can be supported using applications such as ippeveprinter(1).

The critical details are:

LPR-ng (231230)

lpr (231230)

LPD (231230)

Page languages (231230)

groff_out (231230)

DVI (231230)

PostScript (231230)

PDF (231230)

XPS (231230)

Printer languages (231230)

PCL (231230)

PCL comes in several different levels and dialects for HP printers, and many other printer manufacturers offer PCL compatibility. The most common PCL level are PCL5 and PCL6.

ESC/P (231230)

This is the first printer language for IBM PC-compatible printers, as the first printer for that was an EPSON printer with this command language. It also comes in several variants and levels, of which the most common is ESC/P-R.

Prescribe (231230)

This is the printer language for Kyocera printers and it is somewhat similar in concept to PostScript. The most common level seems to be version 3.

Main document processors (231230)

This section is about document processors in their role of converters from some document language to some page language rather than in general.

Main renderers (231230)

Renders can be divided in high-level renderers, that translate a page language into a similarly high-level printer language, and low-level renderers also called rasterizers that translate a page language into a bit or pixel raster, for those printers that do not have a built-in rasterizer, or their rasterizer is too limited in speed or memory.

Main high-level renderers (231230)

Main low-level renderers (231230)