Thursday, February 15, 2007

What is a postscript printer?

Postscript file describes the print job. PDF is a mathematical + portable way to represent a document on paper. If all the printers have a postscript interpreter than there will not be any need of multiple drivers. What we need is just a postscript interpreter in the printer(Postscript printer) and a way to generate PS files from the application. A postscript file includes information about the print job, like number of copies, orientation, who sent the job ect. All applications in the Unix world and Mac generate PS files and PDF files. So all we need to print this files on a PS printer is just send it to them. No comes the next issue which is how to customize the job. For general options like duplex and number of copies we can just send the postscript commands. But different manufacturers might support different set of options in there printer and the corresponding ps command may not be supported by other manufacturers. To solve this issue the PPD file was created. PDF is nothing but processed Postscript.This just a printer description file and list down all the capabilities of the printers and its corresponding ps options. So if a user wants to do stapling-booklet mode, the printing system just looks into the PPD and sends the appropriate PS command with the ps file to the printer.
Unlike the PS file(which is a printable file) the pdf does not store any print job information in it. It just has the document info. So the user has to select all these options like page size, orientation ect before he sends it the printer. Now comes XPS file format introduced by microsoft. XPS file format is based on XML and includes a print ticket with it. There is a default print ticket and a custom print ticket attached on the outside of the document. Now the user can be given a XPS document and when he prints this it will exactly look the way the creator of the document wanted it look like.

lpd printing system

lpd is line printing daemon. unix 1st printing system. Initial printing involved just dumping the text file to the printer connected via the parallel port. lpr is the program which submitted the job to the spooling daemon. But lpr did not support any of the options supported by the device except for usual options such as duplex and number of copies. Why do we need a spooling daemon? So that the printing interface can be separated from the the application world. Instead of each application supporting its printing, now they can communicate with a centralized printing system which takes of all the printing in the system. The application just need to handover the print job to this system and go back to doing what they were doing. The spooler will keep the print jobs together from all the applications and send them as an when the printer is available. This is the common concept of printing in all the OS's.