Tuesday, December 13, 2016

Printing II

How Linux Printing Works

The most common Linux printing system in use today is the Common UNIX
Printing System (CUPS). CUPS was designed from the ground up to make
Linux printing as easy as possible, whether printing to a locally
attached printer or to a remote network printer. The CUPS service is
provided by the cupsd daemon, which automatically announces the
availability of its print queues on the local network. CUPS client
systems listen to these announcements, allowing the user to select the
printer he or she wants with little networking knowledge.



In addition,CUPS supports network printing over the


Internet Printing Protocol(IPP) on port 631.




The CUPS system is composed of several component
parts.




The first is the CUPS scheduler, which is a web server that is used
solely to handle IPP printing requests from CUPS clients. Because
the CUPS scheduler runs on IP port 631, it can coexist with the Apache
web server running on the same system. In fact, the CUPS configuration
file even looks like the Apache web server’s configuration file. In
addition to processing print jobs, the CUPS scheduler also functions
as a typical web server, providing documentation as well as a CUPS
administration tool in a browser interface.




The next components you need to be familiar with are the CUPS filters.
Modern printers use a variety of different page description languages
(PDLs). In a Linux system, most applications generate print jobs using
Adobe’s PostScript PDL. This works well if you have a
PostScript-compatible printer. However, not all printers include
PostScript support due to the fact that the printer manufacturer must
pay licensing fees to Adobe, which can dramatically increase the price
of the unit. Instead, many printer manufacturers, such as
Hewlett-Packard, use the Printer Control Language (PCL) PDL. Other
manufacturers, such as Epson, use the ESC/P PDL.





If your printer isn’t PostScript compatible, you use CUPS filters to
convert print jobs from PostScript into the appropriate format using
the PDL of the printer to which they are being sent. These filters are
located in



/usr/lib/cups/filter




The next components you need to know about are the CUPS backends.
Backends are responsible for providing the interface between the
scheduler and the actual printer hardware. The CUPS backends are
located in



/usr/lib/cups/backend



CUPS provides backends for a variety of different printer interfaces, including parallel,
serial, USB, and so on. Each time cupsd starts, it queries each backend installed on
the system. The backends respond to the daemon, reporting whether or not a printer is 
connected. If a printer is connected, they report information about the printer, such as
the make and model.





The next CUPS components you need to be familiar with are the PPD
(PostScript Printer Description) files. PPDs are used by cupsd to
determine the capabilities of your printer. These PPD files are stored in



/etc/cups/ppd




The last CUPS component you need to be familiar with is the web-based
administration utility. The CUPS scheduler provides the web-based
administrative interface. The CUPS administration utility can be used
to set up printers and manage print jobs. To access the CUPS web-based
administration utility, just open a web browser and navigate to




http://your_server_address:631




When you do, the screen in Figure 16-1
is displayed.



When a print job is submitted to a CUPS server, the process depicted
in Figure 16-2 occurs.




First, an application on the client system generates a print job and
sends it to the cupsd daemon on the server. The daemon saves the job
in the spooling directory. Print queue and filter information from the
print job are saved in


/var/spool/cups



The file is named with a c,concatenated with a print job number assigned by
cupsd.


/var/spool/cups


The document to be printed is also saved in


/var/spool/cups

This time, however,the file is named with a d, concatenated with the print job 
number assigned by cupsd.




Next, the print job is sent to the filter for conversion to the
appropriate PDL. Once that’s done, the converted print job is sent
from the filter to the backend, which forwards the job to its
connected printer. After sending the job to the printer, the backend
notifies the cupsd daemon and the print job is deleted from the print
queue.







LX0-104 Exam Objectives (Q)

No comments:

Post a Comment