Saturday, January 30, 2010

LPR/LPD Printing

What is LPR/LPD?

LPR/LPD is a printing protocol that runs over TCP/IP. Originally implemented for BSD UNIX, its use has spread into other platforms such as AS/400 and legacy mainframe systems. It has essentially become a de-facto industry standard for cross-platform and platform-independent printing, which is a huge advantage of LPR/LPD printing.

The specifications for LPR are defined by the Internet Engineering Task Force (IETF) in Request for Comment 1179 (RFC-1179).

LPR stands for Line Printer Request. It refers to the process that sends print jobs to a remote printer or print queue. It is requesting the service of a print server, so it is the client side of LPR/LPD, and thus is often called the 'LPR client'.

LPD stands for Line Printer Daemon. It refers to the process that accepts print jobs from the LPR client. It is providing a service, so it is the server side of LPR/LPD, and thus is often called the 'LPD server. A daemon is a process running on a UNIX machine, providing services.

How does LPR work?

LPR client sends a request to port 515, the standard port for the LPR/LPD protocol. And the LPD server listens on the same port 515.

When the LPR client sends a print job to the LPD server, it send two files: a data file (the actual data to be printed), a control file.

The data file contains the actual data to be printed. It can be binary of text, depending on the actual format of the print file, or the application that generates the print file.

The name of the data file should start with "dfA", followed by a three digit job number, then followed by the host name that has constructed the data file.

The control file contains information that describes the data file (such as the format of the print data file, e.g., postscript, plain text, FORTRAN carriage control, etc.) and what to do with the data file (such as printing banner page, delete after print, or email after print).

The control file is a plain text file, and its file name should start with "cfA", followed by a three digit job number, followed by the host name which has constructed the control file.

Obviously, the "d" in the "dfA" prefix means data, and the "c" in the "cfA" prefix means control.

RFC-1179 does not impose on the order of the two files to be sent; i.e., one can send the control file first, or the data file first. However, some implementations may stipulate one way or the other, e.g., data file first, followed by control file.

In the future, we will show you how to print from non-windows systems to windows systems using this LPR/LPD protocol.



Click here to see a complete list of articles


To contact us: uniprint.user@gmail.com.

 


1 comment:

  1. Wοnderful рoѕt! We will be linκіng to thіs partiсulaгly gгeat articlе on our ωebѕite.
    Κeep up thе good ωriting.

    Feel free to vіѕit mу homepаgе
    ... http://www.sfgate.com/business/prweb/article/V2-Cigs-Review-Authentic-Smoking-Experience-or-4075176.php

    ReplyDelete