From 6bf7ea511d97c25836b1433a29b035b07d62676e Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Fri, 24 Jun 2005 05:52:48 +0000 Subject: Updates. (This used to be commit 471d549a6dae3349ac5ee523424cfbd080009877) --- docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml | 382 +++++++++++++++++++++++++--- 1 file changed, 341 insertions(+), 41 deletions(-) diff --git a/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml b/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml index 64d4ecfa09..e5d0675024 100644 --- a/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml +++ b/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml @@ -34,6 +34,7 @@ Features and Benefits +default printing The Common UNIX Print System (CUPS) has become quite popular. All major Linux distributions now ship it as their default printing system. To many, it is still a mystical tool. Mostly, it just works. People tend to regard @@ -44,6 +45,7 @@ +CUPS CUPS sports quite a few unique and powerful features. While its basic functions may be grasped quite easily, they are also new. Because it is different from other, more traditional printing systems, it is best not to try to apply any prior knowledge about printing to this new system. Rather, try to understand CUPS from @@ -57,6 +59,14 @@ Overview +print spooling system +CUPS +printer management system +IETF +Internet Printing ProtocolIPP +Internet Engineering Task ForceIETF +GUI +KDEPrint CUPS is more than just a print spooling system. It is a complete printer management system that complies with the new Internet Printing Protocol (IPP). IPP is an industry and Internet Engineering Task Force (IETF) standard for network printing. Many of its functions can be managed remotely (or locally) via a Web @@ -66,6 +76,8 @@ +raw printers +smart printers CUPS allows creation of raw printers (i.e., no print file format translation) as well as smart printers (i.e., CUPS does file format conversion as required for the printer). In many ways this gives CUPS capabilities similar to the MS Windows print monitoring system. Of @@ -81,23 +93,29 @@ Basic CUPS Support Configuration - Printing with CUPS in the most basic &smb.conf; setup in Samba-3.0 (as was true for 2.2.x) requires just - two parameters: cups and - cups. CUPS does not need a printcap file. - However, the cupsd.conf configuration file knows of two related directives that control - how such a file will be automatically created and maintained by CUPS for the convenience of third-party - applications (example: Printcap /etc/printcap and PrintcapFormat BSD). - Legacy programs often require the existence of a printcap file containing printer names or they will refuse to - print. Make sure CUPS is set to generate and maintain a printcap file. For details, see - man cupsd.conf and other CUPS-related documentation, like the wealth of documents - regarding theCUPS server itself available from the - CUPS web site. +CUPS +cupsd.conf +/etc/printcap +Printcap +PrintcapFormat +Printing with CUPS in the most basic &smb.conf; setup in Samba-3.0 (as was true for 2.2.x) requires just two +parameters: cups and cups. CUPS does not need a printcap file. However, the +cupsd.conf configuration file knows of two related directives that control how such a +file will be automatically created and maintained by CUPS for the convenience of third-party applications +(example: Printcap /etc/printcap and PrintcapFormat BSD). +Legacy programs often require the existence of a printcap file containing printer names or they will refuse to +print. Make sure CUPS is set to generate and maintain a printcap file. For details, see man +cupsd.conf and other CUPS-related documentation, like the wealth of documents regarding the CUPS +server itself available from the CUPS web site. Linking smbd with libcups.so +libcups.so Samba has a special relationship to CUPS. Samba can be compiled with CUPS library support. Most recent installations have this support enabled. By default, CUPS linking is compiled into smbd and other Samba binaries. Of course, you can use CUPS even @@ -106,6 +124,8 @@ +libcups +ldd When Samba is compiled and linked with libcups, cups uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V commands with an additional -oraw option for printing. On a Linux @@ -122,6 +142,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +libcups.so.2 The line libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) shows there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups is set, then any otherwise manually set print command in &smb.conf; is ignored. @@ -173,6 +194,9 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +PDF +PostScript +printer driver This is all you need for basic printing setup for CUPS. It will print all graphic, text, PDF, and PostScript files submitted from Windows clients. However, most of your Windows users would not know how to send these kinds of files to print without opening a GUI application. Windows clients tend to have local printer drivers @@ -256,6 +280,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +spooling spoolingcentral spoolingpeer-to-peer Many small office or home networks, as well as badly organized larger environments, allow each client a direct @@ -274,7 +299,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) spooling-only - "raw" printing + raw printing Most traditionally configured UNIX print servers acting on behalf of Samba's Windows clients represented a really simple setup. Their only task was to manage the raw spooling of all jobs handed to them by @@ -285,6 +310,8 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +render +vendor-provided drivers It is possible to configure CUPS, Samba, and your Windows clients in the same traditional and simple way. When CUPS printers are configured for raw print-through mode operation, it is the responsibility of the @@ -306,6 +333,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) Configuration Steps for Raw CUPS Printing Support +/etc/cups/mime.types Edit /etc/cups/mime.types to uncomment the line near the end of the file that has: @@ -314,6 +342,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +/etc/cups/mime.convs Do the same for the file /etc/cups/mime.convs. @@ -424,6 +453,7 @@ application/octet-stream application/vnd.cups-raw 0 - application/octet-stream +MIME type That CUPS is a more security-aware printing system than traditional ones does not by default allow a user to send deliberate (possibly binary) data to printing devices. This could be easily abused to launch a Denial of Service attack on your printer(s), causing at least the loss of a lot of paper and @@ -459,7 +489,7 @@ application/octet-stream application/vnd.cups-raw 0 - share). For a discussion on how to deposit printer drivers on the Samba host (so the Windows clients can download and use them via Point'n'Print), please refer to the Classic Printing - chapter of this Samba-3 HOWTO Collection. There you will find a description or reference to + chapter of this book. There you will find a description or reference to three methods of preparing the client drivers on the Samba server: @@ -479,7 +509,8 @@ application/octet-stream application/vnd.cups-raw 0 - - + +cupsaddsmb These three methods apply to CUPS all the same. The cupsaddsmb utility is new and more convenient way to load the Windows drivers into Samba is provided if you use CUPS. @@ -506,6 +537,9 @@ application/octet-stream application/vnd.cups-raw 0 - You might need to set up CUPS in a smarter way. The reasons could be manifold: +print statistics +average print run +print quota Maybe your boss wants to get monthly statistics: Which printer did how many pages? What was the average data size of a job? @@ -550,6 +584,9 @@ application/octet-stream application/vnd.cups-raw 0 - PCL PDL +PostScript +Adobe +page description languagesPDL You can't expect to throw just any file format at a printer and have it get printed. A file format conversion must take place. The problem is that there is no common standard for print file formats across all manufacturers and printer types. While PostScript (trademark held by Adobe) and, to an extent, PCL (trademark @@ -567,6 +604,7 @@ application/octet-stream application/vnd.cups-raw 0 - GDI EMF WYSIWYG +Enhanced MetaFileEMF In Windows OS, the format conversion job is done by the printer drivers. On MS Windows OS platforms all application programmers have at their disposal a built-in API, the graphical device interface (GDI), as part and parcel of the OS itself to base themselves on. This GDI core is used as one common unified ground for all @@ -580,6 +618,8 @@ application/octet-stream application/vnd.cups-raw 0 - PDF +Xprint +core graphic engine To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating X Window System PostScript @@ -626,6 +666,15 @@ application/octet-stream application/vnd.cups-raw 0 - PostScript +color +linewidth +scale +distort +rotate +shift +raster images +display PostScript +graphical objects The PostScript programming language is an invention by Adobe, but its specifications have been published extensively. Its strength lies in its powerful abilities to describe graphical objects (fonts, shapes, patterns, lines, curves, and dots), their attributes (color, linewidth), and the way to manipulate @@ -647,6 +696,8 @@ application/octet-stream application/vnd.cups-raw 0 - PostScript GhostScriptPostScript PostScriptRIP +PostScript interpreter +raster image processorRIP So, UNIX is lacking a common ground for printing on paper and displaying on screen. Despite this unfavorable legacy for UNIX, basic printing is fairly easy if you have PostScript printers at your disposal. The reason is these devices have a built-in PostScript language interpreter, also called a raster image @@ -658,6 +709,8 @@ application/octet-stream application/vnd.cups-raw 0 - PPD +PPD-aware +PostScript Printer DescriptionPPD Traditional UNIX programs and printing systems &smbmdash; while using PostScript &smbmdash; are largely not PPD-aware. PPDs are PostScript Printer Description files. They enable you to specify and control all options a printer supports: duplexing, stapling, and punching. Therefore, UNIX users for a long @@ -699,6 +752,9 @@ application/octet-stream application/vnd.cups-raw 0 - +PNG +AFPL +ESP Use the gs -h command to check for all built-in devices on your Ghostscript version. If you specify a parameter of -sDEVICE=png256 on your Ghostscript command line, you are asking Ghostscript to convert the input into a PNG file. Naming a device on the @@ -720,6 +776,8 @@ application/octet-stream application/vnd.cups-raw 0 - PPD +PDL +PostScript While PostScript in essence is a PDL to represent the page layout in a device-independent way, real-world print jobs are always ending up being output on hardware with device-specific features. To take care of all the differences in hardware and to allow for innovations, Adobe has specified a syntax and file format for @@ -748,6 +806,7 @@ application/octet-stream application/vnd.cups-raw 0 - PDF +PDF distilling A PostScript file that was created to contain device-specific commands for achieving a certain print job output (e.g., duplexed, stapled, and punched) on a specific target machine may not print as expected, or @@ -760,6 +819,9 @@ application/octet-stream application/vnd.cups-raw 0 - Using Windows-Formatted Vendor PPDs +CUPS +PPDs +PostScript CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if a vendor does not mention our favorite OS in his or her manuals and brochures, you can safely trust this: If you get the Windows NT version of the PPD, you can use it unchanged in CUPS and thus @@ -783,6 +845,7 @@ application/octet-stream application/vnd.cups-raw 0 - +W32X86/2 If you are looking for an original vendor-provided PPD of a specific device, and you know that an NT4 box (or any other Windows box) on your LAN has the PostScript driver installed, just use smbclient //NT4-box/print\$ -U username to access the Windows directory where all printer driver files are @@ -794,6 +857,9 @@ application/octet-stream application/vnd.cups-raw 0 - CUPS Also Uses PPDs for Non-PostScript Printers +non-PostScript +PPD +CUPS filtering CUPS also uses specially crafted PPDs to handle non-PostScript printers. These PPDs are usually not available from the vendors (and no, you can't just take the PPD of a PostScript printer with the same model name and hope it works for the non-PostScript version too). To understand how these PPDs work for non-PS printers, we @@ -808,6 +874,11 @@ application/octet-stream application/vnd.cups-raw 0 - The CUPS Filtering Architecture +CUPS filtering +Ghostscript +MIME type +MIME recognition +MIME conversion rules The core of the CUPS filtering system is based on Ghostscript. In addition to Ghostscript, CUPS uses some other filters of its own. You (or your OS vendor) may have plugged in even more filters. CUPS handles all data file formats under the label of various MIME types. Every incoming print file is subjected to an initial @@ -823,18 +894,24 @@ If CUPS rasterizes a PostScript file natively to a bitmap, this is done in two s +generic raster format +CUPS raster The first stage uses a Ghostscript device named cups (this is since version 1.1.15) and produces a generic raster format called CUPS raster. +raster driver The second stage uses a raster driver that converts the generic CUPS raster to a device-specific raster. +Ghostscript +GNU Ghostscript +ESP Ghostscript Make sure your Ghostscript version has the cups device compiled in (check with gs -h | grep cups). Otherwise you may encounter the dreaded Unable to convert file 0 in your CUPS error_log file. To have cups as a device in your Ghostscript, @@ -849,6 +926,8 @@ It is now recommended by Linuxprinting.org for all spoolers. cupsomatic foomatic +foomatic-rip +ESP Ghostscript CUPS printers may be set up to use external rendering paths. One of the most common is provided by the Foomatic/cupsomatic concept from Linuxprinting.org. This uses the classical Ghostscript approach, doing everything in one step. It does not use the @@ -865,6 +944,9 @@ called now foomatic-rip, follows). MIMEfilters MIME +mime.types +application/pdf +autotyping CUPS reads the file /etc/cups/mime.types (and all other files carrying a *.types suffix in the same directory) upon startup. These files contain the MIME type recognition rules that are applied when CUPS runs its autotyping routines. The rule syntax is explained in the @@ -874,12 +956,20 @@ called now foomatic-rip, follows). application/pdf pdf string(0,%PDF) +%PDF +.pdf This means if a filename has a .pdf suffix or if the magic string %PDF is right at the beginning of the file itself (offset 0 from the start), then it is a PDF file (application/pdf). Another rule is this: application/postscript ai eps ps string(0,%!) string(0,<04>%!) +suffixes +.ai +.eps +.ps +generic PostScript +application/postscript If the filename has one of the suffixes .ai, .eps, .ps, or if the file itself starts with one of the strings %! or %!]]>, it is a generic PostScript file @@ -887,11 +977,17 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) +/etc/cups/ Don't confuse the other mime.types files your system might be using with the one in the /etc/cups/ directory. +application/postscript +PostScript +filter +PPD +transformation There is an important difference between two similar MIME types in CUPS: one is application/postscript, the other is application/vnd.cups-postscript. While application/postscript is @@ -904,8 +1000,24 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) +ASCII +HP-GL +PDF +PostScript +DVI +GIF +PNG +TIFF +JPEG +Photo-CD +SUN-Raster +PNM +PBM +SGI-RGB +MIME +filters CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and - many image formats (GIF. PNG, TIFF, JPEG, Photo-CD, SUN-Raster, + many image formats (GIF, PNG, TIFF, JPEG, Photo-CD, SUN-Raster, PNM, PBM, SGI-RGB, and more) and their associated MIME types with its filters. @@ -919,6 +1031,9 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) MIME application/pdf +/etc/cups/mime.convs +application/pdf +application/postscript CUPS reads the file /etc/cups/mime.convs (and all other files named with a *.convs suffix in the same directory) upon startup. These files contain @@ -929,6 +1044,7 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) application/pdf application/postscript 33 pdftops +pdftops This means that the pdftops filter will take application/pdf as input and produce application/postscript as output; the virtual @@ -938,6 +1054,7 @@ application/pdf application/postscript 33 pdftops application/vnd.hp-HPGL application/postscript 66 hpgltops +hpgltops This is the hpgltops, which processes HP-GL plotter files to PostScript. application/octet-stream @@ -946,11 +1063,14 @@ application/octet-stream Here are two more examples: text/plain +application/x-shell +text/plain +texttops application/x-shell application/postscript 33 texttops text/plain application/postscript 33 texttops - +application/x-shell The last two examples name the texttops filter to work on text/plain as well as on application/x-shell. (Hint: This differentiation is needed for the syntax highlighting feature of texttops). @@ -1032,12 +1152,24 @@ text/plain application/postscript 33 texttops PostScript +non-PostScript printers +raster As previously stated, PostScript is the central file format to any UNIX-based printing system. From PostScript, CUPS generates raster data to feed non-PostScript printers. +prefilters +PostScript +ASCII text +PDF +DVI +HP-GL. +MIME type +application/postscript +pstops +application/vnd.cups-postscript But what happens if you send one of the supported non-PS formats to print? Then CUPS runs prefilters on these input formats to generate PostScript first. There are prefilters to create PostScript from ASCII text, PDF, DVI, or HP-GL. The outcome of these filters is always of MIME type @@ -1060,6 +1192,13 @@ text/plain application/postscript 33 texttops pstops +pstops +application/postscript +application/vnd.cups-postscript +output duplexing +stapling +punching +PostScript pstops is a filter that is used to convert application/postscript to application/vnd.cups-postscript. As stated earlier, this filter inserts all device-specific print options (commands to the printer to ask for the duplexing of output, or stapling and @@ -1098,6 +1237,9 @@ text/plain application/postscript 33 texttops pstoraster +pstoraster +rasterization +raster drivers pstoraster is at the core of the CUPS filtering system. It is responsible for the first stage of the rasterization process. Its input is of MIME type application/vnd.cups-postscript; its output is application/vnd.cups-raster. This output format is not yet meant to be printable. Its aim is to serve as a @@ -1112,6 +1254,10 @@ text/plain application/postscript 33 texttops +CUPS raster +generic raster +IANA +raster drivers CUPS raster is a generic raster format with powerful features. It is able to include per-page information, color profiles, and more, to be used by the downstream raster drivers. Its MIME type is registered with IANA and its specification is, of course, completely open. It is designed to make it quite easy and inexpensive for @@ -1128,6 +1274,10 @@ text/plain application/postscript 33 texttops +pstoraster +GNU Ghostscript +AFPL Ghostscript +standalone filter CUPS versions before version 1.1.15 shipped a binary (or source code) standalone filter, named pstoraster. pstoraster, which was derived from GNU Ghostscript 5.50 and could be installed besides and in addition to any GNU or AFPL Ghostscript package without @@ -1147,6 +1297,8 @@ text/plain application/postscript 33 texttops imagetops and imagetoraster +prefilter +imagetoraster In the section about prefilters, we mentioned the prefilter that generates PostScript from image formats. The imagetoraster filter is used to convert directly from image to raster, without the @@ -1166,6 +1318,17 @@ text/plain application/postscript 33 texttops rasterto [printers specific] +rastertoalps +rastertobj +rastertoepson +rastertoescp +rastertopcl +rastertoturboprint +rastertoescp +rastertohp +rastertoprinter +rastertoprinter +Gimp-Print CUPS ships with quite a variety of raster drivers for processing CUPS raster. On my system I find in /usr/lib/cups/filter/ the following: rastertoalps, rastertobj, rastertoepson, rastertoescp, rastertopcl, @@ -1188,6 +1351,8 @@ text/plain application/postscript 33 texttops CUPS Backends +CUPS filtering chain +print queue The last part of any CUPS filtering chain is a backend. Backends are special programs that send the print-ready file to the final device. There is a separate backend program for any transfer @@ -1303,6 +1468,8 @@ text/plain application/postscript 33 texttops +lpinfo +CUPS backends Not all of the mentioned backends may be present on your system or usable (depending on your hardware configuration). One test for all available CUPS backends is provided by the lpinfo @@ -1321,6 +1488,9 @@ text/plain application/postscript 33 texttops cupsomatic foomatic +PPDs +Foomatic Printer +Linuxprinting.org cupsomatic filters may be the most widely used on CUPS installations. You must be clear that these were not developed by the CUPS people. They are a third-party add-on to @@ -1349,6 +1519,16 @@ text/plain application/postscript 33 texttops point'n'print +foomatic-rip +Adobe specifications +hi-res photo +normal color +grayscale +draft +media type +resolution +inktype +dithering algorithm However, cupsomatic is now deprecated. Its PPDs (especially the first generation of them, still in heavy use out there) are not meeting the Adobe specifications. You might also suffer difficulties when you try @@ -1398,6 +1578,8 @@ text/plain application/postscript 33 texttops +cupsd.conf +FilterLimit Setting FilterLimit 1000 in cupsd.conf will not allow more filters to run concurrently than will consume a total of 1000 virtual filter @@ -1412,6 +1594,9 @@ text/plain application/postscript 33 texttops <quote>Raw</quote> Printing +PPD +lpadmin +rawprinter You can tell CUPS to print (nearly) any file raw. Raw means it will not be filtered. CUPS will send the file to the printer as is without bothering if the printer is able to digest it. Users need to take care themselves that they send sensible data formats only. Raw printing can @@ -1438,8 +1623,9 @@ text/plain application/postscript 33 texttops application/octet-stream Printing - Any MIME type with no rule in the - /etc/cups/mime.types file is regarded as unknown +/etc/cups/mime.types +application/octet-stream + Any MIME type with no rule in the /etc/cups/mime.types file is regarded as unknown or application/octet-stream and will not be sent. Because CUPS refuses to print unknown MIME types by default, you will probably have experienced that print jobs originating @@ -1463,6 +1649,7 @@ text/plain application/postscript 33 texttops +raw mode Both contain entries (at the end of the respective files) that must be uncommented to allow raw mode operation for application/octet-stream. In /etc/cups/mime.types make sure this line is present: @@ -1495,6 +1682,10 @@ application/octet-stream application/vnd.cups-raw 0 - Background +security-aware +MIME type +/etc/cups/mime.types +/etc/cups/mime.convs That CUPS is a more security-aware printing system than traditional ones does not by default allow one to send deliberate (possibly binary) data to printing devices. (This could be easily abused to launch a @@ -1515,6 +1706,11 @@ application/octet-stream application/vnd.cups-raw 0 - PPD +non-PostScript +PostScript +RIP +Ghostscript +device-specific commands Originally PPDs were meant to be used for PostScript printers only. Here, they help to send device-specific commands and settings to the RIP, which processes the job file. CUPS has extended this @@ -1599,6 +1795,7 @@ application/octet-stream application/vnd.cups-raw 0 - +pstoraster First is the pstoraster step. It uses the special CUPS ESPGhostscript device from ESP Ghostscript 7.05.x as its tool. @@ -1653,6 +1850,12 @@ application/octet-stream application/vnd.cups-raw 0 - +cupsomatic +pstoraster +rastertosomething +rasterization +Foomatic/cupsomatic +rendering cupsomatic kidnaps the print file after the application/vnd.cups-postscript stage and deviates it through the CUPS-external, systemwide Ghostscript installation. Therefore, the print file bypasses the pstoraster @@ -1673,6 +1876,10 @@ application/octet-stream application/vnd.cups-raw 0 - +HP JetDirect +PostScript +two-up +duplex Assume you want to print a PDF file to an HP JetDirect-connected PostScript printer, but you want to print pages 3-5, 7, and 11-13 only, and you want to print them two-up and duplex: @@ -1707,12 +1914,16 @@ application/octet-stream application/vnd.cups-raw 0 - illustration. +pdftosocket
PDF to Socket Chain. pdftosocket
+USB +Epson Stylus +stphoto2.ppd Assume you want to print the same filter to an USB-connected Epson Stylus Photo printer installed with the CUPS stphoto2.ppd. The first few filtering stages are nearly the same: @@ -1729,12 +1940,16 @@ application/octet-stream application/vnd.cups-raw 0 -
+pdftops +PDF The file must first pass the pdftops prefilter, which produces PostScript MIME type application/postscript (a preview here would still show all pages of the original PDF). +pstops +duplex printing The file then passes the pstops filter that applies the command-line options: it selects the pages 2-5, 7, and 11-13, creates the imposed layout two pages on one sheet, and inserts the @@ -1750,6 +1965,7 @@ application/octet-stream application/vnd.cups-raw 0 - +rastertoepson Finally, the rastertoepson filter does its work (as indicated in the printer's PPD), creating the printer-specific raster data and embedding any user-selected @@ -1831,6 +2047,8 @@ application/octet-stream application/vnd.cups-raw 0 - Printing with Interface Scripts +PCL +lpadmin CUPS also supports the use of interface scripts as known from System V AT&T printing systems. These are often used for PCL printers, from applications that generate PCL print jobs. Interface @@ -2176,6 +2394,11 @@ Mode DDK +W32X86 +PostScript +Visual Studio +Microsoft driver +Adobe More recent printer drivers on W200x and XP no longer run in kernel mode (unlike Windows NT). However, both operating systems can still use the NT drivers, running in kernel mode (you can roughly tell which is which as the drivers in subdirectory 2 of W32X86 are old ones). As was @@ -2386,6 +2609,7 @@ different platforms. +Adobe driver files If both the Adobe driver files and the CUPS driver files for the support of Windows NT/200x/XP are present installed on the server, the Adobe files will be ignored and the CUPS files will be used. If you prefer &smbmdash; for whatever reason &smbmdash; to use Adobe-only drivers, move away the three CUPS driver files. @@ -2429,6 +2653,9 @@ files as well as a (licensed) set of Adobe drivers for the Windows 95/98/Me clie cupsaddsmb +cups.hlp +WIN40 +W32X86 Once you have run the install script (and possibly manually moved the cups.hlp file to /usr/share/cups/drivers/), the driver is ready to be put into Samba's share (which often maps to /etc/samba/drivers/ and contains a @@ -2438,10 +2665,11 @@ running cupsaddsmb (see also man cupsaddsmb -Single Sign On +Single Sign-On +Domain Controller You may need to put root into the smbpasswd file by running smbpasswd; this is especially important if you should run this whole procedure for the first time and are not working in an environment -where everything is configured for single sign on to a Windows Domain Controller. +where everything is configured for single sign-on to a Windows Domain Controller. @@ -2463,6 +2691,7 @@ in the /usr/share/cups/drivers/ directory. The new "Printers" folder +Adobe PostScript Should your Windows clients have had the old ADOBE*.* files for the Adobe PostScript driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/200x/XP will fail at first. You need to wipe the old driver from the clients first. It is not enough to @@ -2479,6 +2708,7 @@ privileges to do this. rpcclientsetdriver +CUPS PostScript Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all printers to this one by proceeding as described in Classical Printing Support. Either change a driver for an existing printer by running the Printer @@ -2517,27 +2747,28 @@ are the most important items that weigh in favor of CUPS: The Adobe driver has more options to misconfigure the +Adobe driver PostScript generated by it (like setting it inadvertently to Optimize for Speed instead of Optimize for Portability, which could lead to CUPS being unable to process it). The CUPS PostScript driver output sent by Windows +CUPS PostScript driver clients to the CUPS server is guaranteed to autotype as the generic MIME type application/postscript, thus passing through the CUPS pstops filter and logging the correct number of pages in the page_log for accounting and quota purposes. - The CUPS PostScript driver supports the sending of - additional standard (IPP) print options by Windows NT/200x/XP clients. Such - additional print options are naming the CUPS standard - banner pages (or the custom ones, should they be - installed at the time of driver download), using the CUPS - page-label option, setting a - job priority, and setting the scheduled - time of printing (with the option to support additional - useful IPP job attributes in the future). + + banner pages + The CUPS PostScript driver supports the sending of additional standard (IPP) print options by Windows + NT/200x/XP clients. Such additional print options are naming the CUPS standard banner + pages (or the custom ones, should they be installed at the time of driver download), using the CUPS + page-label option, setting a job priority, and setting the scheduled time of printing (with the option to + support additional useful IPP job attributes in the future). + The CUPS PostScript driver supports the inclusion of the new *cupsJobTicket comments at the @@ -2570,12 +2801,15 @@ name="security">user). Here is an example of a successfully run cupsaddsmb command: +banner pages +cupsaddsmb &rootprompt;cupsaddsmb -U root infotec_IS2027 Password for root required to access localhost via Samba: ['secret'] +cupsaddsmb To share all printers and drivers, use the parameter instead of a printer name. Since cupsaddsmb exports the printer drivers to Samba, it should be @@ -2766,6 +3000,7 @@ might occur. cupsaddsmb +PDC Can't get the standard cupsaddsmb command to run on a Samba PDC? Are you asked for the password credential again and again, and the command just will not take off at all? Try one of these variations: @@ -2787,6 +3022,7 @@ variations: cupsaddsmb +raw print The cupsaddsmb Flowchart shows a chart about the procedures, command flows, and data flows of the cupaddsmb command. Note again: cupsaddsmb is not intended to, and does not work with, raw print queues! @@ -2802,6 +3038,7 @@ not intended to, and does not work with, raw print queues! point'n'print +cupsaddsmb After cupsaddsmb is completed, your driver is prepared for the clients to use. Here are the steps you must perform to download and install it via Point'n'Print. From a Windows client, browse to the CUPS/Samba server: @@ -2830,6 +3067,8 @@ you want to test it and send your first job from an application like Winword, th PPD +Adobe PostScript driver +net use lpt1: cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher and with Samba version 2.2.4, or later. If it does not work, or if the automatic printer driver download to the clients does not succeed, you can still manually install the CUPS printer PPD on top of the Adobe PostScript driver on @@ -2930,6 +3169,9 @@ First let's check the rpcclient man page. Here are two re +adddriver +AddPrinterDriver() +getdriverdir adddriver <arch> <config> Execute an AddPrinterDriver() RPC to install the printer driver information on the server. The driver files should already exist in the directory returned by getdriverdir. Possible values for arch are the @@ -2958,12 +3200,16 @@ RPC will fail. +setdriver +SetPrinter() setdriver <printername> <drivername> Execute a SetPrinter() command to update the printer driver associated with an installed printer. The printer driver must already be correctly installed on the print server. +enumprinters +enumdrivers See also the enumprinters and enumdrivers commands to obtain a list of installed printers and drivers. @@ -3060,12 +3306,13 @@ drivers, we do not need any (nor would we for the Adobe PostScript driver); ther Requirements for adddriver and setdriver to Succeed +rpcclientadddriver +cupsaddsmb +setdriver From the man page (and from the quoted output of cupsaddsmb above) it becomes clear that you need to have certain conditions in order to make the manual uploading and initializing of the driver files -succeed. The two rpcclient -rpcclientadddriver subcommands -(adddriver and setdriver) need to encounter the following preconditions -to complete successfully: +succeed. The two rpcclient subcommands (adddriver and +setdriver) need to encounter the following preconditions to complete successfully: @@ -3434,6 +3681,7 @@ If it does not work, it could be a permissions problem with the (Optional) Print a test page. +rundll32 &dosprompt;rundll32 printui.dll,PrintUIEntry /p /n "\\sambaserver\mysmbtstprn" @@ -3467,6 +3715,7 @@ Just put it in a frame and bolt it to the wall with the heading "MY FIRST RPCCLI Troubleshooting Revisited +adddriver The setdriver command will fail if in Samba's mind the queue is not already there. A successful installation displys the promising message that the: @@ -3480,6 +3729,7 @@ result was NT_STATUS_UNSUCCESSFUL lpstat +rpcclient It is not good enough that you can see the queue in CUPS, using the lpstat -p ir85wm command. A bug in most recent versions of Samba prevents the proper update of the queue list. The recognition of newly installed CUPS printers fails unless you restart Samba or send a HUP to all smbd processes. To verify @@ -3648,6 +3898,8 @@ the tireless work of Till Kamppeter from Mandrakesoft, who is also the principal foomatic-rip +cupsomatic +Adobe PPD The former cupsomatic concept is now being replaced by the new successor, a much more powerful foomatic-rip. cupsomatic is no longer maintained. Here is the new URL to the Foomatic-3.0 @@ -3687,6 +3939,7 @@ various models, and many models may be driven by different drivers &smbmdash; it 690 <quote>Perfect</quote> Printers +Windows PPD At present, there are 690 devices dubbed as working perfectly: 181 are mostly perfect, 96 are partially perfect, and 46 are paperweights. Keeping in mind that most of these are non-PostScript models (PostScript printers are automatically supported by CUPS to perfection by using their @@ -3807,6 +4060,9 @@ there is improved media type and source support &smbmdash; paper sizes and trays +PPDs +Foomatic tutorial +LinuxKongress2002 Also, the new generation of Linuxprinting.org PPDs no longer contains Perl data structures. If you are a distro maintainer and have used the previous version of Foomatic, you may want to give the new one a spin, but remember to generate a new-version set of PPDs via the new outlined in the Foomatic tutorial or in this chapter. This new +foomatic-rip +Adobe +printer drivers foomatic-rip is a very clever wrapper around the need to run Ghostscript with a different syntax, options, device selections, and/or filters for each different printer or spooler. At the same time, it can read the PPD associated with a print queue and modify the print job according to the user selections. Together with this @@ -3831,6 +4090,7 @@ support for this from Windows-based vendor printer drivers). Driver Development Outside +Linuxprinting.org Most driver development itself does not happen within Linuxprinting.org. Drivers are written by independent maintainers. Linuxprinting.org just pools all the information and stores it in its database. In addition, it also provides the Foomatic glue to integrate the many drivers into any modern (or legacy) printing system @@ -3842,21 +4102,25 @@ Speaking of the different driver development groups, most of the work is current - Omni + +Omni + Omni &smbmdash; a free software project by IBM that tries to convert its printer driver knowledge from good-ol' OS/2 times into a modern, modular, universal driver architecture for Linux/UNIX (still beta). This currently supports 437 models. - HPIJS &smbmdash; + +HPIJS + HPIJS &smbmdash; a free software project by HP to provide the support for its own range of models (very mature, printing in most cases is perfect and provides true photo quality). This currently supports 369 models. - Gimp-Print &smbmdash; a free software + +Gimp-Print + Gimp-Print &smbmdash; a free software effort, started by Michael Sweet (also lead developer for CUPS), now directed by Robert Krawitz, which has achieved an amazing level of photo print quality (many Epson users swear that its quality is @@ -3879,6 +4143,9 @@ forum has turned out to be one of the most frequented forums after only +Mandriva +Mandrake +Conectiva Linuxprinting.org and the Foomatic driver wrappers around Ghostscript are now a standard tool-chain for printing on all the important distros. Most of them also have CUPS underneath. While in recent years most printer data had been added by Kamppeter, many additional contributions came from engineers with SuSE, Red @@ -3896,6 +4163,15 @@ Foomatic. So if you use it often, please send him a note showing your appreciati Foomatic Database-Generated PPDs +Foomatic database +XML-based datasets +kprinter +gtklp +xpp +HP Photosmart +Epson Stylus inkjet +non-PostScript printers +raster The Foomatic database is an amazing piece of ingenuity in itself. Not only does it keep the printer and driver information, but it is organized in a way that it can generate PPD files on the fly from its internal XML-based datasets. While these PPDs are modeled to the Adobe specification of PPDs, the @@ -4141,6 +4417,11 @@ printer models. Linuxprinting.org has a driver /var/spool/samba directive in the section of &smb.conf;). The other is the spool directory of your UNIX print subsystem. For @@ -4421,7 +4705,7 @@ Some important parameter settings in the CUPS configuration file default. - MaxJobs 500 + MaxJobs 500 This directive controls the maximum number of jobs that are kept in memory. Once the number of jobs reaches the limit, @@ -4484,6 +4768,8 @@ may do what you need. Printing from CUPS to Windows-Attached Printers +smbspool +backends From time to time the question arises, how can you print to a Windows-attached printer from Samba? Normally the local connection from Windows host to printer would be done by USB or parallel cable, but this does not matter to Samba. From here only an SMB connection needs to be opened @@ -4522,6 +4808,8 @@ If this symlink does not exist, create it: +smbspool +troubleshooting smbspool was written by Mike Sweet from the CUPS folks. It is included and ships with Samba. It may also be used with print subsystems other than CUPS, to spool jobs to Windows printer shares. To set up printer winprinter on CUPS, you need to have a driver for it. Essentially @@ -4542,6 +4830,9 @@ To install a printer with the smb backend on CUPS, use th +PostScript printers +PPD +Windows NT PostScript driver The PPD must be able to direct CUPS to generate the print data for the target model. For PostScript printers, just use the PPD that would be used with the Windows NT PostScript driver. But what can you do if the printer is only accessible with a password? Or if the printer's host is part of another workgroup? This is provided @@ -4679,6 +4970,7 @@ the Network Neighborhood), right-click on the printer in qu Avoid Being Connected to the Samba Server as the Wrong User +smbstatus You see per smbstatus that you are connected as user nobody, but you want to be root or printer admin. This is probably due to bad user, which silently connected you under the guest account when you gave (maybe by accident) an incorrect username. Remove @@ -4724,6 +5016,8 @@ other printer uses the same driver. Windows 200x/XP Local Security Policies +Local security policies +unsigned drivers Local security policies may not allow the installation of unsigned drivers &smbmdash; local security policies may not allow the installation of printer drivers at all. @@ -4732,7 +5026,10 @@ security policies may not allow the installation of printer drivers at a Administrator Cannot Install Printers for All Local Users -Windows XP handles SMB printers on a per-user basis. + +SMB printers +IPP client +Windows XP handles SMB printers on a per-user basis. This means every user needs to install the printer himself or herself. To have a printer available for everybody, you might want to use the built-in IPP client capabilities of Win XP. Add a printer with the print path of http://cupsserver:631/printers/printername. We're still looking into this one. @@ -4886,6 +5183,9 @@ spits out completely different ones from what was sent. +lp +Implicit Classes +BrowseShortNames It is a bad idea to name any printer lp. This is the traditional UNIX name for the default printer. CUPS may be set up to do an automatic creation of Implicit Classes. This means, to group all printers with the same name to a pool of devices and load-balance the jobs across them in a round-robin fashion. -- cgit