pavement

Printing, about

From FreeBSDwiki
Revision as of 12:57, 8 June 2021 by Sidetone (Talk | contribs)
Jump to: navigation, search

About printing on FreeBSD: comparisons of printing protocols; about filters, Page Description Languages (PDL's) and printer specifications.

Contents

Protocols

LPD (Line Printer Daemon), IPP (Internet Printing Protocol) and pdl-datastream are printer protocols defined by IETF.

LPD is described by RFC 1179 (not as a standard). It uses service port 515.

IPP is defined by RFC 8011 and RFC 3510. It uses service port 631.

RFC 2569 is a memo on mapping between LPD and IPP.

pdl-datastream on service port 9100 is for proprietary printers and proprietary local network printer servers.

Printers can also use SMB (over Samba) as a protocol.

Comparison of: LPR, LPRng, CUPS

LPR is the default with FreeBSD. LPRng and CUPS are successors to this legacy protocol, which have their own implementations of LPD included. These three programs use and can alter printcap(5). LPR and LPRng both use the LPD protocol. LPR and CUPS daemons can be enabled through rc.conf. The CUPS framework supports more printers than LPR and LPRng. PCL printers are more readily supported under CUPS.

LPR requires manual set up through custom shell scripts of filters to convert plain text or other types of data, even between Postscript outputs to Postscript able printers. print/a2ps can simplify this task of converting ASCII to Postscript output.

LPR uses port 515.

LPRng (LPR Next Generation) is an advanced replacement for LPR, and is an alternative to CUPS. It is under the GPL and Artistic licenses. IFHP determines the format and does conversions, including by use of Ghostscript. LPRng takes care of format conversions through its filters, and of Postscript output through Ghostscript. LPRng was designed to be more secure than LPR. LPRng is found at sysutils/LPRng . It uses printcap, lpd.conf, and lpd.perms for configuration.

LPRng and CUPS software conflicts so cannot be installed together. lprng in services (rc.conf) requires that lpr and cupsd be disabled.

Some programs, such as forks of OpenOffice provide their own drivers, so their printing has to be set up independently from an already working CUPS or LPR configuration.

Specifications, Filters, PDL's

Postscript (PS) and PCL (Printer Command Language) are printer languages known as Page Description Languages (PDL's) supported by the majority of printers for interpreting and printing jobs. These two PDLs are alternate models developed by Adobe and HP respectively. PJL is another type of printer language for controlling features.

Many programs simply output data as Postscript. A filter is often needed for different types of output formats (separate from the printer language), even when the printer understands the same printer language as a program's output (such as Postscript). Output formats that need to be converted to a printer language include: dvi, Fortran and Raster.

Filters are useful for different types of output. Carriage returns are different for command line output from Bourne shells, MS DOS, text files and Postscript output. Without the right filters, printers can stair-step or text can otherwise be misaligned.

Printer packaging lists its specs, often: supported PDLs, fonts and graphics formats.

PCL

ASCII is a printer language which PCL is an extension of.

Postscript

LPR in base, and CUPS from ports perform the same function of receiving Postscript output and sending it to Postscript capable printers. CUPS allows printers that use other PCL's to be used through Postscript via PPD conversions. Ghostscript is a substitution for PCL printers to work as if they were Postscript. According to The Complete FreeBSD (2006), LPR is or was able to output to non-Postscript printers by using Ghostscript through printcap with gs as an input filter.

Ghostscript offers a few conversion programs between Postscript and pdf files. It also offers gv, which allows potential printer output to be seen on the monitor.

Postscript is the default for both CUPS and Apple. Conversions for other printers rely on PPD's, Ghostscript and perhaps Gutenprint. For the most common PDL's: Postscript is considered higher quality than PCL, so more preference is centered around it. There are also very high quality printers that don't use either of these two PDL's.

Postscript printers cost more because of hardware and font license fees from Adobe. However, this company offers Postscript software drivers for free. (Opensource driver software is available as mentioned a few times.) HP computers that have M in the model for Macintosh are Postscript printers (one may want to confirm that the specifications say Postscript).

Ghostscript

Ghostscript (under AGPL) can convert Postscript outputs to printer languages which specific non-Postscript printers can interpret. In addition to PCL, Ghostscript makes ESC printers functional. LPR can be set up to make use of Ghostscript. LPRng includes Ghostscript for printer language conversion too. Ghostscript can be used with LPR, CUPS, or LPRng

GhostViewer (print/gv ) is a program for viewing Postscript output on the screen.

ESC

ESC/P (Epson's developed PDL) printers are used in consumer inkjet printers, as well as dot matrix, receipt, thermal, labeling and barcode printers.

GDI/WIN

Win(dos) or GDI printers are generally incompatible with BSD's or Linux. Printers that let the software from the computer run them completely are referred to as dumb printers.

Components

The spool holds printing jobs to be printed in order. Print jobs are held in the /var/spool directory.

References/Further Reading

(some are out of date, but still have relevance)

Personal tools