top of page
Search

Linux Printing Systems

  • Anne Shroble
  • Apr 21, 2016
  • 4 min read

In 1997, the owner of Easy Software Products, Michael Sweet started developing Common Unix Printing System. CUPS, which is a modular printing system for Unix-like computers allows a computer to act like a print server. A computer with CUPS installed becomes the host, and accepts print jobs from client computers, processes the jobs, and sends them to the appropriate printer. As the diagram shows, CUPS consists of a print scheduler/spooler, a filter which converts the data into a format that is readable by the printer, and a backend device which refers to the method used to deliver the data. There are several backends available for CUPS: parallel, serial, and USB ports, cups-pdf, PDF Virtual Printing, as well as network backends that operate via the Internet Printing Protocol (IPP), JetDirect (AppSocket), Line Printer Daemon ("LPD"), and SMB protocols.

A new mdns backend in CUPS 1.4 provides Bonjour (DNS-SD) based printer discovery. In CUPS 1.6, Bonjour printer discovery and sharing using Avahi is also supported.

Filtering process

The filtering process works by taking input data pre-formatted with six arguments:

  • the job ID of the print job

  • the user-name

  • the job-name

  • the number of copies to print

  • any print options

  • the filename (though this is unnecessary if it has been redirected from standard input).

It then determines the type of data that is being input and the filter to be used through the use of the MIME databases; for instance, image data will be detected and processed through a particular filter, and HTML data detected and processed through another filter.

CUPS can convert supplied data either into PostScript data or directly into raster data. If it is converted into PostScript data an additional filter is applied called a prefilter, which runs the PostScript data through another PostScript converter so that it can add printer specific options like selecting page ranges to print, setting n-up mode and other device-specific things. After the pre-filtering is done, the data can either be sent directly to a CUPS backend if using a PostScript printer, or it can be passed to another filter like Foomatic by linuxprinting.org. Alternatively, it can be passed to Ghostscript, which converts the PostScript into an intermediary CUPS-raster format. The intermediary raster format is then passed onto a final filter which converts the raster data to a printer-specific format. The default filters included with CUPS include:

  • raster to PCL

  • raster to ESC/P or ESC/P2 (an Epson printer language, now largely superseded by their new ESC/P-Raster format)

  • raster to Dymo (another printer company).

  • raster to Zebra Programming Language or ZPL (a Zebra Technologies printer language)

As of 2009 other proprietary languages like GDI or SPL (Samsung Printer Language) are supported by Splix, a raster to SPL translator.

However, several other alternatives can integrate with CUPS. HPLIP (previously known as HP-IJS) provides Linux+CUPS drivers for HP printers, Gutenprint (previously known as Gimp-Print) is a range of high-quality printer drivers for (mostly) inkjet printers, and TurboPrint for Linux has another range of quality printer drivers for a wide range of printers.

The filtering process was found on Wikipedia in the CUPS article, and if you are interested (I know I was) there is a ton of other really cool stuff discussed. The scheduler process, and the different versions CUPS has gone through are mentioned. I strongly suggest one reads this article. Now I know some people don’t really like “WIKI”, but I find it to be easy reading and very understandable.

Linux print vs Windows…well:

Differences in Printing between Windows and Linux

When printing via network with Windows, the most usual case is for the client system to run a driver for the printer which converts the original data (plain text, Microsoft Office documents, or other proprietary formats) into printer-specific format and then send the converted data via network to a printer share on a Windows print server via the SMB protocol. The print server then sends the printer-specific data to the printer. Usually the Windows print server does only the spooling (plain data buffering and transfer to the printer device). The filtering (conversion into printer-specific format) is done on the client system, so printer drivers must be installed on the client systems. When printers are added or replaced, users must install the matching drivers on their laptops or workstations before they can print. Or an automatism installs drivers automatically from a Windows print server on the client systems - provided the users of the client systems like it when an automatism installs software on their laptops or workstations which means that the users must trust such "foreign" software ("how to hijack laptops of innocent guests when they like to print in our environment"). (Sounds like Harry H. Hacker)

With UNIX/Linux printing, client systems send the original data (plain text, PostScript, PDF, or JPEG) to the CUPS print server, specifically to a print queue via the IPP protocol. The CUPS server then runs a driver for the printer which converts the data into printer-specific format and sends the converted data to the printer device. The CUPS server does both the spooling and filtering. This means that client systems don't need to know about differences in printer models and don't need printer-specific drivers. The CUPS server handles the specific details of the printer hardware. The advantage is that end-users can connect laptops and desktops to a network where a CUPS server is running, run their own cupsd on the laptop or desktop, and print immediately. For additional detail, see "Intrinsic Design of CUPS for Printing in the Network" at SDB:CUPS in a Nutshell.

So there we have it. Linux printing explained, CUPS defined, CUPS vs Windows. And the winner is…

Let’s not go there, we are supposed to be impartial here. Anyway, I hope this was informative as well as interesting. Here’s wishing you “Happy Researching” for another day.

References:

"CUPS." Wikipedia. Wikimedia Foundation. Web. 20 Apr. 2016.

"SDB:Printing from Windows to Linux." - OpenSUSE. Web. 20 Apr. 2016.


 
 
 

Recent Posts

See All
What's New in the News

It's been a long time since visiting this site. I've been searching for employment, haven't found the appropriate match for me. I've...

 
 
 
Steganography and You

Hey, hey, hey, look who’s back! Harry N. Hacker here. The boss and Anne are on vacation this week, so I’m going to tell you about my...

 
 
 
The Cleaner: A Review

Good afternoon to all you happy blog followers. Today we are going to investigate a software package called Moosoft’s The Cleaner. The...

 
 
 

Comments


Featured Posts
Recent Posts
Archive
WHATEVER THE WEATHER
INSPIRATION
Follow Me

    This is the day the Lord has made;

    let us rejoice and be glad in it.

       -Psalm 118:24     

     

     

    Whatever you do,

    work at it with all your heart,

    as working for the Lord,

    not for men.

    - Colossians 3:23     

     

    • LinkedIn - Black Circle

     

     

    E-mail: 

    anne_shroble@sbcglobal.net

    © 2023 BY FREE LINE CREATIVE STUDIO. PROUDLY MADE BY WIX.COM

    bottom of page