Ignore:
Timestamp:
May 23, 2008, 6:56:41 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/docs/htmldocs/Samba3-HOWTO/CUPS-printing.html

    r44 r134  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 22. CUPS Printing Support</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="classicalprinting.html" title="Chapter 21. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 23. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. CUPS Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 22. CUPS Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH <br></span><div class="address"><p><code class="email">&lt;<a href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Ciprian</span> <span class="surname">Vizitiu</span></h3><span class="contrib">drawings</span><div class="affiliation"><div class="address"><p><code class="email">&lt;<a href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><span class="contrib">drawings</span><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> (27 Jan 2004) </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="CUPS-printing.html#id392883">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id392889">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id392940">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id393049">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id393149">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id393337">Simple <code class="filename">smb.conf</code> Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id393584">More Complex CUPS <code class="filename">smb.conf</code> Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id393980">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id393994">Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394045">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394249">Installation of Windows Client Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-raw">Explicitly Enable &#8220;<span class="quote">raw</span>&#8221; Printing for <span class="emphasis"><em>application/octet-stream</em></span></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394512">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id394623">Advanced Intelligent Printing with PostScript Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#gdipost">GDI on Windows, PostScript on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394797">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394963">UNIX Printfile Conversion and GUI Basics</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#post-and-ghost">PostScript and Ghostscript</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395287">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395426">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395495">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395604">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id395639">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id395860">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396270">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396465">Filtering  Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396616">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396793">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396952">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397202">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397282">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397494">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397802">The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398021">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398033"><code class="filename">mime.convs</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398094">&#8220;<span class="quote">Raw</span>&#8221; Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398194">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398455">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398718"><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399033">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399434">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399543">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id399622">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id399636">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399694">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399759">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id399858">Network Printing (Windows Clients and UNIX/Samba Print
    2 Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id399874">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400039">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id400108">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id400187">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400224">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id400285">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id400296">Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
    3 Problems</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400328">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400341">CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400378">PostScript Drivers with No Major Problems, Even in Kernel
    4 Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id400456">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id400475"><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400563">Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400868">CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401090">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401201">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401221">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401275">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401555">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401750">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401880">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402011">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402147">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402254">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402332">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402410">Installing the PostScript Driver on a Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-avoidps1">Avoiding Critical PostScript Driver Settings on the Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id402619">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id402785">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402945">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id403037">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id403163">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id403371">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404250">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id404381">The Printing <code class="filename">*.tdb</code> Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id404580">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404646">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404707">Losing <code class="filename">*.tdb</code> Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404753">Using <code class="literal">tdbbackup</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id404864">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id405024">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405729">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id406151">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id406181">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406232">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406265">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406396">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406532">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406590">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406625">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id406637">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id406826">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id406894">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406971">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407077">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id407111">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id407368">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id407477">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id407482">Windows 9x/Me Client Can't Install Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#root-ask-loop">&#8220;<span class="quote">cupsaddsmb</span>&#8221; Keeps Asking for Root Password in Never-ending Loop</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407549">&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407585">&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407655">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407678">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407756">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407795">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407830">Can't Use &#8220;<span class="quote">cupsaddsmb</span>&#8221; on Samba Server, Which Is a PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407864">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407895">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407926">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407963">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id407987">Win XP-SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408028">Print Options for All Users Can't Be Set on Windows 200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408292">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408345"><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408391">Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408477">Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id408540">Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id408591">Overview of the CUPS Printing Processes</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id392883"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id392889"></a>Features and Benefits</h3></div></div></div><p>
    5 <a class="indexterm" name="id392897"></a>
    6                 The Common UNIX Print System (<a href="http://www.cups.org/" target="_top">CUPS</a>)
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 22. CUPS Printing Support</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="The Official Samba 3.2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="classicalprinting.html" title="Chapter 21. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 23. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. CUPS Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 22. CUPS Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH <br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Ciprian</span> <span class="surname">Vizitiu</span></h3><span class="contrib">drawings</span> <div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><span class="contrib">drawings</span> <div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> (27 Jan 2004) </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="CUPS-printing.html#id416419">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id416425">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id416476">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id416588">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id416695">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id416919">Simple <code class="filename">smb.conf</code> Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417155">More Complex CUPS <code class="filename">smb.conf</code> Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id417537">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id417551">Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417596">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417810">Installation of Windows Client Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-raw">Explicitly Enable &#8220;<span class="quote">raw</span>&#8221; Printing for <span class="emphasis"><em>application/octet-stream</em></span></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418073">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id418184">Advanced Intelligent Printing with PostScript Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#gdipost">GDI on Windows, PostScript on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418358">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418524">UNIX Printfile Conversion and GUI Basics</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#post-and-ghost">PostScript and Ghostscript</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418848">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418988">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419056">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419165">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id419200">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id419416">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419826">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420021">Filtering  Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420169">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420346">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420506">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420757">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420837">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421049">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421357">The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421572">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421583"><code class="filename">mime.convs</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421644">&#8220;<span class="quote">Raw</span>&#8221; Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421744">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422005">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422269"><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422583">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422984">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423093">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423172">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423186">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423245">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423310">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423409">Network Printing (Windows Clients and UNIX/Samba Print
     2Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423425">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423600">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423671">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423751">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423788">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423848">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423860">Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
     3Problems</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423891">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423905">CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423941">PostScript Drivers with No Major Problems, Even in Kernel
     4Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id424020">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id424038"><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424126">Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424414">CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424635">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424746">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424766">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424821">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425100">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425295">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425429">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425560">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425696">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425806">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425884">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425962">Installing the PostScript Driver on a Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-avoidps1">Avoiding Critical PostScript Driver Settings on the Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id426171">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id426337">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426497">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426589">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426709">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426920">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id427799">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id427930">The Printing <code class="filename">*.tdb</code> Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id428129">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428191">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428252">Losing <code class="filename">*.tdb</code> Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428299">Using <code class="literal">tdbbackup</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id428409">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id428570">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429283">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id429705">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id429735">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429785">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429818">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429949">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430085">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430143">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430178">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id430191">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id430379">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id430451">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430528">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430657">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id430701">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id430957">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id431066">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id431072">Windows 9x/Me Client Can't Install Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#root-ask-loop">&#8220;<span class="quote">cupsaddsmb</span>&#8221; Keeps Asking for Root Password in Never-ending Loop</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431141">&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431178">&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431248">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431271">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431352">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431398">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431432">Can't Use &#8220;<span class="quote">cupsaddsmb</span>&#8221; on Samba Server, Which Is a PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431467">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431498">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431529">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431566">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431589">Win XP-SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431631">Print Options for All Users Can't Be Set on Windows 200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431898">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431951"><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431997">Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id432090">Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id432153">Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id432204">Overview of the CUPS Printing Processes</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416419"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416425"></a>Features and Benefits</h3></div></div></div><p>
     5<a class="indexterm" name="id416433"></a>
     6                The Common UNIX Print System (<a class="ulink" href="http://www.cups.org/" target="_top">CUPS</a>)
    77                has become quite popular. All major Linux distributions now ship it as their default printing
    88                system. To many, it is still a mystical tool. Mostly, it just works.  People tend to regard
    99                it as a &#8220;<span class="quote">black box</span>&#8221; that they do not want to look into as long as it works. But once
    1010                there is a little problem, they have trouble finding out where to start debugging it. Refer to
    11                 <a href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>, which contains much information
     11                <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>, which contains much information
    1212                that is also relevant to CUPS.
    1313                </p><p>
    14 <a class="indexterm" name="id392927"></a>
     14<a class="indexterm" name="id416463"></a>
    1515                CUPS sports quite a few unique and powerful features. While its basic functions may be grasped quite
    1616                easily, they are also new. Because it is different from other, more traditional printing systems, it is best
     
    1818                the beginning. This documentation will lead you to a complete understanding of CUPS. Let's start with the most
    1919                basic things first.
    20                 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id392940"></a>Overview</h3></div></div></div><p>
    21 <a class="indexterm" name="id392948"></a>
    22 <a class="indexterm" name="id392954"></a>
    23 <a class="indexterm" name="id392961"></a>
    24 <a class="indexterm" name="id392968"></a>
    25 <a class="indexterm" name="id392975"></a>
    26 <a class="indexterm" name="id392984"></a>
    27 <a class="indexterm" name="id392994"></a>
    28 <a class="indexterm" name="id393000"></a>
     20                </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416476"></a>Overview</h3></div></div></div><p>
     21<a class="indexterm" name="id416484"></a>
     22<a class="indexterm" name="id416490"></a>
     23<a class="indexterm" name="id416497"></a>
     24<a class="indexterm" name="id416504"></a>
     25<a class="indexterm" name="id416511"></a>
     26<a class="indexterm" name="id416520"></a>
     27<a class="indexterm" name="id416530"></a>
     28<a class="indexterm" name="id416536"></a>
    2929        CUPS is more than just a print spooling system. It is a complete printer management system that
    3030        complies with the new Internet Printing Protocol (IPP). IPP is an industry and Internet Engineering Task Force
     
    3232        browser (giving you platform-independent access to the CUPS print server). Additionally, it has the
    3333        traditional command line and several more modern GUI interfaces (GUI interfaces developed by third parties,
    34         like KDE's overwhelming <a href="http://printing.kde.org/" target="_top">KDEPrint</a>).
     34        like KDE's overwhelming <a class="ulink" href="http://printing.kde.org/" target="_top">KDEPrint</a>).
    3535        </p><p>
    36 <a class="indexterm" name="id393021"></a>
    37 <a class="indexterm" name="id393028"></a>
     36<a class="indexterm" name="id416557"></a>
     37<a class="indexterm" name="id416564"></a>
    3838        CUPS allows creation of <span class="emphasis"><em>raw</em></span> printers (i.e., no print file format translation) as
    3939        well as <span class="emphasis"><em>smart</em></span> printers (i.e., CUPS does file format conversion as required for the
     
    4141        course, if you are a CUPS advocate, you would argue that CUPS is better! In any case, let us now explore how
    4242        to configure CUPS for interfacing with MS Windows print clients via Samba.
    43         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id393049"></a>Basic CUPS Support Configuration</h2></div></div></div><p>
    44 <a class="indexterm" name="id393057"></a>
    45 <a class="indexterm" name="id393063"></a>
    46 <a class="indexterm" name="id393070"></a>
    47 <a class="indexterm" name="id393077"></a>
    48 <a class="indexterm" name="id393084"></a>
     43        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416588"></a>Basic CUPS Support Configuration</h2></div></div></div><p>
     44<a class="indexterm" name="id416596"></a>
     45<a class="indexterm" name="id416603"></a>
     46<a class="indexterm" name="id416609"></a>
     47<a class="indexterm" name="id416616"></a>
     48<a class="indexterm" name="id416623"></a>
    4949Printing with CUPS in the most basic <code class="filename">smb.conf</code> setup in Samba-3.0 (as was true for 2.2.x) requires just two
    50 parameters: <a class="indexterm" name="id393098"></a>printing = cups and <a class="indexterm" name="id393105"></a>printcap = cups. CUPS does not need a printcap file.  However, the
     50parameters: <a class="link" href="smb.conf.5.html#PRINTING">printing = cups</a> and <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = cups</a>. CUPS does not need a printcap file.  However, the
    5151<code class="filename">cupsd.conf</code> configuration file knows of two related directives that control how such a
    5252file will be automatically created and maintained by CUPS for the convenience of third-party applications
     
    5555print. Make sure CUPS is set to generate and maintain a printcap file. For details, see <code class="literal">man
    5656cupsd.conf</code> and other CUPS-related documentation, like the wealth of documents regarding the CUPS
    57 server itself available from the <a href="http://localhost:631/documentation.html" target="_top">CUPS</a> web site.
    58         </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393149"></a>Linking smbd with libcups.so</h3></div></div></div><p>
    59 <a class="indexterm" name="id393157"></a>
     57server itself available from the <a class="ulink" href="http://localhost:631/documentation.html" target="_top">CUPS</a> web site.
     58        </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416695"></a>Linking smbd with libcups.so</h3></div></div></div><p>
     59<a class="indexterm" name="id416703"></a>
    6060        Samba has a special relationship to CUPS. Samba can be compiled with CUPS library support.
    6161        Most recent installations have this support enabled. By default, CUPS linking is compiled
     
    6464        there are some differences in required or supported configuration.
    6565        </p><p>
    66 <a class="indexterm" name="id393179"></a>
    67 <a class="indexterm" name="id393186"></a>
    68         When Samba is compiled and linked with <code class="filename">libcups</code>, <a class="indexterm" name="id393198"></a>printcap = cups
     66<a class="indexterm" name="id416725"></a>
     67<a class="indexterm" name="id416732"></a>
     68        When Samba is compiled and linked with <code class="filename">libcups</code>, <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = cups</a>
    6969        uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V
    7070        commands with an additional <code class="literal">-oraw</code> option for printing. On a Linux
     
    8080</pre><p>
    8181        </p><p>
    82 <a class="indexterm" name="id393246"></a>
     82<a class="indexterm" name="id416796"></a>
    8383        The line <code class="computeroutput">libcups.so.2 =&gt; /usr/lib/libcups.so.2 (0x40123000)</code> shows
    8484        there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups
     
    8686        This is an important point to remember!
    8787        </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> Should it be necessary, for any reason, to set your own print commands, you can do this by setting
    88         <a class="indexterm" name="id393277"></a>printing = sysv. However, you will lose all the benefits
     88        <a class="link" href="smb.conf.5.html#PRINTING">printing = sysv</a>. However, you will lose all the benefits
    8989        of tight CUPS-Samba integration. When you do this, you must manually configure the printing system commands
    9090        (most important:
    91         <a class="indexterm" name="id393285"></a>print command; other commands are
    92         <a class="indexterm" name="id393293"></a>lppause command,
    93         <a class="indexterm" name="id393300"></a>lpresume command,
    94         <a class="indexterm" name="id393307"></a>lpq command,
    95         <a class="indexterm" name="id393314"></a>lprm command,
    96         <a class="indexterm" name="id393321"></a>queuepause command and
    97         <a class="indexterm" name="id393328"></a>queue resume command).
    98         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393337"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p>
    99         To summarize, <a href="CUPS-printing.html#cups-exam-simple" title="Example 22.1. Simplest Printing-Related smb.conf">the Simplest Printing-Related
     91        <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a>; other commands are
     92        <a class="link" href="smb.conf.5.html#LPPAUSECOMMAND">lppause command</a>,
     93        <a class="link" href="smb.conf.5.html#LPRESUMECOMMAND">lpresume command</a>,
     94        <a class="link" href="smb.conf.5.html#LPQCOMMAND">lpq command</a>,
     95        <a class="link" href="smb.conf.5.html#LPRMCOMMAND">lprm command</a>,
     96        <a class="link" href="smb.conf.5.html#QUEUEPAUSECOMMAND">queuepause command</a> and
     97        <a class="link" href="smb.conf.5.html#QUEUERESUMECOMMAND">queue resume command</a>).
     98        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416919"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p>
     99        To summarize, <a class="link" href="CUPS-printing.html#cups-exam-simple" title="Example 22.1. Simplest Printing-Related smb.conf">the Simplest Printing-Related
    100100        <code class="filename">smb.conf</code> file</a> shows the simplest printing-related setup for <code class="filename">smb.conf</code> to
    101101        enable basic CUPS support:
    102         </p><div class="example"><a name="cups-exam-simple"></a><p class="title"><b>Example 22.1. Simplest Printing-Related smb.conf</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id393397"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393410"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id393422"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id393444"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id393456"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id393469"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id393481"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393494"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393506"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id393519"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393531"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr></table></div></div><br class="example-break"><p>
    103 <a class="indexterm" name="id393547"></a>
    104 <a class="indexterm" name="id393554"></a>
    105 <a class="indexterm" name="id393561"></a>
     102        </p><div class="example"><a name="cups-exam-simple"></a><p class="title"><b>Example 22.1. Simplest Printing-Related smb.conf</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id416979"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id416990"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417002"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id417022"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id417034"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id417045"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417057"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417068"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417080"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417091"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417102"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr></table></div></div><br class="example-break"><p>
     103<a class="indexterm" name="id417117"></a>
     104<a class="indexterm" name="id417124"></a>
     105<a class="indexterm" name="id417131"></a>
    106106        This is all you need for basic printing setup for CUPS. It will print all graphic, text, PDF, and PostScript
    107107        files submitted from Windows clients. However, most of your Windows users would not know how to send these
     
    113113        PostScript device, the print data stream is &#8220;<span class="quote">binary,</span>&#8221; sensible only for the target printer. Read
    114114        on to learn what problem this may cause and how to avoid it.
    115         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393584"></a>More Complex CUPS <code class="filename">smb.conf</code> Settings</h3></div></div></div><p>
    116         <a href="CUPS-printing.html#overridesettings" title="Example 22.2. Overriding Global CUPS Settings for One Printer">The Overriding Global CUPS Settings for One Printer example</a>
     115        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id417155"></a>More Complex CUPS <code class="filename">smb.conf</code> Settings</h3></div></div></div><p>
     116        <a class="link" href="CUPS-printing.html#overridesettings" title="Example 22.2. Overriding Global CUPS Settings for One Printer">The Overriding Global CUPS Settings for One Printer example</a>
    117117        is a slightly more complex printing-related setup for <code class="filename">smb.conf</code>. It enables general CUPS printing
    118118        support for all printers, but defines one printer share, which is set up differently.
    119         </p><div class="example"><a name="overridesettings"></a><p class="title"><b>Example 22.2. Overriding Global CUPS Settings for One Printer</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id393638"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id393651"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id393663"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id393685"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id393697"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id393710"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393722"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393735"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id393747"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393760"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[special_printer]</code></em></td></tr><tr><td><a class="indexterm" name="id393781"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id393794"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id393807"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id393819"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id393832"></a><em class="parameter"><code>print command = echo "NEW: `date`: printfile %f" &gt;&gt; /tmp/smbprn.log ; echo "     `date`: p-%p s-%s f-%f" &gt;&gt; /tmp/smbprn.log ; echo "     `date`: j-%j J-%J z-%z c-%c" &gt;&gt; /tmp/smbprn.log ; rm %f </code></em></td></tr><tr><td><a class="indexterm" name="id393847"></a><em class="parameter"><code>public = no</code></em></td></tr><tr><td><a class="indexterm" name="id393859"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id393872"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id393884"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id393897"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id393910"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id393922"></a><em class="parameter"><code>hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60</code></em></td></tr></table></div></div><br class="example-break"><p>
     119        </p><div class="example"><a name="overridesettings"></a><p class="title"><b>Example 22.2. Overriding Global CUPS Settings for One Printer</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id417208"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417220"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417231"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id417252"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id417263"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id417274"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417286"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417297"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417309"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417320"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[special_printer]</code></em></td></tr><tr><td><a class="indexterm" name="id417341"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id417353"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id417364"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id417376"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id417387"></a><em class="parameter"><code>print command = echo "NEW: `date`: printfile %f" &gt;&gt; /tmp/smbprn.log ; echo "     `date`: p-%p s-%s f-%f" &gt;&gt; /tmp/smbprn.log ; echo "     `date`: j-%j J-%J z-%z c-%c" &gt;&gt; /tmp/smbprn.log ; rm %f </code></em></td></tr><tr><td><a class="indexterm" name="id417401"></a><em class="parameter"><code>public = no</code></em></td></tr><tr><td><a class="indexterm" name="id417412"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id417424"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417435"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417447"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id417458"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id417470"></a><em class="parameter"><code>hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60</code></em></td></tr></table></div></div><br class="example-break"><p>
    120120        This special share is only for testing purposes. It does not write the print job to a file. It just logs the job parameters
    121121        known to Samba into the <code class="filename">/tmp/smbprn.log</code> file and deletes the job-file. Moreover, the
    122         <a class="indexterm" name="id393946"></a>printer admin of this share is &#8220;<span class="quote">kurt</span>&#8221; (not the &#8220;<span class="quote">@ntadmins</span>&#8221; group),
     122        <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> of this share is &#8220;<span class="quote">kurt</span>&#8221; (not the &#8220;<span class="quote">@ntadmins</span>&#8221; group),
    123123        guest access is not allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it
    124124        allows access from only three hosts. To prevent CUPS from kicking in and taking over the print jobs for that share, we need to set
    125         <a class="indexterm" name="id393962"></a>printing = sysv and <a class="indexterm" name="id393970"></a>printcap = lpstat.
    126         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id393980"></a>Advanced Configuration</h2></div></div></div><p>
     125        <a class="link" href="smb.conf.5.html#PRINTING">printing = sysv</a> and <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = lpstat</a>.
     126        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id417537"></a>Advanced Configuration</h2></div></div></div><p>
    127127        Before we delve into all the configuration options, let us clarify a few points. <span class="emphasis"><em>Network printing
    128128        needs to be organized and set up correctly</em></span>. This frequently doesn't happen. Legacy systems or small
    129129        business LAN environments often lack design and good housekeeping.
    130         </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393994"></a>Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</h3></div></div></div><p>
    131 <a class="indexterm" name="id394006"></a>
    132         <a class="indexterm" name="id394013"></a>
    133         <a class="indexterm" name="id394022"></a>
     130        </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id417551"></a>Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</h3></div></div></div><p>
     131<a class="indexterm" name="id417563"></a>
     132        <a class="indexterm" name="id417569"></a>
     133        <a class="indexterm" name="id417579"></a>
    134134        Many small office or home networks, as well as badly organized larger environments, allow each client a direct
    135135        access to available network printers. This is generally a bad idea. It often blocks one client's access to the
     
    139139        central system, which responds immediately, takes jobs from multiple concurrent clients, and transfers them to
    140140        the printer(s) in the correct order.
    141         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394045"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p>
    142         <a class="indexterm" name="id394053"></a>
    143         <a class="indexterm" name="id394060"></a>
     141        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id417596"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p>
     142        <a class="indexterm" name="id417604"></a>
     143        <a class="indexterm" name="id417611"></a>
    144144        Most traditionally configured UNIX print servers acting on behalf of
    145145        Samba's Windows clients represented a really simple setup. Their only
     
    150150        be installed on each and every client for the target device.
    151151        </p><p>
    152 <a class="indexterm" name="id394077"></a>
    153 <a class="indexterm" name="id394084"></a>
     152<a class="indexterm" name="id417628"></a>
     153<a class="indexterm" name="id417635"></a>
    154154        It is possible to configure CUPS, Samba, and your Windows clients in the
    155155        same traditional and simple way. When CUPS printers are configured
     
    165165        attached to the Windows client. You then redirect output to a raw network
    166166        print queue. This procedure may be followed to achieve this:
    167         </p><div class="procedure"><a name="id394102"></a><p class="title"><b>Procedure 22.1. Configuration Steps for Raw CUPS Printing Support</b></p><ol type="1"><li><p>
    168 <a class="indexterm" name="id394113"></a>
     167        </p><div class="procedure"><a name="id417653"></a><p class="title"><b>Procedure 22.1. Configuration Steps for Raw CUPS Printing Support</b></p><ol type="1"><li><p>
     168<a class="indexterm" name="id417664"></a>
    169169                Edit <code class="filename">/etc/cups/mime.types</code> to uncomment the line
    170170                near the end of the file that has:
     
    173173</pre><p>
    174174                </p></li><li><p>
    175 <a class="indexterm" name="id394139"></a>
     175<a class="indexterm" name="id417690"></a>
    176176                Do the same for the file <code class="filename">/etc/cups/mime.convs</code>.
    177177                </p></li><li><p>
     
    182182                </p></li><li><p>
    183183                In the <code class="filename">smb.conf</code> file <code class="constant">[printers]</code> section add
    184                 <a class="indexterm" name="id394185"></a>use client driver = Yes,
     184                <a class="link" href="smb.conf.5.html#USECLIENTDRIVER">use client driver = Yes</a>,
    185185                and in the <code class="constant">[global]</code> section add
    186                 <a class="indexterm" name="id394196"></a>printing = CUPS, plus
    187                 <a class="indexterm" name="id394203"></a>printcap = CUPS.
     186                <a class="link" href="smb.conf.5.html#PRINTING">printing = CUPS</a>, plus
     187                <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = CUPS</a>.
    188188                </p></li><li><p>
    189189                Install the printer as if it is a local printer, that is, Printing to <code class="constant">LPT1:</code>.
     
    194194                Here, the name <code class="constant">raw_q</code> is the name you gave the print
    195195                queue in the CUPS environment.
    196                 </p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394249"></a>Installation of Windows Client Drivers</h3></div></div></div><p>
     196                </p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id417810"></a>Installation of Windows Client Drivers</h3></div></div></div><p>
    197197        The printer drivers on the Windows clients may be installed
    198198        in two functionally different ways:
     
    201201        printing and uses a <code class="filename">\\sambaserver\printershare</code>
    202202        type of connection.</p></li><li><p>
    203         <a class="indexterm" name="id394276"></a>
     203        <a class="indexterm" name="id417837"></a>
    204204                        Deposit and prepare the drivers (for later download) on
    205205                        the print server (Samba); this enables the clients to use
     
    210210        The second method is recommended for use over the first.
    211211        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cups-raw"></a>Explicitly Enable &#8220;<span class="quote">raw</span>&#8221; Printing for <span class="emphasis"><em>application/octet-stream</em></span></h3></div></div></div><p>
    212         <a class="indexterm" name="id394316"></a>
    213         <a class="indexterm" name="id394323"></a>
    214         <a class="indexterm" name="id394330"></a>
     212        <a class="indexterm" name="id417877"></a>
     213        <a class="indexterm" name="id417884"></a>
     214        <a class="indexterm" name="id417891"></a>
    215215        If you use the first option (drivers are installed on the client
    216216        side), there is one setting to take care of: CUPS needs to be told
     
    224224application/octet-stream
    225225</pre><p>
    226         <a class="indexterm" name="id394380"></a>
    227         <a class="indexterm" name="id394387"></a>
     226        <a class="indexterm" name="id417941"></a>
     227        <a class="indexterm" name="id417948"></a>
    228228        In <code class="filename">/etc/cups/mime.convs</code>, have this line:
    229         <a class="indexterm" name="id394400"></a>
     229        <a class="indexterm" name="id417961"></a>
    230230</p><pre class="programlisting">
    231231application/octet-stream   application/vnd.cups-raw   0   -
     
    238238        not <span class="emphasis"><em>enforce</em></span> &#8220;<span class="quote">raw</span>&#8221; printing, it only <span class="emphasis"><em>allows</em></span> it.
    239239        </p></div><p><b>Background. </b>
    240         <a class="indexterm" name="id394461"></a>
    241 <a class="indexterm" name="id394468"></a>
     240        <a class="indexterm" name="id418022"></a>
     241<a class="indexterm" name="id418029"></a>
    242242        That CUPS is a more security-aware printing system than traditional ones does not by default allow a user to
    243243        send deliberate (possibly binary) data to printing devices. This could be easily abused to launch a
     
    253253        more advanced CUPS/Samba printing, simply skip the remaining sections
    254254        of this chapter.
    255         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394512"></a>Driver Upload Methods</h3></div></div></div><p>
     255        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id418073"></a>Driver Upload Methods</h3></div></div></div><p>
    256256        This section describes three familiar methods, plus one new one, by which
    257257        printer drivers may be uploaded.
    258258        </p><p>
    259         <a class="indexterm" name="id394524"></a>
     259        <a class="indexterm" name="id418085"></a>
    260260        If you want to use the MS-RPC-type printing, you must upload the
    261261        drivers onto the Samba server first (<em class="parameter"><code>[print$]</code></em>
    262262        share). For a discussion on how to deposit printer drivers on the
    263263        Samba host (so the Windows clients can download and use them via
    264         &#8220;<span class="quote">Point'n'Print</span>&#8221;), please refer to the <a href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing
     264        &#8220;<span class="quote">Point'n'Print</span>&#8221;), please refer to the <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing
    265265        chapter</a> of this book. There you will find a description or reference to
    266266        three methods of preparing the client drivers on the Samba server:
    267267        </p><div class="itemizedlist"><ul type="disc"><li><p>
    268                 <a class="indexterm" name="id394557"></a>
     268                <a class="indexterm" name="id418118"></a>
    269269                The GUI, &#8220;<span class="quote">Add Printer Wizard</span>&#8221; <span class="emphasis"><em>upload-from-a-Windows-client</em></span> method.
    270270                </p></li><li><p>
    271271                The command line, &#8220;<span class="quote">smbclient/rpcclient</span>&#8221; upload-from-a-UNIX-workstation method.
    272272                </p></li><li><p>
    273                 <a class="indexterm" name="id394584"></a>
     273                <a class="indexterm" name="id418145"></a>
    274274                The Imprints tool set method.
    275275                </p></li></ul></div><p>
    276 <a class="indexterm" name="id394595"></a>
     276<a class="indexterm" name="id418156"></a>
    277277        These three methods apply to CUPS all the same. The <code class="literal">cupsaddsmb</code> utility is a new and more
    278278        convenient way to load the Windows drivers into Samba and is provided if you use CUPS.
     
    280280        <code class="literal">cupsaddsmb</code> is discussed in much detail later in this chapter. But we first
    281281        explore the CUPS filtering system and compare the Windows and UNIX printing architectures.
    282         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id394623"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p>
    283         <a class="indexterm" name="id394631"></a>
     282        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id418184"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p>
     283        <a class="indexterm" name="id418192"></a>
    284284        We now know how to set up a &#8220;<span class="quote">dump</span>&#8221; print server, that is, a server that spools
    285285        print jobs &#8220;<span class="quote">raw</span>&#8221;, leaving the print data untouched.
    286286        </p><p>
    287287        You might need to set up CUPS in a smarter way. The reasons could be manifold:
    288         </p><a class="indexterm" name="id394654"></a><a class="indexterm" name="id394660"></a><a class="indexterm" name="id394667"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which
     288        </p><a class="indexterm" name="id418215"></a><a class="indexterm" name="id418221"></a><a class="indexterm" name="id418228"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which
    289289        printer did how many pages? What was the average data size of a job?
    290290        What was the average print run per day? What are the typical hourly
     
    302302        CUPS filtering system, how it works, and how you can tweak it.
    303303        </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gdipost"></a>GDI on Windows, PostScript on UNIX</h3></div></div></div><p>
    304         <a class="indexterm" name="id394728"></a>
    305         <a class="indexterm" name="id394735"></a>
     304        <a class="indexterm" name="id418289"></a>
     305        <a class="indexterm" name="id418296"></a>
    306306        Network printing is one of the most complicated and error-prone
    307307        day-to-day tasks any user or administrator may encounter. This is
    308308        true for all OS platforms, and there are reasons it is so.
    309309        </p><p>
    310         <a class="indexterm" name="id394746"></a>
    311         <a class="indexterm" name="id394753"></a>
    312 <a class="indexterm" name="id394759"></a>
    313 <a class="indexterm" name="id394766"></a>
    314 <a class="indexterm" name="id394773"></a>
     310        <a class="indexterm" name="id418307"></a>
     311        <a class="indexterm" name="id418314"></a>
     312<a class="indexterm" name="id418320"></a>
     313<a class="indexterm" name="id418327"></a>
     314<a class="indexterm" name="id418334"></a>
    315315        You can't expect to throw just any file format at a printer and have it get printed. A file format conversion
    316316        must take place. The problem is that there is no common standard for print file formats across all
     
    319319        used page description languages (PDLs), there are still many manufacturers who &#8220;<span class="quote">roll their own</span>&#8221;
    320320        (their reasons may be unacceptable license fees for using printer-embedded PostScript interpreters, and so on).
    321         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394797"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p>
    322         <a class="indexterm" name="id394804"></a>
    323         <a class="indexterm" name="id394811"></a>
    324         <a class="indexterm" name="id394818"></a>
    325 <a class="indexterm" name="id394824"></a>
     321        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id418358"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p>
     322        <a class="indexterm" name="id418365"></a>
     323        <a class="indexterm" name="id418372"></a>
     324        <a class="indexterm" name="id418378"></a>
     325<a class="indexterm" name="id418385"></a>
    326326        In Windows OS, the format conversion job is done by the printer drivers. On MS Windows OS platforms all
    327327        application programmers have at their disposal a built-in API, the graphical device interface (GDI), as part
     
    334334        driver and converted to the printer-specific file format.
    335335        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    336         <a class="indexterm" name="id394852"></a>
    337 <a class="indexterm" name="id394859"></a>
    338 <a class="indexterm" name="id394866"></a>
     336        <a class="indexterm" name="id418413"></a>
     337<a class="indexterm" name="id418420"></a>
     338<a class="indexterm" name="id418426"></a>
    339339        To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation
    340         for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id394874"></a> <a class="indexterm" name="id394881"></a>
    341         <a class="indexterm" name="id394888"></a> <a class="indexterm" name="id394894"></a> systems.
     340        for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id418435"></a> <a class="indexterm" name="id418442"></a>
     341        <a class="indexterm" name="id418448"></a> <a class="indexterm" name="id418455"></a> systems.
    342342        Apple's <span class="emphasis"><em>core graphic engine</em></span> uses a <span class="emphasis"><em>PDF</em></span> derivative for all display work.
    343343        </p></div><p>
    344         The example in <a href="CUPS-printing.html#1small" title="Figure 22.1. Windows Printing to a Local Printer.">Windows Printing to a Local Printer</a> illustrates local Windows
     344        The example in <a class="link" href="CUPS-printing.html#1small" title="Figure 22.1. Windows Printing to a Local Printer.">Windows Printing to a Local Printer</a> illustrates local Windows
    345345        printing.
    346         </p><div class="figure"><a name="1small"></a><p class="title"><b>Figure 22.1. Windows Printing to a Local Printer.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/1small.png" alt="Windows Printing to a Local Printer."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394963"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p>
    347         <a class="indexterm" name="id394971"></a>
    348         <a class="indexterm" name="id394978"></a>
    349         <a class="indexterm" name="id394984"></a>
    350         <a class="indexterm" name="id394991"></a>
     346        </p><div class="figure"><a name="1small"></a><p class="title"><b>Figure 22.1. Windows Printing to a Local Printer.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/1small.png" alt="Windows Printing to a Local Printer."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id418524"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p>
     347        <a class="indexterm" name="id418532"></a>
     348        <a class="indexterm" name="id418538"></a>
     349        <a class="indexterm" name="id418545"></a>
     350        <a class="indexterm" name="id418552"></a>
    351351        In UNIX and Linux, there is no comparable layer built into the OS kernel(s) or the X (screen display) server.
    352352        Every application is responsible for itself to create its print output. Fortunately, most use PostScript and
     
    362362        your system; there are separate ones for fonts used for X display and fonts to be used on paper.
    363363        </p><p><b>Background. </b>
    364         <a class="indexterm" name="id395031"></a>
    365 <a class="indexterm" name="id395038"></a>
    366 <a class="indexterm" name="id395045"></a>
    367 <a class="indexterm" name="id395051"></a>
    368 <a class="indexterm" name="id395058"></a>
    369 <a class="indexterm" name="id395065"></a>
    370 <a class="indexterm" name="id395072"></a>
    371 <a class="indexterm" name="id395079"></a>
    372 <a class="indexterm" name="id395085"></a>
    373 <a class="indexterm" name="id395092"></a>
     364        <a class="indexterm" name="id418592"></a>
     365<a class="indexterm" name="id418599"></a>
     366<a class="indexterm" name="id418606"></a>
     367<a class="indexterm" name="id418612"></a>
     368<a class="indexterm" name="id418619"></a>
     369<a class="indexterm" name="id418626"></a>
     370<a class="indexterm" name="id418633"></a>
     371<a class="indexterm" name="id418640"></a>
     372<a class="indexterm" name="id418646"></a>
     373<a class="indexterm" name="id418653"></a>
    374374        The PostScript programming language is an &#8220;<span class="quote">invention</span>&#8221; by Adobe, but its specifications have been
    375375        published extensively. Its strength lies in its powerful abilities to describe graphical objects (fonts,
     
    383383        program or on paper by a printer.
    384384        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="post-and-ghost"></a>PostScript and Ghostscript</h3></div></div></div><p>
    385         <a class="indexterm" name="id395133"></a>
    386         <a class="indexterm" name="id395139"></a>
    387         <a class="indexterm" name="id395148"></a>
    388 <a class="indexterm" name="id395158"></a>
    389 <a class="indexterm" name="id395164"></a>
     385        <a class="indexterm" name="id418694"></a>
     386        <a class="indexterm" name="id418700"></a>
     387        <a class="indexterm" name="id418709"></a>
     388<a class="indexterm" name="id418718"></a>
     389<a class="indexterm" name="id418725"></a>
    390390        So UNIX is lacking a common ground for printing on paper and displaying on screen. Despite this unfavorable
    391391        legacy for UNIX, basic printing is fairly easy if you have PostScript printers at your disposal. The reason is
     
    396396        different than PostScript printing a file from a Windows origin.
    397397        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    398         <a class="indexterm" name="id395187"></a>
    399 <a class="indexterm" name="id395194"></a>
    400 <a class="indexterm" name="id395200"></a>
     398        <a class="indexterm" name="id418748"></a>
     399<a class="indexterm" name="id418755"></a>
     400<a class="indexterm" name="id418761"></a>
    401401        Traditional UNIX programs and printing systems  while using PostScript  are largely not
    402402        PPD-aware. PPDs are &#8220;<span class="quote">PostScript Printer Description</span>&#8221; files. They enable you to specify and
    403403        control all options a printer supports: duplexing, stapling, and punching. Therefore, UNIX users for a long
    404404        time couldn't choose many of the supported device and job options, unlike Windows or Apple users. But now
    405         there is CUPS. as illustrated in <a href="CUPS-printing.html#2small" title="Figure 22.2. Printing to a PostScript Printer.">Printing to a PostScript Printer</a>.
     405        there is CUPS. as illustrated in <a class="link" href="CUPS-printing.html#2small" title="Figure 22.2. Printing to a PostScript Printer.">Printing to a PostScript Printer</a>.
    406406        </p></div><div class="figure"><a name="2small"></a><p class="title"><b>Figure 22.2. Printing to a PostScript Printer.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/2small.png" alt="Printing to a PostScript Printer."></div></div></div><br class="figure-break"><p>
    407         <a class="indexterm" name="id395274"></a>
     407        <a class="indexterm" name="id418835"></a>
    408408        However, there are other types of printers out there. These do not know how to print PostScript. They use
    409409        their own PDL, often proprietary. To print to them is much more demanding. Since your UNIX applications mostly
    410410        produce PostScript, and since these devices do not understand PostScript, you need to convert the print files
    411411        to a format suitable for your printer on the host before you can send it away.
    412         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395287"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p>
    413         <a class="indexterm" name="id395295"></a>
     412        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id418848"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p>
     413        <a class="indexterm" name="id418856"></a>
    414414        Here is where Ghostscript kicks in. Ghostscript is the traditional (and quite powerful) PostScript interpreter
    415415        used on UNIX platforms. It is a RIP in software, capable of doing a <span class="emphasis"><em>lot</em></span> of file format
    416416        conversions for a very broad spectrum of hardware devices as well as software file formats.  Ghostscript
    417417        technology and drivers are what enable PostScript printing to non-PostScript hardware. This is shown in
    418         <a href="CUPS-printing.html#3small" title="Figure 22.3. Ghostscript as a RIP for Non-PostScript Printers.">Ghostscript as a RIP for Non-PostScript Printers</a>.
     418        <a class="link" href="CUPS-printing.html#3small" title="Figure 22.3. Ghostscript as a RIP for Non-PostScript Printers.">Ghostscript as a RIP for Non-PostScript Printers</a>.
    419419        </p><div class="figure"><a name="3small"></a><p class="title"><b>Figure 22.3. Ghostscript as a RIP for Non-PostScript Printers.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/3small.png" alt="Ghostscript as a RIP for Non-PostScript Printers."></div></div></div><br class="figure-break"><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    420 <a class="indexterm" name="id395360"></a>
    421 <a class="indexterm" name="id395367"></a>
    422 <a class="indexterm" name="id395374"></a>
     420<a class="indexterm" name="id418922"></a>
     421<a class="indexterm" name="id418928"></a>
     422<a class="indexterm" name="id418935"></a>
    423423        Use the &#8220;<span class="quote">gs -h</span>&#8221; command to check for all built-in &#8220;<span class="quote">devices</span>&#8221; on your Ghostscript
    424424        version. If you specify a parameter of <em class="parameter"><code>-sDEVICE=png256</code></em> on your Ghostscript command
     
    428428        initially put under the &#8220;<span class="quote">AFPL</span>&#8221; license, but re-released under the GNU GPL as soon as the next
    429429        AFPL version appears. GNU Ghostscript is probably the version installed on most Samba systems. But it has some
    430         deficiencies.  <a class="indexterm" name="id395406"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript,
     430        deficiencies.  <a class="indexterm" name="id418968"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript,
    431431        with lots of bug-fixes, additional devices, and improvements. It is jointly maintained by developers from
    432432        CUPS, Gimp-Print, MandrakeSoft, SuSE, Red Hat, and Debian. It includes the &#8220;<span class="quote">cups</span>&#8221; device
    433433        (essential to print to non-PS printers from CUPS).
    434         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395426"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p>
    435         <a class="indexterm" name="id395434"></a>
    436 <a class="indexterm" name="id395441"></a>
    437 <a class="indexterm" name="id395447"></a>
     434        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id418988"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p>
     435        <a class="indexterm" name="id418996"></a>
     436<a class="indexterm" name="id419002"></a>
     437<a class="indexterm" name="id419009"></a>
    438438        While PostScript in essence is a PDL to represent the page layout in a device-independent way, real-world
    439439        print jobs are always ending up being output on hardware with device-specific features. To take care of all
     
    457457        file created by the driver.
    458458        </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    459         <a class="indexterm" name="id395476"></a>
    460 <a class="indexterm" name="id395483"></a>
     459        <a class="indexterm" name="id419038"></a>
     460<a class="indexterm" name="id419044"></a>
    461461        A PostScript file that was created to contain device-specific commands
    462462        for achieving a certain print job output (e.g., duplexed, stapled, and
     
    464464        may not be printable at all on other models; it also may not be fit
    465465        for further processing by software (e.g., by a PDF distilling program).
    466         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395495"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p>
    467 <a class="indexterm" name="id395503"></a>
    468 <a class="indexterm" name="id395510"></a>
    469 <a class="indexterm" name="id395516"></a>
     466        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id419056"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p>
     467<a class="indexterm" name="id419064"></a>
     468<a class="indexterm" name="id419071"></a>
     469<a class="indexterm" name="id419078"></a>
    470470        CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if
    471471        a vendor does not mention our favorite OS in his or her manuals and brochures, you can safely trust this:
     
    473473        access the full power of your printer just like a Windows NT user could!
    474474        </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    475         To check the spec compliance of any PPD online, go to <a href="http://www.cups.org/testppd.php" target="_top">http://www.cups.org/testppd.php</a> and upload your PPD. You will
     475        To check the spec compliance of any PPD online, go to <a class="ulink" href="http://www.cups.org/testppd.php" target="_top">http://www.cups.org/testppd.php</a> and upload your PPD. You will
    476476        see the results displayed immediately. CUPS in all versions after 1.1.19 has a much stricter internal PPD
    477477        parsing and checking code enabled; in case of printing trouble, this online resource should be one of your
    478478        first pit stops.
    479479        </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    480         <a class="indexterm" name="id395550"></a>
    481         <a class="indexterm" name="id395556"></a>
     480        <a class="indexterm" name="id419111"></a>
     481        <a class="indexterm" name="id419118"></a>
    482482        For real PostScript printers, <span class="emphasis"><em>do not</em></span> use the <span class="emphasis"><em>Foomatic</em></span> or
    483483        <span class="emphasis"><em>cupsomatic</em></span> PPDs from Linuxprinting.org. With these devices, the original vendor-provided
    484484        PPDs are always the first choice.
    485485        </p></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    486 <a class="indexterm" name="id395580"></a>
     486<a class="indexterm" name="id419141"></a>
    487487        If you are looking for an original vendor-provided PPD of a specific device, and you know that an NT4 box (or
    488488        any other Windows box) on your LAN has the PostScript driver installed, just use <code class="literal">smbclient
    489489        //NT4-box/print\$ -U username</code> to access the Windows directory where all printer driver files are
    490490        stored. First look in the <code class="filename">W32X86/2</code> subdirectory for the PPD you are seeking.
    491         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395604"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p>
    492 <a class="indexterm" name="id395612"></a>
    493 <a class="indexterm" name="id395618"></a>
    494 <a class="indexterm" name="id395625"></a>
     491        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id419165"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p>
     492<a class="indexterm" name="id419173"></a>
     493<a class="indexterm" name="id419180"></a>
     494<a class="indexterm" name="id419186"></a>
    495495        CUPS also uses specially crafted PPDs to handle non-PostScript printers. These PPDs are usually not available
    496496        from the vendors (and no, you can't just take the PPD of a PostScript printer with the same model name and
    497497        hope it works for the non-PostScript version too). To understand how these PPDs work for non-PS printers, we
    498498        first need to dive deeply into the CUPS filtering and file format conversion architecture. Stay tuned.
    499         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id395639"></a>The CUPS Filtering Architecture</h2></div></div></div><p>
    500 <a class="indexterm" name="id395647"></a>
    501 <a class="indexterm" name="id395653"></a>
    502 <a class="indexterm" name="id395660"></a>
    503 <a class="indexterm" name="id395667"></a>
    504 <a class="indexterm" name="id395674"></a>
     499        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id419200"></a>The CUPS Filtering Architecture</h2></div></div></div><p>
     500<a class="indexterm" name="id419208"></a>
     501<a class="indexterm" name="id419215"></a>
     502<a class="indexterm" name="id419222"></a>
     503<a class="indexterm" name="id419228"></a>
     504<a class="indexterm" name="id419235"></a>
    505505The core of the CUPS filtering system is based on Ghostscript. In addition to Ghostscript, CUPS uses some
    506506other filters of its own. You (or your OS vendor) may have plugged in even more filters. CUPS handles all data
     
    513513If CUPS rasterizes a PostScript file natively to a bitmap, this is done in two stages:
    514514</p><div class="itemizedlist"><ul type="disc"><li><p>
    515 <a class="indexterm" name="id395702"></a>
    516 <a class="indexterm" name="id395709"></a>
     515<a class="indexterm" name="id419258"></a>
     516<a class="indexterm" name="id419265"></a>
    517517        The first stage uses a Ghostscript device named &#8220;<span class="quote">cups</span>&#8221;
    518518        (this is since version 1.1.15) and produces a generic raster format
    519519        called &#8220;<span class="quote">CUPS raster</span>&#8221;.
    520520        </p></li><li><p>
    521 <a class="indexterm" name="id395729"></a>
     521<a class="indexterm" name="id419284"></a>
    522522        The second stage uses a &#8220;<span class="quote">raster driver</span>&#8221; that converts
    523523        the generic CUPS raster to a device-specific raster.
    524524        </p></li></ul></div><p>
    525 <a class="indexterm" name="id395744"></a>
    526 <a class="indexterm" name="id395751"></a>
    527 <a class="indexterm" name="id395758"></a>
     525<a class="indexterm" name="id419300"></a>
     526<a class="indexterm" name="id419307"></a>
     527<a class="indexterm" name="id419314"></a>
    528528Make sure your Ghostscript version has the &#8220;<span class="quote">cups</span>&#8221; device compiled in (check with <code class="literal">gs -h |
    529529grep cups</code>). Otherwise you may encounter the dreaded <code class="computeroutput">Unable to convert file
    5305300</code> in your CUPS error_log file. To have &#8220;<span class="quote">cups</span>&#8221; as a device in your Ghostscript,
    531531you either need to patch GNU Ghostscript and recompile or use
    532 <a class="indexterm" name="id395786"></a><a href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP
     532<a class="indexterm" name="id419342"></a><a class="ulink" href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP
    533533Ghostscript. It supports not just CUPS, but 300 other devices (while GNU Ghostscript supports only about 180).
    534534Because of this broad output device support, ESP Ghostscript is the first choice for non-CUPS spoolers, too.
    535535It is now recommended by Linuxprinting.org for all spoolers.
    536536</p><p>
    537 <a class="indexterm" name="id395806"></a>
    538 <a class="indexterm" name="id395812"></a>
    539 <a class="indexterm" name="id395819"></a>
    540 <a class="indexterm" name="id395826"></a>
     537<a class="indexterm" name="id419362"></a>
     538<a class="indexterm" name="id419368"></a>
     539<a class="indexterm" name="id419375"></a>
     540<a class="indexterm" name="id419382"></a>
    541541CUPS printers may be set up to use external rendering paths. One of the most common is provided by the
    542 Foomatic/cupsomatic concept from <a href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a>. This
     542Foomatic/cupsomatic concept from <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a>. This
    543543uses the classical Ghostscript approach, doing everything in one step.  It does not use the
    544544&#8220;<span class="quote">cups</span>&#8221; device, but one of the many others. However, even for Foomatic/cupsomatic usage, best
    545 results and <a class="indexterm" name="id395845"></a> broadest printer
     545results and <a class="indexterm" name="id419401"></a> broadest printer
    546546model support is provided by ESP Ghostscript (more about Foomatic/cupsomatic, particularly the new version
    547547called now <span class="emphasis"><em>foomatic-rip</em></span>, follows).
    548 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395860"></a>MIME Types and CUPS Filters</h3></div></div></div><p>
    549         <a class="indexterm" name="id395868"></a>
    550         <a class="indexterm" name="id395878"></a>
    551 <a class="indexterm" name="id395884"></a>
    552 <a class="indexterm" name="id395891"></a>
    553 <a class="indexterm" name="id395898"></a>
     548</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id419416"></a>MIME Types and CUPS Filters</h3></div></div></div><p>
     549        <a class="indexterm" name="id419424"></a>
     550        <a class="indexterm" name="id419433"></a>
     551<a class="indexterm" name="id419440"></a>
     552<a class="indexterm" name="id419447"></a>
     553<a class="indexterm" name="id419454"></a>
    554554        CUPS reads the file <code class="filename">/etc/cups/mime.types</code> (and all other files carrying a
    555555        <code class="filename">*.types</code> suffix in the same directory) upon startup. These files contain the MIME type
     
    557557        man page for <code class="filename">mime.types</code> and in the comments section of the
    558558        <code class="filename">mime.types</code> file itself. A simple rule reads like this:
    559         <a class="indexterm" name="id395931"></a>
     559        <a class="indexterm" name="id419487"></a>
    560560</p><pre class="programlisting">
    561561application/pdf         pdf string(0,%PDF)
    562562</pre><p>
    563 <a class="indexterm" name="id395944"></a>
    564 <a class="indexterm" name="id395951"></a>
     563<a class="indexterm" name="id419500"></a>
     564<a class="indexterm" name="id419507"></a>
    565565        This means if a filename has a <code class="filename">.pdf</code> suffix or if the magic string
    566566        <span class="emphasis"><em>%PDF</em></span> is right at the beginning of the file itself (offset 0 from the start), then it is a
     
    569569application/postscript  ai eps ps string(0,%!) string(0,&lt;04&gt;%!)
    570570</pre><p>
    571 <a class="indexterm" name="id395981"></a>
    572 <a class="indexterm" name="id395988"></a>
    573 <a class="indexterm" name="id395995"></a>
    574 <a class="indexterm" name="id396002"></a>
    575 <a class="indexterm" name="id396008"></a>
    576 <a class="indexterm" name="id396015"></a>
     571<a class="indexterm" name="id419537"></a>
     572<a class="indexterm" name="id419544"></a>
     573<a class="indexterm" name="id419551"></a>
     574<a class="indexterm" name="id419557"></a>
     575<a class="indexterm" name="id419564"></a>
     576<a class="indexterm" name="id419571"></a>
    577577        If the filename has one of the suffixes <code class="filename">.ai</code>, <code class="filename">.eps</code>,
    578578        <code class="filename">.ps</code>, or if the file itself starts with one of the strings <span class="emphasis"><em>%!</em></span> or
     
    580580        (<em class="parameter"><code>application/postscript</code></em>).
    581581        </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    582 <a class="indexterm" name="id396057"></a>
     582<a class="indexterm" name="id419613"></a>
    583583        Don't confuse the other mime.types files your system might be using
    584584        with the one in the <code class="filename">/etc/cups/</code> directory.
    585585        </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    586 <a class="indexterm" name="id396075"></a>
    587 <a class="indexterm" name="id396082"></a>
    588 <a class="indexterm" name="id396089"></a>
    589 <a class="indexterm" name="id396095"></a>
    590 <a class="indexterm" name="id396102"></a>
     586<a class="indexterm" name="id419631"></a>
     587<a class="indexterm" name="id419638"></a>
     588<a class="indexterm" name="id419644"></a>
     589<a class="indexterm" name="id419651"></a>
     590<a class="indexterm" name="id419658"></a>
    591591        There is an important difference between two similar MIME types in CUPS: one is
    592592        <em class="parameter"><code>application/postscript</code></em>, the other is
     
    599599        <em class="parameter"><code>pstops</code></em> filter. pstops uses information contained in the PPD to do the transformation.
    600600        </p></div><p>
    601 <a class="indexterm" name="id396158"></a>
    602 <a class="indexterm" name="id396165"></a>
    603 <a class="indexterm" name="id396172"></a>
    604 <a class="indexterm" name="id396178"></a>
    605 <a class="indexterm" name="id396185"></a>
    606 <a class="indexterm" name="id396192"></a>
    607 <a class="indexterm" name="id396198"></a>
    608 <a class="indexterm" name="id396205"></a>
    609 <a class="indexterm" name="id396211"></a>
    610 <a class="indexterm" name="id396218"></a>
    611 <a class="indexterm" name="id396225"></a>
    612 <a class="indexterm" name="id396232"></a>
    613 <a class="indexterm" name="id396239"></a>
    614 <a class="indexterm" name="id396245"></a>
    615 <a class="indexterm" name="id396252"></a>
    616 <a class="indexterm" name="id396259"></a>
     601<a class="indexterm" name="id419714"></a>
     602<a class="indexterm" name="id419721"></a>
     603<a class="indexterm" name="id419728"></a>
     604<a class="indexterm" name="id419734"></a>
     605<a class="indexterm" name="id419741"></a>
     606<a class="indexterm" name="id419747"></a>
     607<a class="indexterm" name="id419754"></a>
     608<a class="indexterm" name="id419760"></a>
     609<a class="indexterm" name="id419767"></a>
     610<a class="indexterm" name="id419774"></a>
     611<a class="indexterm" name="id419781"></a>
     612<a class="indexterm" name="id419788"></a>
     613<a class="indexterm" name="id419794"></a>
     614<a class="indexterm" name="id419801"></a>
     615<a class="indexterm" name="id419808"></a>
     616<a class="indexterm" name="id419815"></a>
    617617        CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and
    618618        many image formats (GIF, PNG, TIFF, JPEG, Photo-CD, SUN-Raster,
    619619        PNM, PBM, SGI-RGB, and more) and their associated MIME types
    620620        with its filters.
    621         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396270"></a>MIME Type Conversion Rules</h3></div></div></div><p>
    622         <a class="indexterm" name="id396278"></a>
    623         <a class="indexterm" name="id396284"></a>
    624 <a class="indexterm" name="id396291"></a>
    625 <a class="indexterm" name="id396298"></a>
    626 <a class="indexterm" name="id396305"></a>
     621        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id419826"></a>MIME Type Conversion Rules</h3></div></div></div><p>
     622        <a class="indexterm" name="id419834"></a>
     623        <a class="indexterm" name="id419840"></a>
     624<a class="indexterm" name="id419847"></a>
     625<a class="indexterm" name="id419854"></a>
     626<a class="indexterm" name="id419861"></a>
    627627        CUPS reads the file <code class="filename">/etc/cups/mime.convs</code>
    628628        (and all other files named with a <code class="filename">*.convs</code>
     
    635635application/pdf         application/postscript   33   pdftops
    636636</pre><p>
    637 <a class="indexterm" name="id396332"></a>
     637<a class="indexterm" name="id419888"></a>
    638638        This means that the <em class="parameter"><code>pdftops</code></em> filter will take
    639639        <em class="parameter"><code>application/pdf</code></em> as input and produce
     
    641641        cost of this operation is 33 CUPS-$. The next filter is more
    642642        expensive, costing 66 CUPS-$:
    643         <a class="indexterm" name="id396358"></a>
     643        <a class="indexterm" name="id419914"></a>
    644644</p><pre class="programlisting">
    645645application/vnd.hp-HPGL application/postscript   66   hpgltops
    646646</pre><p>
    647 <a class="indexterm" name="id396371"></a>
     647<a class="indexterm" name="id419927"></a>
    648648        This is the <em class="parameter"><code>hpgltops</code></em>, which processes HP-GL
    649649        plotter files to PostScript.
    650         <a class="indexterm" name="id396384"></a>
     650        <a class="indexterm" name="id419940"></a>
    651651</p><pre class="programlisting">
    652652application/octet-stream
    653653</pre><p>
    654654        Here are two more examples:
    655         <a class="indexterm" name="id396398"></a>
    656 <a class="indexterm" name="id396404"></a>
    657 <a class="indexterm" name="id396411"></a>
    658 <a class="indexterm" name="id396418"></a>
     655        <a class="indexterm" name="id419953"></a>
     656<a class="indexterm" name="id419960"></a>
     657<a class="indexterm" name="id419967"></a>
     658<a class="indexterm" name="id419974"></a>
    659659</p><pre class="programlisting">
    660660application/x-shell     application/postscript   33    texttops
    661661text/plain              application/postscript   33    texttops
    662662</pre><p>
    663 <a class="indexterm" name="id396431"></a>
     663<a class="indexterm" name="id419987"></a>
    664664        The last two examples name the <em class="parameter"><code>texttops</code></em> filter to work on
    665665        <em class="parameter"><code>text/plain</code></em> as well as on <em class="parameter"><code>application/x-shell</code></em>. (Hint: This
    666666        differentiation is needed for the syntax highlighting feature of <em class="parameter"><code>texttops</code></em>).
    667         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396465"></a>Filtering  Overview</h3></div></div></div><p>
    668         <a class="indexterm" name="id396473"></a>
     667        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420021"></a>Filtering  Overview</h3></div></div></div><p>
     668        <a class="indexterm" name="id420029"></a>
    669669        There are many more combinations named in <code class="filename">mime.convs</code>. However, you are not limited to use
    670670        the ones predefined there. You can plug in any filter you like to the CUPS framework. It must meet, or must be
     
    672672        sure it complies with what CUPS needs and put in the right lines in <code class="filename">mime.types</code> and
    673673        <code class="filename">mime.convs</code>; then it will work seamlessly inside CUPS.
    674         </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id396505"></a>Filter Requirements</h4></div></div></div><p>
     674        </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id420058"></a>Filter Requirements</h4></div></div></div><p>
    675675        The &#8220;<span class="quote">CUPS requirements</span>&#8221; for filters are simple. Take filenames or <code class="filename">stdin</code> as
    676676        input and write to <code class="filename">stdout</code>. They should take these arguments:
     
    691691                        fed through <code class="filename">stdin</code>). In most cases, it is easy to
    692692                        write a simple wrapper script around existing filters to make them work with CUPS.
    693                         </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396616"></a>Prefilters</h3></div></div></div><p>
    694         <a class="indexterm" name="id396624"></a>
    695 <a class="indexterm" name="id396631"></a>
    696 <a class="indexterm" name="id396637"></a>
     693                        </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420169"></a>Prefilters</h3></div></div></div><p>
     694        <a class="indexterm" name="id420177"></a>
     695<a class="indexterm" name="id420184"></a>
     696<a class="indexterm" name="id420191"></a>
    697697        As previously stated, PostScript is the central file format to any UNIX-based
    698698        printing system. From PostScript, CUPS generates raster data to feed
    699699        non-PostScript printers.
    700700        </p><p>
    701 <a class="indexterm" name="id396649"></a>
    702 <a class="indexterm" name="id396656"></a>
    703 <a class="indexterm" name="id396663"></a>
    704 <a class="indexterm" name="id396669"></a>
    705 <a class="indexterm" name="id396676"></a>
    706 <a class="indexterm" name="id396682"></a>
    707 <a class="indexterm" name="id396689"></a>
    708 <a class="indexterm" name="id396696"></a>
    709 <a class="indexterm" name="id396703"></a>
    710 <a class="indexterm" name="id396710"></a>
     701<a class="indexterm" name="id420202"></a>
     702<a class="indexterm" name="id420209"></a>
     703<a class="indexterm" name="id420216"></a>
     704<a class="indexterm" name="id420223"></a>
     705<a class="indexterm" name="id420229"></a>
     706<a class="indexterm" name="id420236"></a>
     707<a class="indexterm" name="id420242"></a>
     708<a class="indexterm" name="id420249"></a>
     709<a class="indexterm" name="id420256"></a>
     710<a class="indexterm" name="id420263"></a>
    711711        But what happens if you send one of the supported non-PS formats to print? Then CUPS runs
    712712        &#8220;<span class="quote">prefilters</span>&#8221; on these input formats to generate PostScript first. There are prefilters to create
     
    716716        running on all supported image formats, the <em class="parameter"><code>imagetops</code></em> filter. Its outcome is always of
    717717        MIME type <em class="parameter"><code>application/vnd.cups-postscript</code></em> (not application/postscript), meaning it has
    718         the print options already embedded into the file. This is shown in <a href="CUPS-printing.html#4small" title="Figure 22.4. Prefiltering in CUPS to Form PostScript.">Prefiltering in
     718        the print options already embedded into the file. This is shown in <a class="link" href="CUPS-printing.html#4small" title="Figure 22.4. Prefiltering in CUPS to Form PostScript.">Prefiltering in
    719719        CUPS to Form PostScript</a>.
    720         </p><div class="figure"><a name="4small"></a><p class="title"><b>Figure 22.4. Prefiltering in CUPS to Form PostScript.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/4small.png" width="135" alt="Prefiltering in CUPS to Form PostScript."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396793"></a>pstops</h3></div></div></div><p>
    721 <a class="indexterm" name="id396801"></a>
    722 <a class="indexterm" name="id396808"></a>
    723 <a class="indexterm" name="id396814"></a>
    724 <a class="indexterm" name="id396821"></a>
    725 <a class="indexterm" name="id396828"></a>
    726 <a class="indexterm" name="id396835"></a>
    727 <a class="indexterm" name="id396842"></a>
     720        </p><div class="figure"><a name="4small"></a><p class="title"><b>Figure 22.4. Prefiltering in CUPS to Form PostScript.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/4small.png" width="135" alt="Prefiltering in CUPS to Form PostScript."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420346"></a>pstops</h3></div></div></div><p>
     721<a class="indexterm" name="id420354"></a>
     722<a class="indexterm" name="id420361"></a>
     723<a class="indexterm" name="id420368"></a>
     724<a class="indexterm" name="id420375"></a>
     725<a class="indexterm" name="id420381"></a>
     726<a class="indexterm" name="id420388"></a>
     727<a class="indexterm" name="id420395"></a>
    728728        <span class="emphasis"><em>pstops</em></span> is a filter that is used to convert <em class="parameter"><code>application/postscript</code></em> to
    729729        <em class="parameter"><code>application/vnd.cups-postscript</code></em>. As stated earlier, this filter inserts all
    730730        device-specific print options (commands to the printer to ask for the duplexing of output, or stapling and
    731         punching it, and so on) into the PostScript file. An example is illustrated in <a href="CUPS-printing.html#5small" title="Figure 22.5. Adding Device-Specific Print Options.">Adding Device-Specific Print Options</a>.
     731        punching it, and so on) into the PostScript file. An example is illustrated in <a class="link" href="CUPS-printing.html#5small" title="Figure 22.5. Adding Device-Specific Print Options.">Adding Device-Specific Print Options</a>.
    732732        </p><div class="figure"><a name="5small"></a><p class="title"><b>Figure 22.5. Adding Device-Specific Print Options.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/5small.png" width="135" alt="Adding Device-Specific Print Options."></div></div></div><br class="figure-break"><p>
    733733        This is not all. Other tasks performed by it are:
     
    741741                </p></li><li><p>Counting the pages of the job to insert the accounting
    742742                information into the <code class="filename">/var/log/cups/page_log</code>.
    743                 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396952"></a>pstoraster</h3></div></div></div><p>
    744 <a class="indexterm" name="id396960"></a>
    745 <a class="indexterm" name="id396967"></a>
    746 <a class="indexterm" name="id396973"></a>
     743                </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420506"></a>pstoraster</h3></div></div></div><p>
     744<a class="indexterm" name="id420514"></a>
     745<a class="indexterm" name="id420520"></a>
     746<a class="indexterm" name="id420527"></a>
    747747        <em class="parameter"><code>pstoraster</code></em> is at the core of the CUPS filtering system. It is responsible for the first
    748748        stage of the rasterization process. Its input is of MIME type application/vnd.cups-postscript; its output is
    749749        application/vnd.cups-raster. This output format is not yet meant to be printable. Its aim is to serve as a
    750750        general-purpose input format for more specialized <span class="emphasis"><em>raster drivers</em></span> that are able to
    751         generate device-specific printer data. This is shown in <a href="CUPS-printing.html#cups-raster" title="Figure 22.6. PostScript to Intermediate Raster Format.">the PostScript to
     751        generate device-specific printer data. This is shown in <a class="link" href="CUPS-printing.html#cups-raster" title="Figure 22.6. PostScript to Intermediate Raster Format.">the PostScript to
    752752        Intermediate Raster Format diagram</a>.
    753753        </p><div class="figure"><a name="cups-raster"></a><p class="title"><b>Figure 22.6. PostScript to Intermediate Raster Format.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/6small.png" width="135" alt="PostScript to Intermediate Raster Format."></div></div></div><br class="figure-break"><p>
    754 <a class="indexterm" name="id397044"></a>
    755 <a class="indexterm" name="id397051"></a>
    756 <a class="indexterm" name="id397058"></a>
    757 <a class="indexterm" name="id397065"></a>
     754<a class="indexterm" name="id420598"></a>
     755<a class="indexterm" name="id420605"></a>
     756<a class="indexterm" name="id420612"></a>
     757<a class="indexterm" name="id420619"></a>
    758758        CUPS raster is a generic raster format with powerful features. It is able to include per-page information,
    759759        color profiles, and more, to be used by the downstream raster drivers. Its MIME type is registered with IANA
     
    762762        CUPS always takes care of the first stage of rasterization so these vendors do not need to care about
    763763        Ghostscript complications (in fact, there are currently more than one vendor financing the development of CUPS
    764         raster drivers). This is illustrated in <a href="CUPS-printing.html#cups-raster2" title="Figure 22.7. CUPS-Raster Production Using Ghostscript.">the CUPS-Raster Production Using
     764        raster drivers). This is illustrated in <a class="link" href="CUPS-printing.html#cups-raster2" title="Figure 22.7. CUPS-Raster Production Using Ghostscript.">the CUPS-Raster Production Using
    765765        Ghostscript illustration</a>.
    766766        </p><div class="figure"><a name="cups-raster2"></a><p class="title"><b>Figure 22.7. CUPS-Raster Production Using Ghostscript.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/7small.png" alt="CUPS-Raster Production Using Ghostscript."></div></div></div><br class="figure-break"><p>
    767 <a class="indexterm" name="id397129"></a>
    768 <a class="indexterm" name="id397136"></a>
    769 <a class="indexterm" name="id397143"></a>
    770 <a class="indexterm" name="id397149"></a>
     767<a class="indexterm" name="id420684"></a>
     768<a class="indexterm" name="id420691"></a>
     769<a class="indexterm" name="id420697"></a>
     770<a class="indexterm" name="id420704"></a>
    771771        CUPS versions before version 1.1.15 shipped a binary (or source code) standalone filter, named
    772772        <em class="parameter"><code>pstoraster</code></em>. <em class="parameter"><code>pstoraster</code></em>, which was derived from GNU Ghostscript
     
    779779        If your Ghostscript fails when this command is executed: <code class="literal">gs -h |grep cups</code>, you might not
    780780        be able to print, update your Ghostscript.
    781         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id397202"></a>imagetops and imagetoraster</h3></div></div></div><p>
    782 <a class="indexterm" name="id397210"></a>
    783 <a class="indexterm" name="id397217"></a>
     781        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420757"></a>imagetops and imagetoraster</h3></div></div></div><p>
     782<a class="indexterm" name="id420765"></a>
     783<a class="indexterm" name="id420772"></a>
    784784        In the section about prefilters, we mentioned the prefilter
    785785        that generates PostScript from image formats. The <em class="parameter"><code>imagetoraster</code></em>
     
    787787        intermediate PostScript stage. It is used more often than the previously
    788788        mentioned prefilters. We summarize in a flowchart the image file
    789         filtering in <a href="CUPS-printing.html#small8" title="Figure 22.8. Image Format to CUPS-Raster Format Conversion.">the Image Format to CUPS-Raster Format Conversion illustration</a>.
    790         </p><div class="figure"><a name="small8"></a><p class="title"><b>Figure 22.8. Image Format to CUPS-Raster Format Conversion.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/8small.png" alt="Image Format to CUPS-Raster Format Conversion."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id397282"></a>rasterto [printers specific]</h3></div></div></div><p>
    791 <a class="indexterm" name="id397290"></a>
    792 <a class="indexterm" name="id397297"></a>
    793 <a class="indexterm" name="id397304"></a>
    794 <a class="indexterm" name="id397310"></a>
    795 <a class="indexterm" name="id397317"></a>
    796 <a class="indexterm" name="id397324"></a>
    797 <a class="indexterm" name="id397331"></a>
    798 <a class="indexterm" name="id397338"></a>
    799 <a class="indexterm" name="id397344"></a>
    800 <a class="indexterm" name="id397351"></a>
    801 <a class="indexterm" name="id397358"></a>
     789        filtering in <a class="link" href="CUPS-printing.html#small8" title="Figure 22.8. Image Format to CUPS-Raster Format Conversion.">the Image Format to CUPS-Raster Format Conversion illustration</a>.
     790        </p><div class="figure"><a name="small8"></a><p class="title"><b>Figure 22.8. Image Format to CUPS-Raster Format Conversion.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/8small.png" alt="Image Format to CUPS-Raster Format Conversion."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id420837"></a>rasterto [printers specific]</h3></div></div></div><p>
     791<a class="indexterm" name="id420845"></a>
     792<a class="indexterm" name="id420852"></a>
     793<a class="indexterm" name="id420858"></a>
     794<a class="indexterm" name="id420865"></a>
     795<a class="indexterm" name="id420872"></a>
     796<a class="indexterm" name="id420879"></a>
     797<a class="indexterm" name="id420886"></a>
     798<a class="indexterm" name="id420892"></a>
     799<a class="indexterm" name="id420899"></a>
     800<a class="indexterm" name="id420906"></a>
     801<a class="indexterm" name="id420913"></a>
    802802        CUPS ships with quite a variety of raster drivers for processing CUPS raster. On my system, I find in
    803803        /usr/lib/cups/filter/ the following: <em class="parameter"><code>rastertoalps</code></em>, <em class="parameter"><code>rastertobj</code></em>,
     
    808808        installed by commercial add-ons to CUPS (like <em class="parameter"><code>rastertoturboprint</code></em>), and others (like
    809809        <em class="parameter"><code>rastertoprinter</code></em>) by third-party driver development projects (such as Gimp-Print)
    810         wanting to cooperate as closely as possible with CUPS. See <a href="CUPS-printing.html#small9" title="Figure 22.9. Raster to Printer-Specific Formats.">the Raster to
     810        wanting to cooperate as closely as possible with CUPS. See <a class="link" href="CUPS-printing.html#small9" title="Figure 22.9. Raster to Printer-Specific Formats.">the Raster to
    811811        Printer-Specific Formats illustration</a>.
    812         </p><div class="figure"><a name="small9"></a><p class="title"><b>Figure 22.9. Raster to Printer-Specific Formats.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/9small.png" alt="Raster to Printer-Specific Formats."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id397494"></a>CUPS Backends</h3></div></div></div><p>
    813 <a class="indexterm" name="id397502"></a>
    814 <a class="indexterm" name="id397509"></a>
     812        </p><div class="figure"><a name="small9"></a><p class="title"><b>Figure 22.9. Raster to Printer-Specific Formats.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/9small.png" alt="Raster to Printer-Specific Formats."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421049"></a>CUPS Backends</h3></div></div></div><p>
     813<a class="indexterm" name="id421057"></a>
     814<a class="indexterm" name="id421064"></a>
    815815        The last part of any CUPS filtering chain is a backend. Backends
    816816        are special programs that send the print-ready file to the final
     
    886886        printer name.)
    887887        </p><p>
    888 <a class="indexterm" name="id397760"></a>
    889 <a class="indexterm" name="id397767"></a>
     888<a class="indexterm" name="id421315"></a>
     889<a class="indexterm" name="id421322"></a>
    890890        Not all of the mentioned backends may be present on your system or
    891891        usable (depending on your hardware configuration). One test for all
     
    895895        </p><pre class="screen">
    896896        <code class="prompt">$ </code><strong class="userinput"><code>lpinfo -v</code></strong>
    897         </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id397802"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p>
    898         <a class="indexterm" name="id397814"></a>
    899         <a class="indexterm" name="id397821"></a>
    900 <a class="indexterm" name="id397828"></a>
    901 <a class="indexterm" name="id397835"></a>
    902 <a class="indexterm" name="id397842"></a>
     897        </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421357"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p>
     898        <a class="indexterm" name="id421369"></a>
     899        <a class="indexterm" name="id421376"></a>
     900<a class="indexterm" name="id421383"></a>
     901<a class="indexterm" name="id421390"></a>
     902<a class="indexterm" name="id421396"></a>
    903903        <em class="parameter"><code>cupsomatic</code></em> filters may be the most widely used on CUPS
    904904        installations. You must be clear that these were not
     
    924924        the print job.
    925925        </p><p>
    926         <a class="indexterm" name="id397899"></a>
    927 <a class="indexterm" name="id397906"></a>
    928 <a class="indexterm" name="id397912"></a>
    929 <a class="indexterm" name="id397919"></a>
    930 <a class="indexterm" name="id397926"></a>
    931 <a class="indexterm" name="id397933"></a>
    932 <a class="indexterm" name="id397940"></a>
    933 <a class="indexterm" name="id397946"></a>
    934 <a class="indexterm" name="id397953"></a>
    935 <a class="indexterm" name="id397960"></a>
    936 <a class="indexterm" name="id397967"></a>
     926        <a class="indexterm" name="id421454"></a>
     927<a class="indexterm" name="id421460"></a>
     928<a class="indexterm" name="id421467"></a>
     929<a class="indexterm" name="id421474"></a>
     930<a class="indexterm" name="id421481"></a>
     931<a class="indexterm" name="id421488"></a>
     932<a class="indexterm" name="id421494"></a>
     933<a class="indexterm" name="id421501"></a>
     934<a class="indexterm" name="id421508"></a>
     935<a class="indexterm" name="id421515"></a>
     936<a class="indexterm" name="id421522"></a>
    937937        However, <em class="parameter"><code>cupsomatic</code></em> is now deprecated. Its PPDs (especially the first
    938938        generation of them, still in heavy use out there) are not meeting the
     
    956956        legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR, and so on), providing
    957957        for them access to use PPDs for their printing.
    958         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398021"></a>The Complete Picture</h3></div></div></div><p>
     958        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421572"></a>The Complete Picture</h3></div></div></div><p>
    959959        If you want to see an overview of all the filters and how they
    960960        relate to each other, the complete picture of the puzzle is at the end
    961961        of this chapter.
    962         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398033"></a><code class="filename">mime.convs</code></h3></div></div></div><p>
     962        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421583"></a><code class="filename">mime.convs</code></h3></div></div></div><p>
    963963        CUPS autoconstructs all possible filtering chain paths for any given
    964964        MIME type and every printer installed. But how does it decide in
     
    970970        a total &#8220;<span class="quote">filter cost.</span>&#8221; CUPS decides for the most &#8220;<span class="quote">inexpensive</span>&#8221; route.
    971971        </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    972 <a class="indexterm" name="id398060"></a>
    973 <a class="indexterm" name="id398067"></a>
     972<a class="indexterm" name="id421610"></a>
     973<a class="indexterm" name="id421617"></a>
    974974        Setting <em class="parameter"><code>FilterLimit 1000</code></em> in
    975975        <code class="filename">cupsd.conf</code> will not allow more filters to
     
    979979        200 allows roughly one job at a time, while a FilterLimit of 1000 allows
    980980        approximately five jobs maximum at a time.
    981         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398094"></a>&#8220;<span class="quote">Raw</span>&#8221; Printing</h3></div></div></div><p>
    982 <a class="indexterm" name="id398104"></a>
    983 <a class="indexterm" name="id398111"></a>
    984 <a class="indexterm" name="id398117"></a>
     981        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421644"></a>&#8220;<span class="quote">Raw</span>&#8221; Printing</h3></div></div></div><p>
     982<a class="indexterm" name="id421654"></a>
     983<a class="indexterm" name="id421661"></a>
     984<a class="indexterm" name="id421668"></a>
    985985        You can tell CUPS to print (nearly) any file &#8220;<span class="quote">raw</span>&#8221;. &#8220;<span class="quote">Raw</span>&#8221; means it will not be
    986986        filtered. CUPS will send the file to the printer &#8220;<span class="quote">as is</span>&#8221; without bothering if the printer is able
     
    10001000        only send known MIME types (as defined in its own mime.types file) and
    10011001        refuse others.
    1002         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398194"></a>application/octet-stream Printing</h3></div></div></div><p>
    1003 <a class="indexterm" name="id398202"></a>
    1004 <a class="indexterm" name="id398209"></a>
     1002        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id421744"></a>application/octet-stream Printing</h3></div></div></div><p>
     1003<a class="indexterm" name="id421752"></a>
     1004<a class="indexterm" name="id421759"></a>
    10051005        Any MIME type with no rule in the <code class="filename">/etc/cups/mime.types</code> file is regarded as unknown
    10061006        or <em class="parameter"><code>application/octet-stream</code></em> and will not be
     
    10151015        these two files:
    10161016        </p><div class="itemizedlist"><ul type="disc"><li><p><code class="filename">/etc/cups/mime.convs</code></p></li><li><p><code class="filename">/etc/cups/mime.types</code></p></li></ul></div><p>
    1017 <a class="indexterm" name="id398269"></a>
     1017<a class="indexterm" name="id421820"></a>
    10181018        Both contain entries (at the end of the respective files) that must be uncommented to allow raw mode
    10191019        operation for <em class="parameter"><code>application/octet-stream</code></em>. In <code class="filename">/etc/cups/mime.types</code>
    10201020        make sure this line is present:
    1021         <a class="indexterm" name="id398290"></a>
     1021        <a class="indexterm" name="id421840"></a>
    10221022</p><pre class="programlisting">
    10231023application/octet-stream
     
    10301030application/octet-stream   application/vnd.cups-raw   0   -
    10311031</pre><p>
    1032         <a class="indexterm" name="id398322"></a>
     1032        <a class="indexterm" name="id421872"></a>
    10331033        This line tells CUPS to use the <span class="emphasis"><em>Null Filter</em></span>
    10341034        (denoted as &#8220;<span class="quote">-</span>&#8221;, doing nothing at all) on
     
    10411041        <span class="emphasis"><em>enforce</em></span> &#8220;<span class="quote">raw</span>&#8221; printing, it only <span class="emphasis"><em>allows</em></span> it.
    10421042        </p></div><p><b>Background. </b>
    1043 <a class="indexterm" name="id398386"></a>
    1044 <a class="indexterm" name="id398393"></a>
    1045 <a class="indexterm" name="id398399"></a>
    1046 <a class="indexterm" name="id398406"></a>
     1043<a class="indexterm" name="id421936"></a>
     1044<a class="indexterm" name="id421943"></a>
     1045<a class="indexterm" name="id421950"></a>
     1046<a class="indexterm" name="id421956"></a>
    10471047        That CUPS is a more security-aware printing system than traditional ones
    10481048        does not by default allow one to send deliberate (possibly binary)
     
    10561056        recognizes MIME types. The file <code class="filename">/etc/cups/mime.convs</code> decides which file
    10571057        conversion filter(s) may be applied to which MIME types.
    1058         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398455"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p>
    1059         <a class="indexterm" name="id398463"></a>
    1060 <a class="indexterm" name="id398469"></a>
    1061 <a class="indexterm" name="id398476"></a>
    1062 <a class="indexterm" name="id398483"></a>
    1063 <a class="indexterm" name="id398489"></a>
    1064 <a class="indexterm" name="id398496"></a>
     1058        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id422005"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p>
     1059        <a class="indexterm" name="id422013"></a>
     1060<a class="indexterm" name="id422020"></a>
     1061<a class="indexterm" name="id422026"></a>
     1062<a class="indexterm" name="id422033"></a>
     1063<a class="indexterm" name="id422040"></a>
     1064<a class="indexterm" name="id422046"></a>
    10651065        Originally PPDs were meant to be used for PostScript printers
    10661066        only. Here, they help to send device-specific commands and settings
     
    10751075        PPDs for a non-PostScript printer have a few lines that are unique to
    10761076        CUPS. The most important one looks similar to this:
    1077         <a class="indexterm" name="id398513"></a>
     1077        <a class="indexterm" name="id422063"></a>
    10781078</p><pre class="programlisting">
    10791079*cupsFilter: application/vnd.cups-raster  66   rastertoprinter
     
    10921092        several hundred printer models. You may not be able to control
    10931093        different paper trays, or you may get larger margins than your
    1094         specific model supports. See Table 21.1<a href="CUPS-printing.html#cups-ppds" title="Table 22.1. PPDs Shipped with CUPS">???</a> for summary information.
    1095         </p><div class="table"><a name="cups-ppds"></a><p class="title"><b>Table 22.1. PPDs Shipped with CUPS</b></p><div class="table-contents"><table summary="PPDs Shipped with CUPS" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="left">PPD file</th><th align="justify">Printer type</th></tr></thead><tbody><tr><td align="left">deskjet.ppd</td><td align="justify">older HP inkjet printers and compatible</td></tr><tr><td align="left">deskjet2.ppd</td><td align="justify">newer HP inkjet printers and compatible </td></tr><tr><td align="left">dymo.ppd</td><td align="justify">label printers </td></tr><tr><td align="left">epson9.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">epson24.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">okidata9.ppd</td><td align="justify">Okidata 9-pin impact printers and compatible </td></tr><tr><td align="left">okidat24.ppd</td><td align="justify">Okidata 24-pin impact printers and compatible </td></tr><tr><td align="left">stcolor.ppd</td><td align="justify">older Epson Stylus Color printers </td></tr><tr><td align="left">stcolor2.ppd</td><td align="justify">newer Epson Stylus Color printers </td></tr><tr><td align="left">stphoto.ppd</td><td align="justify">older Epson Stylus Photo printers </td></tr><tr><td align="left">stphoto2.ppd</td><td align="justify">newer Epson Stylus Photo printers </td></tr><tr><td align="left">laserjet.ppd</td><td align="justify">all PCL printers </td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398718"></a><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</h3></div></div></div><p>
    1096         <a class="indexterm" name="id398732"></a>
    1097         <a class="indexterm" name="id398739"></a>
     1094        specific model supports. See Table 21.1<a class="link" href="CUPS-printing.html#cups-ppds" title="Table 22.1. PPDs Shipped with CUPS">&#8220;PPDs Shipped with CUPS&#8221;</a> for summary information.
     1095        </p><div class="table"><a name="cups-ppds"></a><p class="title"><b>Table 22.1. PPDs Shipped with CUPS</b></p><div class="table-contents"><table summary="PPDs Shipped with CUPS" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="left">PPD file</th><th align="justify">Printer type</th></tr></thead><tbody><tr><td align="left">deskjet.ppd</td><td align="justify">older HP inkjet printers and compatible</td></tr><tr><td align="left">deskjet2.ppd</td><td align="justify">newer HP inkjet printers and compatible </td></tr><tr><td align="left">dymo.ppd</td><td align="justify">label printers </td></tr><tr><td align="left">epson9.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">epson24.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">okidata9.ppd</td><td align="justify">Okidata 9-pin impact printers and compatible </td></tr><tr><td align="left">okidat24.ppd</td><td align="justify">Okidata 24-pin impact printers and compatible </td></tr><tr><td align="left">stcolor.ppd</td><td align="justify">older Epson Stylus Color printers </td></tr><tr><td align="left">stcolor2.ppd</td><td align="justify">newer Epson Stylus Color printers </td></tr><tr><td align="left">stphoto.ppd</td><td align="justify">older Epson Stylus Photo printers </td></tr><tr><td align="left">stphoto2.ppd</td><td align="justify">newer Epson Stylus Photo printers </td></tr><tr><td align="left">laserjet.ppd</td><td align="justify">all PCL printers </td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id422269"></a><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</h3></div></div></div><p>
     1096        <a class="indexterm" name="id422282"></a>
     1097        <a class="indexterm" name="id422289"></a>
    10981098        Native CUPS rasterization works in two steps:
    10991099        </p><div class="itemizedlist"><ul type="disc"><li><p>
    1100 <a class="indexterm" name="id398753"></a>
     1100<a class="indexterm" name="id422303"></a>
    11011101                First is the <em class="parameter"><code>pstoraster</code></em> step. It uses the special CUPS
    1102                 <a class="indexterm" name="id398766"></a>
     1102                <a class="indexterm" name="id422316"></a>
    11031103                device from ESP Ghostscript 7.05.x as its tool.
    11041104                </p></li><li><p>
     
    11091109                </p></li></ul></div><p>
    11101110        Often this produces better quality (and has several more advantages) than other methods.
    1111         This is shown in <a href="CUPS-printing.html#cupsomatic-dia" title="Figure 22.10. cupsomatic/foomatic Processing Versus Native CUPS."> the cupsomatic/foomatic Processing Versus Native CUPS
     1111        This is shown in <a class="link" href="CUPS-printing.html#cupsomatic-dia" title="Figure 22.10. cupsomatic/foomatic Processing Versus Native CUPS."> the cupsomatic/foomatic Processing Versus Native CUPS
    11121112        illustration</a>.
    11131113        </p><div class="figure"><a name="cupsomatic-dia"></a><p class="title"><b>Figure 22.10. cupsomatic/foomatic Processing Versus Native CUPS.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/10small.png" alt="cupsomatic/foomatic Processing Versus Native CUPS."></div></div></div><br class="figure-break"><p>
     
    11151115        way. Note that <em class="parameter"><code>cupsomatic</code></em> is <span class="emphasis"><em>not</em></span> made by the CUPS
    11161116        developers. It is an independent contribution to printing development,
    1117         made by people from Linuxprinting.org.<sup>[<a name="id398861" href="#ftn.id398861">6</a>]</sup>
     1117        made by people from Linuxprinting.org.<sup>[<a name="id422411" href="#ftn.id422411" class="footnote">6</a>]</sup>
    11181118        <em class="parameter"><code>cupsomatic</code></em> is no longer developed, maintained, or supported. It now been
    11191119        replaced by <em class="parameter"><code>foomatic-rip</code></em>. <em class="parameter"><code>foomatic-rip</code></em> is a complete rewrite
     
    11231123        too.
    11241124        </p><p>
    1125         <a class="indexterm" name="id398907"></a>
    1126         <a class="indexterm" name="id398914"></a>
     1125        <a class="indexterm" name="id422457"></a>
     1126        <a class="indexterm" name="id422464"></a>
    11271127        Like the old <em class="parameter"><code>cupsomatic</code></em> method, the <em class="parameter"><code>foomatic-rip</code></em> (new) method
    11281128        from Linuxprinting.org uses the traditional Ghostscript print file processing, doing everything in a single
     
    11341134        different queues) and find out which works best for you.
    11351135        </p><p>
    1136 <a class="indexterm" name="id398944"></a>
    1137 <a class="indexterm" name="id398951"></a>
    1138 <a class="indexterm" name="id398958"></a>
    1139 <a class="indexterm" name="id398964"></a>
    1140 <a class="indexterm" name="id398971"></a>
    1141 <a class="indexterm" name="id398978"></a>
     1136<a class="indexterm" name="id422494"></a>
     1137<a class="indexterm" name="id422501"></a>
     1138<a class="indexterm" name="id422508"></a>
     1139<a class="indexterm" name="id422515"></a>
     1140<a class="indexterm" name="id422522"></a>
     1141<a class="indexterm" name="id422528"></a>
    11421142        <em class="parameter"><code>cupsomatic</code></em> kidnaps the print file after the
    11431143        <em class="parameter"><code>application/vnd.cups-postscript</code></em> stage and deviates it through the CUPS-external,
     
    11451145        filter (and also bypasses the CUPS raster drivers <em class="parameter"><code>rastertosomething</code></em>). After Ghostscript
    11461146        finished its rasterization, <em class="parameter"><code>cupsomatic</code></em> hands the rendered file directly to the CUPS
    1147         backend. <a href="CUPS-printing.html#cupsomatic-dia" title="Figure 22.10. cupsomatic/foomatic Processing Versus Native CUPS.">cupsomatic/foomatic Processing Versus Native
     1147        backend. <a class="link" href="CUPS-printing.html#cupsomatic-dia" title="Figure 22.10. cupsomatic/foomatic Processing Versus Native CUPS.">cupsomatic/foomatic Processing Versus Native
    11481148        CUPS</a>, illustrates the difference between native CUPS rendering and the
    11491149        <em class="parameter"><code>Foomatic/cupsomatic</code></em> method.
    1150         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399033"></a>Examples for Filtering Chains</h3></div></div></div><p>
     1150        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id422583"></a>Examples for Filtering Chains</h3></div></div></div><p>
    11511151        Here are a few examples of commonly occurring filtering chains to
    11521152        illustrate the workings of CUPS.
    11531153        </p><p>
    1154 <a class="indexterm" name="id399045"></a>
    1155 <a class="indexterm" name="id399052"></a>
    1156 <a class="indexterm" name="id399058"></a>
    1157 <a class="indexterm" name="id399065"></a>
     1154<a class="indexterm" name="id422595"></a>
     1155<a class="indexterm" name="id422602"></a>
     1156<a class="indexterm" name="id422609"></a>
     1157<a class="indexterm" name="id422615"></a>
    11581158        Assume you want to print a PDF file to an HP JetDirect-connected
    11591159        PostScript printer, but you want to print pages 3-5, 7, and 11-13
     
    11721172        <em class="parameter"><code>application/vnd.cups-postscript</code></em>.</p></li><li><p>The file goes to the <em class="parameter"><code>socket</code></em>
    11731173        backend, which transfers the job to the printers.</p></li></ul></div><p>
    1174         The resulting filter chain, therefore, is as shown in <a href="CUPS-printing.html#pdftosocket" title="Figure 22.11. PDF to Socket Chain.">the PDF to socket chain
     1174        The resulting filter chain, therefore, is as shown in <a class="link" href="CUPS-printing.html#pdftosocket" title="Figure 22.11. PDF to Socket Chain.">the PDF to socket chain
    11751175        illustration</a>.
    1176         </p><a class="indexterm" name="id399167"></a><div class="figure"><a name="pdftosocket"></a><p class="title"><b>Figure 22.11. PDF to Socket Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftosocket.png" alt="PDF to Socket Chain."></div></div></div><br class="figure-break"><p>
    1177 <a class="indexterm" name="id399215"></a>
    1178 <a class="indexterm" name="id399222"></a>
    1179 <a class="indexterm" name="id399229"></a>
     1176        </p><a class="indexterm" name="id422717"></a><div class="figure"><a name="pdftosocket"></a><p class="title"><b>Figure 22.11. PDF to Socket Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftosocket.png" alt="PDF to Socket Chain."></div></div></div><br class="figure-break"><p>
     1177<a class="indexterm" name="id422765"></a>
     1178<a class="indexterm" name="id422772"></a>
     1179<a class="indexterm" name="id422779"></a>
    11801180        Assume you want to print the same filter to an USB-connected Epson Stylus Photo Printer installed with the CUPS
    11811181        <code class="filename">stphoto2.ppd</code>. The first few filtering stages are nearly the same:
     
    11871187                <em class="parameter"><code>application/pdf</code></em>.
    11881188                </p></li><li><p>
    1189 <a class="indexterm" name="id399266"></a>
    1190 <a class="indexterm" name="id399272"></a>
     1189<a class="indexterm" name="id422816"></a>
     1190<a class="indexterm" name="id422823"></a>
    11911191                The file must first pass the <em class="parameter"><code>pdftops</code></em> prefilter, which produces PostScript
    11921192                MIME type <em class="parameter"><code>application/postscript</code></em> (a preview here would still show all
    11931193                pages of the original PDF).
    11941194                </p></li><li><p>
    1195 <a class="indexterm" name="id399296"></a>
    1196 <a class="indexterm" name="id399303"></a>
     1195<a class="indexterm" name="id422846"></a>
     1196<a class="indexterm" name="id422853"></a>
    11971197                The file then passes the &#8220;<span class="quote">pstops</span>&#8221; filter that applies
    11981198                the command-line options: it selects the pages 2-5, 7, and 11-13,
     
    12061206                <em class="parameter"><code>application/cups-raster</code></em>.
    12071207                </p></li><li><p>
    1208 <a class="indexterm" name="id399354"></a>
     1208<a class="indexterm" name="id422904"></a>
    12091209                Finally, the <em class="parameter"><code>rastertoepson</code></em> filter
    12101210                does its work (as indicated in the printer's PPD), creating the
     
    12141214                The file goes to the <em class="parameter"><code>usb</code></em> backend, which transfers the job to the printers.
    12151215                </p></li></ul></div><p>
    1216         The resulting filter chain therefore is as shown in <a href="CUPS-printing.html#pdftoepsonusb" title="Figure 22.12. PDF to USB Chain.">the PDF to USB Chain
     1216        The resulting filter chain therefore is as shown in <a class="link" href="CUPS-printing.html#pdftoepsonusb" title="Figure 22.12. PDF to USB Chain.">the PDF to USB Chain
    12171217        illustration</a>.
    1218         </p><div class="figure"><a name="pdftoepsonusb"></a><p class="title"><b>Figure 22.12. PDF to USB Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftoepsonusb.png" alt="PDF to USB Chain."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399434"></a>Sources of CUPS Drivers/PPDs</h3></div></div></div><p>
     1218        </p><div class="figure"><a name="pdftoepsonusb"></a><p class="title"><b>Figure 22.12. PDF to USB Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftoepsonusb.png" alt="PDF to USB Chain."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id422984"></a>Sources of CUPS Drivers/PPDs</h3></div></div></div><p>
    12191219        On the Internet you can now find many thousands of CUPS-PPD files
    12201220        (with their companion filters), in many national languages
    12211221        supporting more than 1,000 non-PostScript models.
    1222         </p><div class="itemizedlist"><a class="indexterm" name="id399447"></a><a class="indexterm" name="id399456"></a><ul type="disc"><li><p>
    1223                 <a href="http://www.easysw.com/printpro/" target="_top">ESP PrintPro</a>
     1222        </p><div class="itemizedlist"><a class="indexterm" name="id422997"></a><a class="indexterm" name="id423006"></a><ul type="disc"><li><p>
     1223                <a class="ulink" href="http://www.easysw.com/printpro/" target="_top">ESP PrintPro</a>
    12241224                (commercial, non-free) is packaged with more than 3,000 PPDs, ready for
    12251225                successful use &#8220;<span class="quote">out of the box</span>&#8221; on Linux, Mac OS X, IBM-AIX,
     
    12291229                CUPS, as they feed their creators).
    12301230                </p></li><li><p>
    1231                 The <a href="http://gimp-print.sourceforge.net/" target="_top">Gimp-Print Project</a>
     1231                The <a class="ulink" href="http://gimp-print.sourceforge.net/" target="_top">Gimp-Print Project</a>
    12321232                (GPL, free software) provides around 140 PPDs (supporting nearly 400 printers, many driven
    12331233                to photo quality output), to be used alongside the Gimp-Print CUPS filters.
    12341234                </p></li><li><p>
    1235                 <a href="http://www.turboprint.de/english.html/" target="_top">TurboPrint </a> (shareware, non-free) supports
     1235                <a class="ulink" href="http://www.turboprint.de/english.html/" target="_top">TurboPrint </a> (shareware, non-free) supports
    12361236                roughly the same number of printers in excellent quality.
    12371237                </p></li><li><p>
    1238                 <a href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">OMNI </a>
     1238                <a class="ulink" href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">OMNI </a>
    12391239                (LPGL, free) is a package made by IBM, now containing support for more
    12401240                than 400 printers, stemming from the inheritance of IBM OS/2 know-how
    12411241                ported over to Linux (CUPS support is in a beta stage at present).
    12421242                </p></li><li><p>
    1243                 <a href="http://hpinkjet.sourceforge.net/" target="_top">HPIJS </a> (BSD-style licenses, free)
     1243                <a class="ulink" href="http://hpinkjet.sourceforge.net/" target="_top">HPIJS </a> (BSD-style licenses, free)
    12441244                supports approximately 150 of HP's own printers and also provides
    12451245                excellent print quality now (currently available only via the Foomatic path).
    12461246                </p></li><li><p>
    1247                 <a href="http://www.linuxprinting.org/" target="_top">Foomatic/cupsomatic </a>
     1247                <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Foomatic/cupsomatic </a>
    12481248                (LPGL, free) from Linuxprinting.org provide PPDs for practically every Ghostscript
    12491249                filter known to the world (including Omni, Gimp-Print, and HPIJS).
    1250                 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399543"></a>Printing with Interface Scripts</h3></div></div></div><p>
    1251 <a class="indexterm" name="id399551"></a>
    1252 <a class="indexterm" name="id399557"></a>
     1250                </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423093"></a>Printing with Interface Scripts</h3></div></div></div><p>
     1251<a class="indexterm" name="id423101"></a>
     1252<a class="indexterm" name="id423108"></a>
    12531253        CUPS also supports the use of &#8220;<span class="quote">interface scripts</span>&#8221; as known from
    12541254        System V AT&amp;T printing systems. These are often used for PCL
     
    12701270        script or program into one specific print queue (some information about the traditional
    12711271        use of interface scripts is found at
    1272         <a href="http://playground.sun.com/printing/documentation/interface.html" target="_top">
     1272        <a class="ulink" href="http://playground.sun.com/printing/documentation/interface.html" target="_top">
    12731273        http://playground.sun.com/printing/documentation/interface.html</a>).
    1274         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id399622"></a>Network Printing (Purely Windows)</h2></div></div></div><p>
     1274        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id423172"></a>Network Printing (Purely Windows)</h2></div></div></div><p>
    12751275Network printing covers a lot of ground. To understand what exactly
    12761276goes on with Samba when it is printing on behalf of its Windows
    12771277clients, let's first look at a &#8220;<span class="quote">purely Windows</span>&#8221; setup: Windows clients
    12781278with a Windows NT print server.
    1279 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399636"></a>From Windows Clients to an NT Print Server</h3></div></div></div><p>
     1279</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423186"></a>From Windows Clients to an NT Print Server</h3></div></div></div><p>
    12801280Windows clients printing to an NT-based print server have two
    12811281options. They may:
    1282 <a class="indexterm" name="id399645"></a>
    1283 <a class="indexterm" name="id399652"></a>
     1282<a class="indexterm" name="id423195"></a>
     1283<a class="indexterm" name="id423202"></a>
    12841284</p><div class="itemizedlist"><ul type="disc"><li><p>Execute the driver locally and render the GDI output
    12851285                        (EMF) into the printer-specific format on their own.
     
    12871287        driver is executed to render the printer-specific output.
    12881288        </p></li></ul></div><p>
    1289 Both print paths are shown in the flowcharts in <a href="CUPS-printing.html#small11" title="Figure 22.13. Print Driver Execution on the Client.">
     1289Both print paths are shown in the flowcharts in <a class="link" href="CUPS-printing.html#small11" title="Figure 22.13. Print Driver Execution on the Client.">
    12901290Print Driver Execution on the Client</a>, and
    1291 <a href="CUPS-printing.html#small12" title="Figure 22.14. Print Driver Execution on the Server.">Print Driver Execution on the Server</a>.
    1292 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399694"></a>Driver Execution on the Client</h3></div></div></div><p>
     1291<a class="link" href="CUPS-printing.html#small12" title="Figure 22.14. Print Driver Execution on the Server.">Print Driver Execution on the Server</a>.
     1292</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423245"></a>Driver Execution on the Client</h3></div></div></div><p>
    12931293In the first case, the print server must spool the file as raw, meaning it shouldn't touch the job file and try
    12941294to convert it in any way. This is what a traditional UNIX-based print server can do too, and at a better
     
    12961296familiar with. One advantage of this setup is that this &#8220;<span class="quote">spooling-only</span>&#8221; print server may be used
    12971297even if no driver(s) for UNIX is available. It is sufficient to have the Windows client drivers available and
    1298 installed on the clients. This is illustrated in <a href="CUPS-printing.html#small11" title="Figure 22.13. Print Driver Execution on the Client.">the Print Driver Execution on the
     1298installed on the clients. This is illustrated in <a class="link" href="CUPS-printing.html#small11" title="Figure 22.13. Print Driver Execution on the Client.">the Print Driver Execution on the
    12991299Client diagram</a>.
    1300 </p><div class="figure"><a name="small11"></a><p class="title"><b>Figure 22.13. Print Driver Execution on the Client.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/11small.png" alt="Print Driver Execution on the Client."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399759"></a>Driver Execution on the Server</h3></div></div></div><p>
    1301 <a class="indexterm" name="id399767"></a>
    1302 <a class="indexterm" name="id399774"></a>
    1303 <a class="indexterm" name="id399780"></a>
    1304 <a class="indexterm" name="id399787"></a>
    1305 <a class="indexterm" name="id399794"></a>
     1300</p><div class="figure"><a name="small11"></a><p class="title"><b>Figure 22.13. Print Driver Execution on the Client.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/11small.png" alt="Print Driver Execution on the Client."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423310"></a>Driver Execution on the Server</h3></div></div></div><p>
     1301<a class="indexterm" name="id423318"></a>
     1302<a class="indexterm" name="id423325"></a>
     1303<a class="indexterm" name="id423331"></a>
     1304<a class="indexterm" name="id423338"></a>
     1305<a class="indexterm" name="id423344"></a>
    13061306The other path executes the printer driver on the server. The client transfers print files in EMF format to
    13071307the server. The server uses the PostScript, PCL, ESC/P, or other driver to convert the EMF file into the
    13081308printer-specific language. It is not possible for UNIX to do the same. Currently, there is no program or
    13091309method to convert a Windows client's GDI output on a UNIX server into something a printer could understand.
    1310 This is illustrated in <a href="CUPS-printing.html#small12" title="Figure 22.14. Print Driver Execution on the Server.">the Print Driver Execution on the Server diagram</a>.
     1310This is illustrated in <a class="link" href="CUPS-printing.html#small12" title="Figure 22.14. Print Driver Execution on the Server.">the Print Driver Execution on the Server diagram</a>.
    13111311</p><div class="figure"><a name="small12"></a><p class="title"><b>Figure 22.14. Print Driver Execution on the Server.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/12small.png" alt="Print Driver Execution on the Server."></div></div></div><br class="figure-break"><p>
    13121312However, something similar is possible with CUPS, so read on.
    1313 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id399858"></a>Network Printing (Windows Clients and UNIX/Samba Print
     1313</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id423409"></a>Network Printing (Windows Clients and UNIX/Samba Print
    13141314Servers)</h2></div></div></div><p>
    13151315Since UNIX print servers <span class="emphasis"><em>cannot</em></span> execute the Win32
     
    13181318much. On the contrary, you may have a way here to implement printing
    13191319features that are not possible otherwise.
    1320 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399874"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div></div><p>
     1320</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423425"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div></div><p>
    13211321Here is a simple recipe showing how you can take advantage of CUPS's
    13221322powerful features for the benefit of your Windows network printing
     
    13301330First, to enable CUPS-based printing through Samba, the following options should be set in your <code class="filename">smb.conf</code>
    13311331file <em class="parameter"><code>[global]</code></em> section:
    1332 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id399924"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id399936"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p>
    1333 When these parameters are specified, all manually set print directives (like <a class="indexterm" name="id399952"></a>print command or <a class="indexterm" name="id399959"></a>lppause command) in <code class="filename">smb.conf</code> (as well as in Samba itself) will be
     1332</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id423474"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id423486"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p>
     1333When these parameters are specified, all manually set print directives (like <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a> or <a class="link" href="smb.conf.5.html#LPPAUSECOMMAND">lppause command</a>) in <code class="filename">smb.conf</code> (as well as in Samba itself) will be
    13341334ignored. Instead, Samba will directly interface with CUPS through its application program interface (API), as
    13351335long as Samba has been compiled with CUPS library (libcups) support. If Samba has not been compiled with CUPS
    13361336support, and if no other print commands are set up, then printing will use the <span class="emphasis"><em>System V</em></span>
    13371337AT&amp;T command set, with the -oraw option automatically passing through (if you want your own defined print
    1338 commands to work with a Samba server that has CUPS support compiled in, simply use <a class="indexterm" name="id399981"></a>classicalprinting = sysv). This is illustrated in <a href="CUPS-printing.html#13small" title="Figure 22.15. Printing via CUPS/Samba Server.">the Printing via
     1338commands to work with a Samba server that has CUPS support compiled in, simply use <a class="link" href="smb.conf.5.html#CLASSICALPRINTING">classicalprinting = sysv</a>). This is illustrated in <a class="link" href="CUPS-printing.html#13small" title="Figure 22.15. Printing via CUPS/Samba Server.">the Printing via
    13391339CUPS/Samba Server diagram</a>.
    1340 </p><div class="figure"><a name="13small"></a><p class="title"><b>Figure 22.15. Printing via CUPS/Samba Server.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/13small.png" alt="Printing via CUPS/Samba Server."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400039"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p>
    1341 Samba <span class="emphasis"><em>must</em></span> use its own spool directory (it is set by a line similar to <a class="indexterm" name="id400052"></a>path = /var/spool/samba, in the <em class="parameter"><code>[printers]</code></em> or <em class="parameter"><code>[printername]</code></em> section of <code class="filename">smb.conf</code>). Samba receives the job in its own spool space and passes it
     1340</p><div class="figure"><a name="13small"></a><p class="title"><b>Figure 22.15. Printing via CUPS/Samba Server.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/13small.png" alt="Printing via CUPS/Samba Server."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423600"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p>
     1341Samba <span class="emphasis"><em>must</em></span> use its own spool directory (it is set by a line similar to <a class="link" href="smb.conf.5.html#PATH">path = /var/spool/samba</a>, in the <em class="parameter"><code>[printers]</code></em> or <em class="parameter"><code>[printername]</code></em> section of <code class="filename">smb.conf</code>). Samba receives the job in its own spool space and passes it
    13421342into the spool directory of CUPS (the CUPS spool directory is set by the <em class="parameter"><code>RequestRoot</code></em>
    13431343directive in a line that defaults to <em class="parameter"><code>RequestRoot /var/spool/cups</code></em>). CUPS checks the
     
    13501350allow &#8220;<span class="quote">localhost</span>&#8221; to print. If it runs on different machines, you
    13511351need to make sure the Samba host gets access to printing on CUPS.
    1352 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id400108"></a>Network PostScript RIP</h2></div></div></div><p>
     1352</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id423671"></a>Network PostScript RIP</h2></div></div></div><p>
    13531353This section discusses the use of CUPS filters on the server  configuration where
    13541354clients make use of a PostScript driver with CUPS-PPDs.
    13551355</p><p>
    1356 <a class="indexterm" name="id400122"></a>
    1357 <a class="indexterm" name="id400129"></a>
    1358 <a class="indexterm" name="id400136"></a>
     1356<a class="indexterm" name="id423686"></a>
     1357<a class="indexterm" name="id423693"></a>
     1358<a class="indexterm" name="id423699"></a>
    13591359PPDs can control all print device options. They are usually provided by the manufacturer  if you own
    13601360a PostScript printer, that is. PPD files are always a component of PostScript printer drivers on MS Windows or
     
    13641364</p><p>
    13651365CUPS can load, without any conversions, the PPD file from any Windows (NT is recommended) PostScript driver
    1366 and handle the options. There is a Web browser interface to the print options (select <a href="http://localhost:631/printers/" target="_top">http://localhost:631/printers/</a> and click on one
     1366and handle the options. There is a Web browser interface to the print options (select <a class="ulink" href="http://localhost:631/printers/" target="_top">http://localhost:631/printers/</a> and click on one
    13671367<span class="guibutton">Configure Printer</span> button to see it) or a command-line interface (see <code class="literal">man
    13681368lpoptions</code> or see if you have <code class="literal">lphelp</code> on your system). There are also some
    13691369different GUI front-ends on Linux/UNIX, which can present PPD options to users. PPD options are normally meant
    13701370to be evaluated by the PostScript RIP on the real PostScript printer.
    1371 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400187"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p>
    1372 <a class="indexterm" name="id400195"></a>
     1371</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423751"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p>
     1372<a class="indexterm" name="id423758"></a>
    13731373CUPS does not limit itself to &#8220;<span class="quote">real</span>&#8221; PostScript printers in its use of PPDs. The CUPS developers
    13741374have extended the scope of the PPD concept to also describe available device and driver options for
     
    13821382devices to its clients, because it can act as a PostScript RIP for those printers, processing the received
    13831383PostScript code into a proper raster print format.
    1384 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400224"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p>
    1385 <a class="indexterm" name="id400232"></a>
     1384</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423788"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p>
     1385<a class="indexterm" name="id423795"></a>
    13861386CUPS-PPDs can also be used on Windows clients, on top of a &#8220;<span class="quote">core</span>&#8221; PostScript driver (now
    13871387recommended is the CUPS PostScript Driver for Windows NT/200x/XP; you can also use the Adobe one, with
     
    13971397        </p></li></ul></div><p>
    13981398Using CUPS PPDs on Windows clients enables them to control all print job settings just as a UNIX client can do.
    1399 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id400285"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div></div><p>
     1399</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id423848"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div></div><p>
    14001400This setup may be of special interest to people experiencing major problems in WTS environments. WTS often
    14011401need a multitude of non-PostScript drivers installed to run their clients' variety of different printer
    14021402models. This often imposes the price of much increased instability.
    1403 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400296"></a>Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
     1403</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423860"></a>Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
    14041404Problems</h3></div></div></div><p>
    14051405Windows NT printer drivers, which run in &#8220;<span class="quote">kernel mode</span>&#8221;, introduce a high risk for the stability
     
    14131413one from Adobe and the one from Microsoft. Both are well-tested and are as stable as you can imagine on
    14141414Windows. The CUPS driver is derived from the Microsoft one.
    1415 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400328"></a>Workarounds Impose Heavy Limitations</h3></div></div></div><p>
     1415</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423891"></a>Workarounds Impose Heavy Limitations</h3></div></div></div><p>
    14161416In an attempt to work around problems, site administrators have resorted to restricting the
    14171417allowed drivers installed on their WTS to one generic PCL and one PostScript driver. This, however, restricts
    14181418the number of printer options available for clients to use. Often they can't get out more than simplex
    14191419prints from one standard paper tray, while their devices could do much better if driven by a different driver!
    1420 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400341"></a>CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</h3></div></div></div><p>
    1421 <a class="indexterm" name="id400352"></a>
    1422 <a class="indexterm" name="id400359"></a>
     1420</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423905"></a>CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</h3></div></div></div><p>
     1421<a class="indexterm" name="id423916"></a>
     1422<a class="indexterm" name="id423923"></a>
    14231423Using a PostScript driver, enabled with a CUPS-PPD, seems to be a very elegant way to overcome all these
    14241424shortcomings. There are, depending on the version of Windows OS you use, up to three different PostScript
     
    14291429&#8220;<span class="quote">raw spooling</span>&#8221; device. Plus, this setup is not yet widely tested, although the first feedbacks
    14301430look very promising.
    1431 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400378"></a>PostScript Drivers with No Major Problems, Even in Kernel
     1431</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id423941"></a>PostScript Drivers with No Major Problems, Even in Kernel
    14321432Mode</h3></div></div></div><p>
    1433 <a class="indexterm" name="id400386"></a>
    1434 <a class="indexterm" name="id400393"></a>
    1435 <a class="indexterm" name="id400400"></a>
    1436 <a class="indexterm" name="id400406"></a>
    1437 <a class="indexterm" name="id400413"></a>
    1438 <a class="indexterm" name="id400420"></a>
     1433<a class="indexterm" name="id423950"></a>
     1434<a class="indexterm" name="id423956"></a>
     1435<a class="indexterm" name="id423963"></a>
     1436<a class="indexterm" name="id423970"></a>
     1437<a class="indexterm" name="id423977"></a>
     1438<a class="indexterm" name="id423984"></a>
    14391439More recent printer drivers on W200x and XP no longer run in kernel mode (unlike Windows NT). However, both
    14401440operating systems can still use the NT drivers, running in kernel mode (you can roughly tell which is which as
     
    14481448the GPL, and if you are the owner of an &#8220;<span class="quote">MS DDK for Windows NT,</span>&#8221; you can check the driver
    14491449yourself.
    1450 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id400456"></a>Configuring CUPS for Driver Download</h2></div></div></div><p>
     1450</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id424020"></a>Configuring CUPS for Driver Download</h2></div></div></div><p>
    14511451As we have said before, all previously known methods to prepare client printer drivers on the Samba server for
    14521452download and Point'n'Print convenience of Windows workstations are working with CUPS, too. These methods were
    1453 described in <a href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>. In reality, this is a pure Samba
     1453described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>. In reality, this is a pure Samba
    14541454business and relates only to the Samba-Windows client relationship.
    1455 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400475"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p>
    1456 <a class="indexterm" name="id400485"></a>
     1455</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424038"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p>
     1456<a class="indexterm" name="id424048"></a>
    14571457The <em class="parameter"><code>cupsaddsmb</code></em> utility (shipped with all current CUPS versions) is an alternative
    14581458method to transfer printer drivers into the Samba <em class="parameter"><code>[print$]</code></em> share. Remember, this
     
    14711471CUPS drivers. You will also need to get the respective part of the Adobe driver
    14721472if you need to support Windows 95, 98, and Me clients.
    1473 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400563"></a>Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></h3></div></div></div><p>
     1473</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424126"></a>Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></h3></div></div></div><p>
    14741474Prior to running <code class="literal">cupsaddsmb</code>, you need the settings in
    1475 <code class="filename">smb.conf</code> as shown in <a href="CUPS-printing.html#cupsadd-ex" title="Example 22.3. smb.conf for cupsaddsmb Usage">the <code class="filename">smb.conf</code> for cupsaddsmb Usage</a>.
    1476 </p><div class="example"><a name="cupsadd-ex"></a><p class="title"><b>Example 22.3. smb.conf for cupsaddsmb Usage</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id400631"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id400644"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id400656"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id400678"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id400690"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id400703"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id400715"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><a class="indexterm" name="id400731"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id400744"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id400756"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id400769"></a><em class="parameter"><code>printer admin = root</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[print$]</code></em></td></tr><tr><td><a class="indexterm" name="id400790"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id400803"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id400816"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id400828"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id400841"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id400853"></a><em class="parameter"><code>write list = root</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400868"></a>CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</h3></div></div></div><p>
    1477 <a class="indexterm" name="id400878"></a>
    1478 CUPS users may get the exact same package from <a href="http://www.cups.org/software.html" target="_top">http://www.cups.org/software.html</a>.  It is a separate package
     1475<code class="filename">smb.conf</code> as shown in <a class="link" href="CUPS-printing.html#cupsadd-ex" title="Example 22.3. smb.conf for cupsaddsmb Usage">the <code class="filename">smb.conf</code> for cupsaddsmb Usage</a>.
     1476</p><div class="example"><a name="cupsadd-ex"></a><p class="title"><b>Example 22.3. smb.conf for cupsaddsmb Usage</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id424195"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424206"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id424218"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id424238"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id424250"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id424261"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id424272"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><a class="indexterm" name="id424288"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424299"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id424310"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424322"></a><em class="parameter"><code>printer admin = root</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[print$]</code></em></td></tr><tr><td><a class="indexterm" name="id424342"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id424354"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id424366"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424377"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id424388"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424400"></a><em class="parameter"><code>write list = root</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424414"></a>CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</h3></div></div></div><p>
     1477<a class="indexterm" name="id424424"></a>
     1478CUPS users may get the exact same package from <a class="ulink" href="http://www.cups.org/software.html" target="_top">http://www.cups.org/software.html</a>.  It is a separate package
    14791479from the CUPS-based software files, tagged as CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba (tar.gz,
    14801480192k). The filename to download is <code class="filename">cups-samba-1.1.x.tar.gz</code>. Upon untar and unzipping, it
     
    14881488cups-samba.ss
    14891489</pre><p>
    1490 <a class="indexterm" name="id400921"></a>
    1491 <a class="indexterm" name="id400930"></a>
     1490<a class="indexterm" name="id424466"></a>
     1491<a class="indexterm" name="id424475"></a>
    14921492These have been packaged with the ESP meta-packager software EPM. The <code class="filename">*.install</code> and
    14931493<code class="filename">*.remove</code> files are simple shell scripts, which untar the <code class="filename">*.ss</code> (the
     
    15211521the correct place.
    15221522</p></div><p>
    1523 <a class="indexterm" name="id401073"></a>
     1523<a class="indexterm" name="id424618"></a>
    15241524This new CUPS PostScript driver is currently binary only, but free of charge. No complete source code is
    15251525provided (yet). The reason is that it has been developed with the help of the Microsoft DDK and compiled with
     
    15271527free software. However, CUPS developers released the &#8220;<span class="quote">diff</span>&#8221; in source code under the GPL, so
    15281528anybody with a license for Visual Studio and a DDK will be able to compile for himself or herself.
    1529 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401090"></a>Recognizing Different Driver Files</h3></div></div></div><p>
     1529</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424635"></a>Recognizing Different Driver Files</h3></div></div></div><p>
    15301530The CUPS drivers do not support the older Windows 95/98/Me, but only the Windows NT/2000/XP client.
    15311531</p><p>Windows NT, 2000, and XP are supported by:</p><div class="itemizedlist"><ul type="disc"><li><p>cups.hlp</p></li><li><p>cupsdrvr.dll</p></li><li><p>cupsui.dll</p></li></ul></div><p>
     
    15341534different platforms.
    15351535</p><p>Windows 95, 98, and ME are supported by:</p><div class="itemizedlist"><ul type="disc"><li><p>ADFONTS.MFM</p></li><li><p>ADOBEPS4.DRV</p></li><li><p>ADOBEPS4.HLP</p></li><li><p>DEFPRTR2.PPD</p></li><li><p>ICONLIB.DLL</p></li><li><p>PSMON.DLL</p></li></ul></div><p>Windows NT, 2000, and XP are supported by:</p><div class="itemizedlist"><ul type="disc"><li><p>ADOBEPS5.DLL</p></li><li><p>ADOBEPSU.DLL</p></li><li><p>ADOBEPSU.HLP</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    1536 <a class="indexterm" name="id401182"></a>
     1536<a class="indexterm" name="id424728"></a>
    15371537If both the Adobe driver files and the CUPS driver files for the support of Windows NT/200x/XP are presently
    15381538installed on the server, the Adobe files will be ignored and the CUPS files will be used. If you prefer
    15391539 for whatever reason  to use Adobe-only drivers, move away the three CUPS driver files.
    15401540The Windows 9x/Me clients use the Adobe drivers in any case.
    1541 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401201"></a>Acquiring the Adobe Driver Files</h3></div></div></div><p>
     1541</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424746"></a>Acquiring the Adobe Driver Files</h3></div></div></div><p>
    15421542Acquiring the Adobe driver files seems to be unexpectedly difficult for many users. They are not available on
    15431543the Adobe Web site as single files, and the self-extracting and/or self-installing Windows-.exe is not easy to
     
    15451545client once. This will install the drivers (and one generic PostScript printer) locally on the client. When
    15461546they are installed, share the generic PostScript printer. After this, the client's <em class="parameter"><code>[print$]</code></em> share holds the Adobe files, which you can get with smbclient from the CUPS host.
    1547 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401221"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p>
    1548 <a class="indexterm" name="id401229"></a>
     1547</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424766"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p>
     1548<a class="indexterm" name="id424774"></a>
    15491549Users of the ESP Print Pro software are able to install the ESP print drivers package as an alternative to the
    15501550Adobe PostScript drivers.  To do so, retrieve the driver files from the normal download area of the ESP Print
    1551 Pro software at <a href="http://www.easysw.com/software.html" target="_top">Easy Software</a> web site.
     1551Pro software at <a class="ulink" href="http://www.easysw.com/software.html" target="_top">Easy Software</a> web site.
    15521552You need to locate the link labeled &#8220;<span class="quote">SAMBA</span>&#8221; among the <span class="guilabel">Download Printer Drivers for ESP
    15531553Print Pro 4.x</span> area and download the package. Once installed, you can prepare any driver by simply
     
    15561556the <em class="parameter"><code>[print$]</code></em> share, and so on. The ESP Print Pro package includes the CUPS driver
    15571557files as well as a (licensed) set of Adobe drivers for the Windows 95/98/Me client family.
    1558 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401275"></a>Caveats to Be Considered</h3></div></div></div><p>
    1559 <a class="indexterm" name="id401283"></a>
    1560 <a class="indexterm" name="id401290"></a>
    1561 <a class="indexterm" name="id401297"></a>
    1562 <a class="indexterm" name="id401304"></a>
     1558</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424821"></a>Caveats to Be Considered</h3></div></div></div><p>
     1559<a class="indexterm" name="id424829"></a>
     1560<a class="indexterm" name="id424835"></a>
     1561<a class="indexterm" name="id424842"></a>
     1562<a class="indexterm" name="id424849"></a>
    15631563Once you have run the install script (and possibly manually moved the <code class="filename">cups.hlp</code> file to
    15641564<code class="filename">/usr/share/cups/drivers/</code>), the driver is ready to be put into Samba's <em class="parameter"><code>[print$]</code></em> share (which often maps to <code class="filename">/etc/samba/drivers/</code> and contains a
     
    156715671.1.16).
    15681568</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    1569 <a class="indexterm" name="id401360"></a>
    1570 <a class="indexterm" name="id401366"></a>
     1569<a class="indexterm" name="id424905"></a>
     1570<a class="indexterm" name="id424912"></a>
    15711571You may need to put root into the smbpasswd file by running <code class="literal">smbpasswd</code>; this is especially
    15721572important if you should run this whole procedure for the first time and are not working in an environment
     
    158315831.1.16) will automatically prefer its own drivers if it finds both.
    15841584</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    1585 <a class="indexterm" name="id401436"></a>
    1586 <a class="indexterm" name="id401443"></a>
     1585<a class="indexterm" name="id424981"></a>
     1586<a class="indexterm" name="id424988"></a>
    15871587Should your Windows clients have had the old <code class="filename">ADOBE*.*</code> files for the Adobe PostScript
    15881588driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/200x/XP will
     
    15981598privileges to do this.
    15991599</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    1600 <a class="indexterm" name="id401510"></a>
    1601 <a class="indexterm" name="id401519"></a>
     1600<a class="indexterm" name="id425055"></a>
     1601<a class="indexterm" name="id425064"></a>
    16021602Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all
    1603 printers to this one by proceeding as described in <a href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing
     1603printers to this one by proceeding as described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing
    16041604Support</a>. Either change a driver for an existing printer by running the <span class="guilabel">Printer
    16051605Properties</span> dialog, or use <code class="literal">rpcclient</code> with the <code class="literal">setdriver</code>
    16061606subcommand.
    1607 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401555"></a>Windows CUPS PostScript Driver Versus Adobe Driver</h3></div></div></div><p>
     1607</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425100"></a>Windows CUPS PostScript Driver Versus Adobe Driver</h3></div></div></div><p>
    16081608Are you interested in a comparison between the CUPS and the Adobe PostScript drivers? For our purposes, these
    16091609are the most important items that weigh in favor of CUPS:
    16101610</p><div class="itemizedlist"><ul type="disc"><li><p>No hassle with the Adobe EULA.</p></li><li><p>No hassle with the question, &#8220;<span class="quote">Where do I
    16111611        get the ADOBE*.* driver files?</span>&#8221;</p></li><li><p>
    1612         <a class="indexterm" name="id401583"></a>
     1612        <a class="indexterm" name="id425128"></a>
    16131613        The Adobe drivers (on request of the printer PPD associated with them) often put a PJL header in front of the
    16141614        main PostScript part of the print file. Thus, the print file starts with <em class="parameter"><code>&lt;1B
     
    16161616        <em class="parameter"><code>%!PS</code></em>. This leads to the CUPS daemon autotyping the incoming file as a print-ready file,
    16171617        not initiating a pass through the <em class="parameter"><code>pstops</code></em> filter (to speak more technically, it is not
    1618         regarded as the generic MIME-type <a class="indexterm" name="id401617"></a>
     1618        regarded as the generic MIME-type <a class="indexterm" name="id425162"></a>
    16191619        <em class="parameter"><code>application/postscript</code></em>, but as the more special MIME type
    1620         <a class="indexterm" name="id401630"></a>
     1620        <a class="indexterm" name="id425175"></a>
    16211621        <em class="parameter"><code>application/cups.vnd-postscript</code></em>), which therefore also leads to the page accounting in
    16221622        <em class="parameter"><code>/var/log/cups/page_log</code></em> not receiving the exact number of pages; instead the dummy page
    16231623        number of &#8220;<span class="quote">1</span>&#8221; is logged in a standard setup).
    16241624        </p></li><li><p>The Adobe driver has more options to misconfigure the
    1625 <a class="indexterm" name="id401658"></a>
     1625<a class="indexterm" name="id425204"></a>
    16261626        PostScript generated by it (like setting it inadvertently to
    16271627        <span class="guilabel">Optimize for Speed</span> instead of
    16281628        <span class="guilabel">Optimize for Portability</span>, which
    16291629        could lead to CUPS being unable to process it).</p></li><li><p>The CUPS PostScript driver output sent by Windows
    1630 <a class="indexterm" name="id401683"></a>
     1630<a class="indexterm" name="id425228"></a>
    16311631        clients to the CUPS server is guaranteed to autotype
    16321632        as the generic MIME type <em class="parameter"><code>application/postscript</code></em>,
     
    16341634        correct number of pages in the <code class="filename">page_log</code> for
    16351635        accounting and quota purposes.</p></li><li><p>
    1636         <a class="indexterm" name="id401713"></a>
     1636        <a class="indexterm" name="id425259"></a>
    16371637        The CUPS PostScript driver supports the sending of additional standard (IPP) print options by Windows
    16381638        NT/200x/XP clients. Such additional print options are naming the CUPS standard <span class="emphasis"><em>banner
     
    16471647        and simply ignore it).</p></li><li><p>The CUPS PostScript driver will be the heart of the
    16481648        fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon
    1649         (probably alongside the first beta release for CUPS 1.2).</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401750"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p>
    1650 <a class="indexterm" name="id401758"></a>
    1651 <a class="indexterm" name="id401765"></a>
     1649        (probably alongside the first beta release for CUPS 1.2).</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425295"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p>
     1650<a class="indexterm" name="id425303"></a>
     1651<a class="indexterm" name="id425310"></a>
    16521652The <code class="literal">cupsaddsmb</code> command copies the needed files into your <em class="parameter"><code>[print$]</code></em>
    16531653share. Additionally, the PPD associated with this printer is copied from <code class="filename">/etc/cups/ppd/</code>
    16541654to <em class="parameter"><code>[print$]</code></em>. There the files wait for convenient Windows client installations via
    16551655Point'n'Print. Before we can run the command successfully, we need to be sure that we can authenticate toward
    1656 Samba. If you have a small network, you are probably using user-level security (<a class="indexterm" name="id401798"></a>security = user).
     1656Samba. If you have a small network, you are probably using user-level security (<a class="link" href="smb.conf.5.html#SECURITY">security = user</a>).
    16571657</p><p>
    16581658Here is an example of a successfully run <code class="literal">cupsaddsmb</code> command:
    1659 <a class="indexterm" name="id401815"></a>
    1660 <a class="indexterm" name="id401822"></a>
     1659<a class="indexterm" name="id425364"></a>
     1660<a class="indexterm" name="id425371"></a>
    16611661</p><pre class="screen">
    16621662<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root infotec_IS2027</code></strong>
    16631663Password for root required to access localhost via Samba: <strong class="userinput"><code>['secret']</code></strong>
    16641664</pre><p>
    1665 <a class="indexterm" name="id401853"></a>
     1665<a class="indexterm" name="id425402"></a>
    16661666To share <span class="emphasis"><em>all</em></span> printers and drivers, use the
    16671667<code class="option">-a</code> parameter instead of a printer name. Since
    16681668<code class="literal">cupsaddsmb</code> &#8220;<span class="quote">exports</span>&#8221; the printer drivers to Samba, it should be
    16691669obvious that it only works for queues with a CUPS driver associated.
    1670 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id401880"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p>
    1671 <a class="indexterm" name="id401888"></a>
     1670</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425429"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p>
     1671<a class="indexterm" name="id425437"></a>
    16721672Probably you want to see what's going on. Use the
    16731673<code class="option">-v</code> parameter to get a more verbose output. The
     
    16751675a line indicate that I inserted an artificial line break plus some
    16761676indentation here:
    1677 <a class="indexterm" name="id401904"></a>
    1678 <a class="indexterm" name="id401913"></a>
     1677<a class="indexterm" name="id425452"></a>
     1678<a class="indexterm" name="id425462"></a>
    16791679</p><pre class="screen">
    16801680<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root -v infotec_2105</code></strong>
     
    17451745This will occur when the directories WIN40 and W32X86 already existed in the <em class="parameter"><code>[print$]</code></em>
    17461746driver download share (from a previous driver installation). These are harmless warning messages.
    1747 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402011"></a>Understanding cupsaddsmb</h3></div></div></div><p>
    1748 <a class="indexterm" name="id402019"></a>
     1747</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425560"></a>Understanding cupsaddsmb</h3></div></div></div><p>
     1748<a class="indexterm" name="id425568"></a>
    17491749What has happened? What did <code class="literal">cupsaddsmb</code> do? There are five stages of the procedure:
    17501750</p><div class="orderedlist"><ol type="1"><li><p>
    1751         <a class="indexterm" name="id402043"></a>
     1751        <a class="indexterm" name="id425592"></a>
    17521752        Call the CUPS server via IPP and request the driver files and the PPD file for the named printer.</p></li><li><p>Store the files temporarily in the local TEMPDIR (as defined in <code class="filename">cupsd.conf</code>).</p></li><li><p>Connect via smbclient to the Samba server's <em class="parameter"><code>[print$]</code></em> share and put the files into the
    17531753         share's WIN40 (for Windows 9x/Me) and W32X86 (for Windows NT/200x/XP) subdirectories.</p></li><li><p>
    1754         <a class="indexterm" name="id402077"></a>
     1754        <a class="indexterm" name="id425626"></a>
    17551755        Connect via rpcclient to the Samba server and execute the <code class="literal">adddriver</code> command with the correct parameters.
    17561756        </p></li><li><p>
    1757         <a class="indexterm" name="id402098"></a>
     1757        <a class="indexterm" name="id425646"></a>
    17581758        Connect via rpcclient to the Samba server a second time and execute the <code class="literal">setdriver</code> command.</p></li></ol></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    17591759You can run the <code class="literal">cupsaddsmb</code> utility with parameters to specify one remote host as Samba host
     
    17641764<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -H sambaserver -h cupsserver -v printer</code></strong>
    17651765</pre><p>
    1766 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402147"></a>How to Recognize If cupsaddsmb Completed Successfully</h3></div></div></div><p>
     1766</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425696"></a>How to Recognize If cupsaddsmb Completed Successfully</h3></div></div></div><p>
    17671767You <span class="emphasis"><em>must</em></span> always check if the utility completed
    17681768successfully in all fields. You need at minimum these three messages
     
    17861786result was WERR_ACCESS_DENIED
    17871787</pre><p>
    1788 it means that you might have set <a class="indexterm" name="id402217"></a>use client driver = yes for this printer.
     1788it means that you might have set <a class="link" href="smb.conf.5.html#USECLIENTDRIVER">use client driver = yes</a> for this printer.
    17891789Setting it to &#8220;<span class="quote">no</span>&#8221; will solve the problem. Refer to the <code class="filename">smb.conf</code> man page for explanation of
    17901790the <em class="parameter"><code>use client driver</code></em>.
     
    17931793Therefore, we strongly recommend against use of the default quiet mode. It will hide any problems from you that
    17941794might occur.
    1795 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402254"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p>
    1796 <a class="indexterm" name="id402262"></a>
    1797 <a class="indexterm" name="id402269"></a>
     1795</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425806"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p>
     1796<a class="indexterm" name="id425814"></a>
     1797<a class="indexterm" name="id425821"></a>
    17981798Can't get the standard <code class="literal">cupsaddsmb</code> command to run on a Samba PDC?  Are you asked for the
    17991799password credential again and again, and the command just will not take off at all? Try one of these
     
    18051805</pre><p>
    18061806(Note the two backslashes: the first one is required to &#8220;<span class="quote">escape</span>&#8221; the second one).
    1807 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402332"></a>cupsaddsmb Flowchart</h3></div></div></div><p>
    1808 <a class="indexterm" name="id402339"></a>
    1809 <a class="indexterm" name="id402346"></a>
    1810 <a href="CUPS-printing.html#small14" title="Figure 22.16. cupsaddsmb Flowchart.">The cupsaddsmb Flowchart</a> shows a chart about the procedures, command flows, and
     1807</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425884"></a>cupsaddsmb Flowchart</h3></div></div></div><p>
     1808<a class="indexterm" name="id425891"></a>
     1809<a class="indexterm" name="id425898"></a>
     1810<a class="link" href="CUPS-printing.html#small14" title="Figure 22.16. cupsaddsmb Flowchart.">The cupsaddsmb Flowchart</a> shows a chart about the procedures, command flows, and
    18111811data flows of the <code class="literal">cupaddsmb</code> command. Note again: cupsaddsmb is
    18121812not intended to, and does not work with, raw print queues!
    1813 </p><div class="figure"><a name="small14"></a><p class="title"><b>Figure 22.16. cupsaddsmb Flowchart.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/14small.png" alt="cupsaddsmb Flowchart."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402410"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p>
    1814 <a class="indexterm" name="id402418"></a>
    1815 <a class="indexterm" name="id402425"></a>
     1813</p><div class="figure"><a name="small14"></a><p class="title"><b>Figure 22.16. cupsaddsmb Flowchart.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/14small.png" alt="cupsaddsmb Flowchart."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id425962"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p>
     1814<a class="indexterm" name="id425970"></a>
     1815<a class="indexterm" name="id425977"></a>
    18161816After <code class="literal">cupsaddsmb</code> is completed, your driver is prepared for the clients to use. Here are the
    18171817steps you must perform to download and install it via Point'n'Print. From a Windows client, browse to the
    18181818CUPS/Samba server:
    18191819</p><div class="itemizedlist"><ul type="disc"><li><p>
    1820         <a class="indexterm" name="id402446"></a>
     1820        <a class="indexterm" name="id425998"></a>
    18211821        Open the <span class="guilabel">Printers</span> share of Samba in Network Neighborhood.</p></li><li><p>Right-click on the printer in question.</p></li><li><p>From the opening context menu select
    18221822        <span class="guimenuitem">Install...</span> or
     
    18281828<code class="filename">\\SambaServer\PrinterName</code> entry in the drop-down list of available printers.
    18291829</p><p>
    1830 <a class="indexterm" name="id402510"></a>
    1831 <a class="indexterm" name="id402517"></a>
    1832 <a class="indexterm" name="id402524"></a>
     1830<a class="indexterm" name="id426062"></a>
     1831<a class="indexterm" name="id426069"></a>
     1832<a class="indexterm" name="id426076"></a>
    18331833<code class="literal">cupsaddsmb</code> will only reliably work with CUPS version 1.1.15 or higher and with Samba
    18341834version 2.2.4, or later. If it does not work, or if the automatic printer driver download to the clients does
     
    18591859        instead of 3 (the latest ESP Ghostscript package handles Level 3 PostScript very well; Adobe).
    18601860        </p></li><li><p>
    1861         Say Yes to PostScript Error Handler (Adobe).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id402619"></a>Installing PostScript Driver Files Manually Using rpcclient</h2></div></div></div><p>
     1861        Say Yes to PostScript Error Handler (Adobe).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id426171"></a>Installing PostScript Driver Files Manually Using rpcclient</h2></div></div></div><p>
    18621862Of course, you can run all the commands that are embedded into the
    18631863cupsaddsmb convenience utility yourself, one by one, and upload
     
    18651865</p><div class="orderedlist"><ol type="1"><li><p>Prepare Samba (a CUPS print queue with the name of the
    18661866        printer should be there. We are providing the driver now).</p></li><li><p>Copy all files to <em class="parameter"><code>[print$]</code></em>.</p></li><li><p>
    1867         <a class="indexterm" name="id402655"></a>
     1867        <a class="indexterm" name="id426207"></a>
    18681868        Run <code class="literal">rpcclient adddriver</code>
    18691869        (for each client architecture you want to support).</p></li><li><p>
    1870         <a class="indexterm" name="id402675"></a>
     1870        <a class="indexterm" name="id426227"></a>
    18711871        Run <code class="literal">rpcclient setdriver.</code></p></li></ol></div><p>
    1872 <a class="indexterm" name="id402694"></a>
    1873 <a class="indexterm" name="id402703"></a>
    1874 <a class="indexterm" name="id402712"></a>
    1875 <a class="indexterm" name="id402721"></a>
    1876 <a class="indexterm" name="id402730"></a>
     1872<a class="indexterm" name="id426246"></a>
     1873<a class="indexterm" name="id426255"></a>
     1874<a class="indexterm" name="id426264"></a>
     1875<a class="indexterm" name="id426273"></a>
     1876<a class="indexterm" name="id426282"></a>
    18771877We are going to do this now. First, read the man page on <em class="parameter"><code>rpcclient</code></em> to get a first idea.
    18781878Look at all the printing-related subcommands: <code class="literal">enumprinters</code>, <code class="literal">enumdrivers</code>,
     
    18811881You can use it to query (and command) a Windows NT (or 200x/XP) PC, too. MS-RPC is used by Windows clients,
    18821882among other things, to benefit from the Point'n'Print features. Samba can now mimic this as well.
    1883 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402785"></a>A Check of the rpcclient man Page</h3></div></div></div><p>
     1883</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id426337"></a>A Check of the rpcclient man Page</h3></div></div></div><p>
    18841884First let's check the <em class="parameter"><code>rpcclient</code></em> man page. Here are two relevant passages:
    18851885</p><p>
    1886 <a class="indexterm" name="id402803"></a>
    1887 <a class="indexterm" name="id402810"></a>
    1888 <a class="indexterm" name="id402816"></a>
     1886<a class="indexterm" name="id426355"></a>
     1887<a class="indexterm" name="id426361"></a>
     1888<a class="indexterm" name="id426368"></a>
    18891889<code class="literal">adddriver &lt;arch&gt; &lt;config&gt;</code> Execute an <code class="literal">AddPrinterDriver()</code> RPC
    18901890to install the printer driver information on the server. The driver files should already exist in the
     
    19091909RPC will fail.
    19101910</p><p>
    1911 <a class="indexterm" name="id402887"></a>
    1912 <a class="indexterm" name="id402894"></a>
     1911<a class="indexterm" name="id426439"></a>
     1912<a class="indexterm" name="id426445"></a>
    19131913<code class="literal">setdriver &lt;printername&gt; &lt;drivername&gt;</code> Execute a <code class="literal">SetPrinter()</code>
    19141914command to update the printer driver associated with an installed printer. The printer driver must already be
    19151915correctly installed on the print server.
    19161916</p><p>
    1917 <a class="indexterm" name="id402917"></a>
    1918 <a class="indexterm" name="id402924"></a>
     1917<a class="indexterm" name="id426469"></a>
     1918<a class="indexterm" name="id426476"></a>
    19191919See also the <code class="literal">enumprinters</code> and <code class="literal">enumdrivers</code> commands to
    19201920obtain a list of installed printers and drivers.
    1921 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402945"></a>Understanding the rpcclient man Page</h3></div></div></div><p>
    1922 <a class="indexterm" name="id402953"></a>
     1921</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id426497"></a>Understanding the rpcclient man Page</h3></div></div></div><p>
     1922<a class="indexterm" name="id426505"></a>
    19231923The <span class="emphasis"><em>exact</em></span> format isn't made too clear by the man page, since you have to deal with some
    19241924parameters containing spaces. Here is a better description for it. We have line-broken the command and
     
    19441944access it from a UNIX workstation. We will query it with <code class="literal">rpcclient</code> to see what it tells us
    19451945and try to understand the man page more clearly.
    1946 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id403037"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p>
    1947 <a class="indexterm" name="id403045"></a>
    1948 <a class="indexterm" name="id403055"></a>
     1946</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id426589"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p>
     1947<a class="indexterm" name="id426597"></a>
     1948<a class="indexterm" name="id426606"></a>
    19491949We could run <code class="literal">rpcclient</code> with a <code class="literal">getdriver</code> or a
    19501950<code class="literal">getprinter</code> subcommand (in level 3 verbosity) against it. Just sit down at a UNIX or Linux
     
    19541954</pre><p>
    19551955From the result it should become clear which is which. Here is an example from my installation:
    1956 <a class="indexterm" name="id403103"></a>
     1956<a class="indexterm" name="id426654"></a>
    19571957</p><pre class="screen">
    19581958<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -U'Danka%xxxx' W200xSERVER \
     
    19851985drivers, we do not need any (nor would we for the Adobe PostScript driver); therefore, the field will get a
    19861986&#8220;<span class="quote">NULL</span>&#8221; entry.
    1987 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id403163"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p>
    1988 <a class="indexterm" name="id403171"></a>
    1989 <a class="indexterm" name="id403180"></a>
    1990 <a class="indexterm" name="id403187"></a>
     1987</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id426709"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p>
     1988<a class="indexterm" name="id426717"></a>
     1989<a class="indexterm" name="id426726"></a>
     1990<a class="indexterm" name="id426733"></a>
    19911991From the man page (and from the quoted output of <code class="literal">cupsaddsmb</code> above) it becomes clear that
    19921992you need to have certain conditions in order to make the manual uploading and initializing of the driver files
    19931993succeed. The two <code class="literal">rpcclient</code> subcommands (<code class="literal">adddriver</code> and
    19941994<code class="literal">setdriver</code>) need to encounter the following preconditions to complete successfully:
    1995 </p><div class="itemizedlist"><ul type="disc"><li><p>You are connected as <a class="indexterm" name="id403227"></a>printer admin or root (this is
     1995</p><div class="itemizedlist"><ul type="disc"><li><p>You are connected as <a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> or root (this is
    19961996        <span class="emphasis"><em>not</em></span> the &#8220;<span class="quote">Printer Operators</span>&#8221; group in NT, but the <span class="emphasis"><em>printer
    19971997        admin</em></span> group as defined in the <em class="parameter"><code>[global]</code></em> section of <code class="filename">smb.conf</code>).
     
    20052005        subdirectories.</p></li><li><p>The printer you are going to set up for the Windows
    20062006        clients needs to be installed in CUPS already.</p></li><li><p>
    2007         <a class="indexterm" name="id403328"></a>
    2008         <a class="indexterm" name="id403337"></a>
     2007        <a class="indexterm" name="id426877"></a>
     2008        <a class="indexterm" name="id426886"></a>
    20092009        The CUPS printer must be known to Samba; otherwise the <code class="literal">setdriver</code> subcommand fails with an
    20102010        NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by Samba, you may use the
     
    20122012        proper update of the printer list until every smbd process had received a SIGHUP or was restarted. Remember
    20132013        this in case you've created the CUPS printer just recently and encounter problems: try restarting Samba.
    2014         </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id403371"></a>Manual Driver Installation in 15 Steps</h3></div></div></div><p>
     2014        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id426920"></a>Manual Driver Installation in 15 Steps</h3></div></div></div><p>
    20152015We are going to install a printer driver now by manually executing all
    20162016required commands. Because this may seem a rather complicated process at
    20172017first, we go through the procedure step by step, explaining every
    20182018single action item as it comes up.
    2019 </p><div class="procedure"><a name="id403382"></a><p class="title"><b>Procedure 22.2. Manual Driver Installation</b></p><ol type="1"><li><p class="title"><b>Install the printer on CUPS.</b></p><pre class="screen">
     2019</p><div class="procedure"><a name="id426931"></a><p class="title"><b>Procedure 22.2. Manual Driver Installation</b></p><ol type="1"><li><p class="title"><b>Install the printer on CUPS.</b></p><pre class="screen">
    20202020        <code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E \
    20212021                                -P canonIR85.ppd</code></strong>
     
    20262026        for this step.
    20272027        </p></li><li><p class="title"><b>(Optional.) Check if the printer is recognized by Samba.</b></p><p>
    2028         <a class="indexterm" name="id403435"></a>
     2028        <a class="indexterm" name="id426984"></a>
    20292029</p><pre class="screen">
    20302030<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumprinters' localhost \
     
    20462046        list</span>&#8221; as defined in <code class="filename">smb.conf</code> for <em class="parameter"><code>[print$]</code></em>.
    20472047        </p></li><li><p class="title"><b>(Optional.) Check if Samba knows a driver for the printer.</b></p><p>
    2048         <a class="indexterm" name="id403526"></a>
    2049         <a class="indexterm" name="id403536"></a>
     2048        <a class="indexterm" name="id427075"></a>
     2049        <a class="indexterm" name="id427085"></a>
    20502050</p><pre class="screen">
    20512051<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2'\
     
    21032103<em class="parameter"><code>[print$]</code></em>.
    21042104</p></li><li><p class="title"><b>Tell Samba that these are driver files (<code class="literal">adddriver</code>).</b></p><p>
    2105 <a class="indexterm" name="id403706"></a>
     2105<a class="indexterm" name="id427255"></a>
    21062106</p><pre class="screen">
    21072107<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" \
     
    21342134subdirectory. Compare this with the situation after step 5.
    21352135</p></li><li><p class="title"><b>(Optional.) Verify if Samba now recognizes the driver.</b></p><p>
    2136 <a class="indexterm" name="id403801"></a>
     2136<a class="indexterm" name="id427350"></a>
    21372137</p><pre class="screen">
    21382138<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumdrivers 3' \
     
    21492149Remember, this command greps for the name you chose for the
    21502150driver in step 6. This command must succeed before you can proceed.
    2151 </p></li><li><p><font color="red">&lt;title&gt;Tell Samba which printer should use these driver files (<code class="literal">setdriver</code>).&lt;/title&gt;</font></p><p>
    2152 <a class="indexterm" name="id403852"></a>
     2151</p></li><li><p><span style="color: red">&lt;title&gt;Tell Samba which printer should use these driver files (<code class="literal">setdriver</code>).&lt;/title&gt;</span></p><p>
     2152<a class="indexterm" name="id427401"></a>
    21532153</p><pre class="screen">
    21542154<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' \
     
    21612161<code class="literal">enumprinters</code> must find the printer.
    21622162</p></li><li><p class="title"><b>(Optional) Verify if Samba has recognized this association.</b></p><p>
    2163 <a class="indexterm" name="id403907"></a>
    2164 <a class="indexterm" name="id403916"></a>
    2165 <a class="indexterm" name="id403926"></a>
     2163<a class="indexterm" name="id427456"></a>
     2164<a class="indexterm" name="id427465"></a>
     2165<a class="indexterm" name="id427474"></a>
    21662166</p><pre class="screen">
    21672167<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \
     
    22032203
    22042204</pre><p>
    2205 <a class="indexterm" name="id403993"></a>
     2205<a class="indexterm" name="id427542"></a>
    22062206Compare these results with the ones from steps 2 and 3. Every one of these commands show the driver is installed. Even
    22072207the <code class="literal">enumprinters</code> command now lists the driver
     
    22092209</p></li><li><p class="title"><b>(Optional.) Tickle the driver into a correct
    22102210device mode.</b></p><p>
    2211 <a class="indexterm" name="id404026"></a>
     2211<a class="indexterm" name="id427575"></a>
    22122212You certainly know how to install the driver on the client. In case
    22132213you are not particularly familiar with Windows, here is a short
     
    22322232<span class="guilabel">landscape</span></em></span>), click on <span class="guibutton">Apply</span>, and change the setting back.
    22332233</p></li><li><p class="title"><b>Install the printer on a client (Point'n'Print).</b></p><p>
    2234 <a class="indexterm" name="id404135"></a>
     2234<a class="indexterm" name="id427684"></a>
    22352235</p><pre class="screen">
    22362236<code class="prompt">C:\&gt; </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /in /n "\\sambaserver\mysmbtstprn"</code></strong>
    22372237</pre><p>
    22382238If it does not work, it could be a permissions problem with the <em class="parameter"><code>[print$]</code></em> share.
    2239 </p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id404175"></a><pre class="screen">
     2239</p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id427724"></a><pre class="screen">
    22402240<code class="prompt">C:\&gt; </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /p /n "\\sambaserver\mysmbtstprn"</code></strong>
    22412241</pre><p>
     
    22472247</p></li><li><p class="title"><b>(Obligatory.) Enjoy. Jump. Celebrate your success.</b></p><pre class="screen">
    22482248<code class="prompt">root# </code><strong class="userinput"><code>echo "Cheeeeerioooooo! Success..." &gt;&gt; /var/log/samba/log.smbd</code></strong>
    2249 </pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404250"></a>Troubleshooting Revisited</h3></div></div></div><p>
    2250 <a class="indexterm" name="id404258"></a>
     2249</pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id427799"></a>Troubleshooting Revisited</h3></div></div></div><p>
     2250<a class="indexterm" name="id427807"></a>
    22512251The setdriver command will fail if in Samba's mind the queue is not
    22522252already there. A successful installation displys the promising message that the:
     
    22592259result was NT_STATUS_UNSUCCESSFUL
    22602260</code></p><p>
    2261 <a class="indexterm" name="id404287"></a>
    2262 <a class="indexterm" name="id404294"></a>
     2261<a class="indexterm" name="id427836"></a>
     2262<a class="indexterm" name="id427842"></a>
    22632263It is not good enough that you can see the queue in CUPS, using the <code class="literal">lpstat -p ir85wm</code>
    22642264command. A bug in most recent versions of Samba prevents the proper update of the queue list. The recognition
     
    22662266if this is the reason why Samba does not execute the <code class="literal">setdriver</code> command successfully, check
    22672267if Samba &#8220;<span class="quote">sees</span>&#8221; the printer:
    2268 <a class="indexterm" name="id404319"></a>
     2268<a class="indexterm" name="id427868"></a>
    22692269</p><pre class="screen">
    22702270<code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%xxxx' -c 'enumprinters 0'|grep ir85wm</code></strong>
     
    22722272</pre><p>
    22732273An alternate command could be this:
    2274 <a class="indexterm" name="id404347"></a>
     2274<a class="indexterm" name="id427896"></a>
    22752275</p><pre class="screen">
    22762276<code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' </code></strong>
     
    22822282</pre><p>
    22832283By the way, you can use these commands, plus a few more, of course, to install drivers on remote Windows NT print servers too!
    2284 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id404381"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p>
    2285 <a class="indexterm" name="id404395"></a>
    2286 <a class="indexterm" name="id404402"></a>
    2287 <a class="indexterm" name="id404410"></a>
    2288 <a class="indexterm" name="id404419"></a>
    2289 <a class="indexterm" name="id404428"></a>
    2290 <a class="indexterm" name="id404437"></a>
    2291 <a class="indexterm" name="id404446"></a>
    2292 <a class="indexterm" name="id404455"></a>
    2293 <a class="indexterm" name="id404464"></a>
    2294 <a class="indexterm" name="id404473"></a>
    2295 <a class="indexterm" name="id404482"></a>
    2296 <a class="indexterm" name="id404491"></a>
    2297 <a class="indexterm" name="id404500"></a>
     2284</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id427930"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p>
     2285<a class="indexterm" name="id427944"></a>
     2286<a class="indexterm" name="id427950"></a>
     2287<a class="indexterm" name="id427959"></a>
     2288<a class="indexterm" name="id427968"></a>
     2289<a class="indexterm" name="id427977"></a>
     2290<a class="indexterm" name="id427986"></a>
     2291<a class="indexterm" name="id427995"></a>
     2292<a class="indexterm" name="id428004"></a>
     2293<a class="indexterm" name="id428013"></a>
     2294<a class="indexterm" name="id428022"></a>
     2295<a class="indexterm" name="id428031"></a>
     2296<a class="indexterm" name="id428040"></a>
     2297<a class="indexterm" name="id428049"></a>
    22982298Some mystery is associated with the series of files with a tdb suffix appearing in every Samba installation.
    22992299They are <code class="filename">connections.tdb</code>, <code class="filename">printing.tdb</code>,
     
    23022302<code class="filename">messages.tdb</code> , <code class="filename">ntprinters.tdb</code>, <code class="filename">sessionid.tdb</code>,
    23032303and <code class="filename">secrets.tdb</code>. What is their purpose?
    2304 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404580"></a>Trivial Database Files</h3></div></div></div><p>
    2305 <a class="indexterm" name="id404588"></a>
     2304</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id428129"></a>Trivial Database Files</h3></div></div></div><p>
     2305<a class="indexterm" name="id428137"></a>
    23062306A Windows NT (print) server keeps track of all information needed to serve its duty toward its clients by
    23072307storing entries in the Windows registry. Client queries are answered by reading from the registry,
     
    23122312<code class="filename">ntprinters.tdb</code>, <code class="filename">printing.tdb</code>,<code class="filename">ntforms.tdb</code>, and
    23132313<code class="filename">ntdrivers.tdb</code>.
    2314 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404646"></a>Binary Format</h3></div></div></div><p>
     2314</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id428191"></a>Binary Format</h3></div></div></div><p>
    23152315<code class="filename">*.tdb</code> files are not human readable. They are written in a binary format. &#8220;<span class="quote">Why not
    23162316ASCII?</span>&#8221;, you may ask. &#8220;<span class="quote">After all, ASCII configuration files are a good and proven tradition on
     
    23212321<code class="filename">*.tdb</code> files allows for this provision. Many smbd processes may write to the same
    23222322<code class="filename">*.tdb</code> file at the same time. This wouldn't be possible with pure ASCII files.
    2323 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404707"></a>Losing <code class="filename">*.tdb</code> Files</h3></div></div></div><p>
     2323</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id428252"></a>Losing <code class="filename">*.tdb</code> Files</h3></div></div></div><p>
    23242324It is very important that all <code class="filename">*.tdb</code> files remain consistent over all write and read
    23252325accesses. However, it may happen that these files <span class="emphasis"><em>do</em></span> get corrupted. (A <code class="literal">kill -9
     
    23282328only option. After that, you need to re-create all print-related setups unless you have made a backup of the
    23292329<code class="filename">*.tdb</code> files in time.
    2330 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404753"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p>
    2331 <a class="indexterm" name="id404766"></a>
    2332 <a class="indexterm" name="id404777"></a>
     2330</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id428299"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p>
     2331<a class="indexterm" name="id428311"></a>
     2332<a class="indexterm" name="id428322"></a>
    23332333Samba ships with a little utility that helps the root user of your system to backup your
    23342334<code class="filename">*.tdb</code> files. If you run it with no argument, it prints a usage message:
     
    23572357 -rw-------    1 root     root        40960 May  2 03:44 printing.tdb.bak
    23582358
    2359 </pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id404864"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p>
    2360 <a class="indexterm" name="id404872"></a>
     2359</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id428409"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p>
     2360<a class="indexterm" name="id428417"></a>
    23612361CUPS ships with good support for HP LaserJet-type printers. You can install the generic driver as follows:
    2362 <a class="indexterm" name="id404880"></a>
     2362<a class="indexterm" name="id428425"></a>
    23632363</p><pre class="screen">
    23642364<code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd</code></strong>
     
    23712371LaserJet-compatible model. It constitutes a sort of &#8220;<span class="quote">least common denominator</span>&#8221; of all the models.
    23722372If for some reason you must pay for the commercially available ESP Print Pro drivers, your first move should
    2373 be to consult the database on the <a href="http://www.linuxprinting.org/printer_list.cgi" target="_top">Linuxprinting</a> Web site.  Linuxprinting.org has
     2373be to consult the database on the <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi" target="_top">Linuxprinting</a> Web site.  Linuxprinting.org has
    23742374excellent recommendations about which driver is best used for each printer. Its database is kept current by
    23752375the tireless work of Till Kamppeter from Mandrakesoft, who is also the principal author of the
    23762376<code class="literal">foomatic-rip</code> utility.
    23772377</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    2378 <a class="indexterm" name="id404961"></a>
    2379 <a class="indexterm" name="id404967"></a>
    2380 <a class="indexterm" name="id404974"></a>
     2378<a class="indexterm" name="id428506"></a>
     2379<a class="indexterm" name="id428513"></a>
     2380<a class="indexterm" name="id428520"></a>
    23812381The former <code class="literal">cupsomatic</code> concept is now being replaced by the new successor, a much more
    23822382powerful <code class="literal">foomatic-rip</code>.  <code class="literal">cupsomatic</code> is no longer maintained. Here is the
    2383 new URL to the <a href="http://www.linuxprinting.org/driver_list.cgi" target="_top">Foomatic-3.0</a>
     2383new URL to the <a class="ulink" href="http://www.linuxprinting.org/driver_list.cgi" target="_top">Foomatic-3.0</a>
    23842384database.  If you upgrade to <code class="literal">foomatic-rip</code>, remember to also upgrade to the new-style PPDs
    23852385for your Foomatic-driven printers. foomatic-rip will not work with PPDs generated for the old
     
    23872387are also intended to be used by Samba and the cupsaddsmb utility, to provide the driver files for the Windows
    23882388clients!
    2389 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405024"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p>
    2390 <a class="indexterm" name="id405032"></a>
    2391 <a class="indexterm" name="id405039"></a>
    2392 Nowadays, most Linux distributions rely on the utilities from the <a href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a> to create their printing-related software
     2389</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id428570"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p>
     2390<a class="indexterm" name="id428577"></a>
     2391<a class="indexterm" name="id428584"></a>
     2392Nowadays, most Linux distributions rely on the utilities from the <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a> to create their printing-related software
    23932393(which, by the way, works on all UNIXes and on Mac OS X and Darwin, too).  The utilities from this sire have a
    23942394very end-user-friendly interface that allows for an easy update of drivers and PPDs for all supported models,
     
    23962396few years.
    23972397</p><p>
    2398 Recently, Foomatic has achieved the astonishing milestone of <a href="http://www.linuxprinting.org/printer_list.cgi?make=Anyone" target="_top">1,000 listed</a> printer models.
     2398Recently, Foomatic has achieved the astonishing milestone of <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi?make=Anyone" target="_top">1,000 listed</a> printer models.
    23992399Linuxprinting.org keeps all the important facts about printer drivers, supported models, and which options are
    2400 available for the various driver/printer combinations in its <a href="http://www.linuxprinting.org/foomatic.html" target="_top">Foomatic</a> database. Currently there are <a href="http://www.linuxprinting.org/driver_list.cgi" target="_top">245 drivers</a> in the database. Many drivers support
     2400available for the various driver/printer combinations in its <a class="ulink" href="http://www.linuxprinting.org/foomatic.html" target="_top">Foomatic</a> database. Currently there are <a class="ulink" href="http://www.linuxprinting.org/driver_list.cgi" target="_top">245 drivers</a> in the database. Many drivers support
    24012401various models, and many models may be driven by different drivers  its your choice!
    2402 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405085"></a>690 &#8220;<span class="quote">Perfect</span>&#8221; Printers</h4></div></div></div><p>
    2403 <a class="indexterm" name="id405096"></a>
     2402</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id428630"></a>690 &#8220;<span class="quote">Perfect</span>&#8221; Printers</h4></div></div></div><p>
     2403<a class="indexterm" name="id428641"></a>
    24042404At present, there are 690 devices dubbed as working perfectly: 181 are <span class="emphasis"><em>mostly</em></span> perfect, 96
    24052405are <span class="emphasis"><em>partially</em></span> perfect, and 46 are paperweights. Keeping in mind that most of these are
     
    24092409achievement! Three years ago the number was not more than 500, and Linux or UNIX printing at the time wasn't
    24102410anywhere near the quality it is today.
    2411 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405121"></a>How the Printing HOWTO Started It All</h4></div></div></div><p>
    2412 A few years ago <a href="http://www2.picante.com/" target="_top">Grant Taylor</a> started it all. The
    2413 roots of today's Linuxprinting.org are in the first <a href="http://www.linuxprinting.org/foomatic2.9/howto/" target="_top">Linux Printing HOWTO</a> that he authored. As a
     2411</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id428666"></a>How the Printing HOWTO Started It All</h4></div></div></div><p>
     2412A few years ago <a class="ulink" href="http://www2.picante.com/" target="_top">Grant Taylor</a> started it all. The
     2413roots of today's Linuxprinting.org are in the first <a class="ulink" href="http://www.linuxprinting.org/foomatic2.9/howto/" target="_top">Linux Printing HOWTO</a> that he authored. As a
    24142414side-project to this document, which served many Linux users and admins to guide their first steps in this
    24152415complicated and delicate setup (to a scientist, printing is &#8220;<span class="quote">applying a structured deposition of
     
    24182418This database became the core component of today's Foomatic collection of tools and data. In the meantime, it
    24192419has moved to an XML representation of the data.
    2420 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405151"></a>Foomatic's Strange Name</h4></div></div></div><p>
    2421 <a class="indexterm" name="id405159"></a>
     2420</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id428697"></a>Foomatic's Strange Name</h4></div></div></div><p>
     2421<a class="indexterm" name="id428705"></a>
    24222422&#8220;<span class="quote">Why the funny name?</span>&#8221; you ask. When it really took off, around spring 2000, CUPS was far less
    24232423popular than today, and most systems used LPD, LPRng, or even PDQ to print. CUPS shipped with a few generic
     
    24372437        printing was the only one available).</p></li><li><p>It gave all the advanced CUPS options (Web interface,
    24382438        GUI driver configurations) to users wanting (or needing) to use
    2439         Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405215"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p>
    2440 <a class="indexterm" name="id405223"></a>
    2441 <a class="indexterm" name="id405230"></a>
    2442 <a class="indexterm" name="id405237"></a>
    2443 CUPS worked through a quickly hacked-up filter script named <a href="http://www.linuxprinting.org/download.cgi?filename=cupsomatic&amp;show=0" target="_top">cupsomatic</a>.  cupsomatic
     2439        Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id428763"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p>
     2440<a class="indexterm" name="id428771"></a>
     2441<a class="indexterm" name="id428778"></a>
     2442<a class="indexterm" name="id428785"></a>
     2443CUPS worked through a quickly hacked-up filter script named <a class="ulink" href="http://www.linuxprinting.org/download.cgi?filename=cupsomatic&amp;show=0" target="_top">cupsomatic</a>.  cupsomatic
    24442444ran the printfile through Ghostscript, constructing automatically the rather complicated command line needed.
    24452445It just needed to be copied into the CUPS system to make it work. To configure the way cupsomatic controls the
     
    24472447database. For CUPS and the respective printer/filter combo, another Perl script named CUPS-O-Matic did the PPD
    24482448generation. After that was working, Taylor implemented within a few days a similar thing for two other
    2449 spoolers. Names chosen for the config-generator scripts were <a href="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0" target="_top">PDQ-O-Matic</a> (for PDQ)
    2450 and <a href="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0" target="_top">LPD-O-Matic</a>
     2449spoolers. Names chosen for the config-generator scripts were <a class="ulink" href="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0" target="_top">PDQ-O-Matic</a> (for PDQ)
     2450and <a class="ulink" href="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0" target="_top">LPD-O-Matic</a>
    24512451(for  you guessed it  LPD); the configuration here didn't use PPDs but other
    24522452spooler-specific files.
    24532453</p><p>
    2454 From late summer of that year, <a href="http://www.linuxprinting.org/till/" target="_top">Till Kamppeter</a> started
    2455 to put work into the database. Kamppeter had been newly employed by <a href="http://www.mandrakesoft.com/" target="_top">Mandrakesoft</a> to convert its printing system over to CUPS, after
    2456 they had seen his <a href="http://www.fltk.org/" target="_top">FLTK</a>-based <a href="http://cups.sourceforge.net/xpp/" target="_top">XPP</a> (a GUI front-end to the CUPS lp-command). He added a huge
    2457 amount of new information and new printers. He also developed the support for other spoolers, like <a href="http://ppr.sourceforge.net/" target="_top">PPR</a> (via ppromatic), <a href="http://sourceforge.net/projects/lpr/" target="_top">GNUlpr</a>, and <a href="http://www.lprng.org/" target="_top">LPRng</a> (both via an extended lpdomatic) and spooler-less printing (<a href="http://www.linuxprinting.org/download.cgi?filename=directomatic&amp;show=0" target="_top">directomatic</a>).
     2454From late summer of that year, <a class="ulink" href="http://www.linuxprinting.org/till/" target="_top">Till Kamppeter</a> started
     2455to put work into the database. Kamppeter had been newly employed by <a class="ulink" href="http://www.mandrakesoft.com/" target="_top">Mandrakesoft</a> to convert its printing system over to CUPS, after
     2456they had seen his <a class="ulink" href="http://www.fltk.org/" target="_top">FLTK</a>-based <a class="ulink" href="http://cups.sourceforge.net/xpp/" target="_top">XPP</a> (a GUI front-end to the CUPS lp-command). He added a huge
     2457amount of new information and new printers. He also developed the support for other spoolers, like <a class="ulink" href="http://ppr.sourceforge.net/" target="_top">PPR</a> (via ppromatic), <a class="ulink" href="http://sourceforge.net/projects/lpr/" target="_top">GNUlpr</a>, and <a class="ulink" href="http://www.lprng.org/" target="_top">LPRng</a> (both via an extended lpdomatic) and spooler-less printing (<a class="ulink" href="http://www.linuxprinting.org/download.cgi?filename=directomatic&amp;show=0" target="_top">directomatic</a>).
    24582458</p><p>
    24592459So, to answer your question, &#8220;<span class="quote">Foomatic</span>&#8221; is the general name for all the overlapping code and data
     
    24612461structures attached to Linuxprinting.org PPDs for CUPS. It had a different &#8220;<span class="quote">*omatic</span>&#8221; script for
    24622462every spooler, as well as different printer configuration files.
    2463 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405353"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p>
    2464 <a class="indexterm" name="id405364"></a>
     2463</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id428901"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p>
     2464<a class="indexterm" name="id428913"></a>
    24652465This has all changed in Foomatic versions 2.9 (beta) and released as &#8220;<span class="quote">stable</span>&#8221; 3.0. It has now
    2466 achieved the convergence of all *omatic scripts and is called the <a href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=0" target="_top">foomatic-rip</a>.
     2466achieved the convergence of all *omatic scripts and is called the <a class="ulink" href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=0" target="_top">foomatic-rip</a>.
    24672467This single script is the unification of the previously different spooler-specific *omatic scripts.
    24682468foomatic-rip is used by all the different spoolers alike, and because it can read PPDs (both the original
     
    24712471there is improved media type and source support  paper sizes and trays are easier to configure.
    24722472</p><p>
    2473 <a class="indexterm" name="id405393"></a>
    2474 <a class="indexterm" name="id405400"></a>
    2475 <a class="indexterm" name="id405406"></a>
     2473<a class="indexterm" name="id428942"></a>
     2474<a class="indexterm" name="id428948"></a>
     2475<a class="indexterm" name="id428955"></a>
    24762476Also, the new generation of Linuxprinting.org PPDs no longer contains Perl data structures. If you are a
    24772477distro maintainer and have used the previous version of Foomatic, you may want to give the new one a spin, but
    2478 remember to generate a new-version set of PPDs via the new <a href="http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-3.0.0beta1.tar.gz" target="_top">foomatic-db-engine!</a>.
    2479 Individual users just need to generate a single new PPD specific to their model by <a href="http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/II.Foomatic-User/II.tutorial-handout-foomatic-user.html" target="_top">following
     2478remember to generate a new-version set of PPDs via the new <a class="ulink" href="http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-3.0.0beta1.tar.gz" target="_top">foomatic-db-engine!</a>.
     2479Individual users just need to generate a single new PPD specific to their model by <a class="ulink" href="http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/II.Foomatic-User/II.tutorial-handout-foomatic-user.html" target="_top">following
    24802480the steps</a> outlined in the Foomatic tutorial or in this chapter. This new development is truly amazing.
    24812481</p><p>
    2482 <a class="indexterm" name="id405433"></a>
    2483 <a class="indexterm" name="id405440"></a>
    2484 <a class="indexterm" name="id405447"></a>
     2482<a class="indexterm" name="id428982"></a>
     2483<a class="indexterm" name="id428989"></a>
     2484<a class="indexterm" name="id428995"></a>
    24852485foomatic-rip is a very clever wrapper around the need to run Ghostscript with a different syntax, options,
    24862486device selections, and/or filters for each different printer or spooler. At the same time, it can read the PPD
     
    24902490printing on media drawn from different paper trays within the same job (in both cases, even where there is no
    24912491support for this from Windows-based vendor printer drivers).
    2492 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405462"></a>Driver Development Outside</h4></div></div></div><p>
    2493 <a class="indexterm" name="id405470"></a>
     2492</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id429010"></a>Driver Development Outside</h4></div></div></div><p>
     2493<a class="indexterm" name="id429018"></a>
    24942494Most driver development itself does not happen within Linuxprinting.org. Drivers are written by independent
    24952495maintainers.  Linuxprinting.org just pools all the information and stores it in its database. In addition, it
     
    24992499Speaking of the different driver development groups, most of the work is currently done in three projects:
    25002500</p><div class="itemizedlist"><ul type="disc"><li><p>
    2501 <a class="indexterm" name="id405490"></a>
    2502         <a href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">Omni</a>
     2501<a class="indexterm" name="id429039"></a>
     2502        <a class="ulink" href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">Omni</a>
    25032503         a free software project by IBM that tries to convert its printer
    25042504        driver knowledge from good-ol' OS/2 times into a modern, modular,
    25052505        universal driver architecture for Linux/UNIX (still beta). This
    25062506        currently supports 437 models.</p></li><li><p>
    2507 <a class="indexterm" name="id405513"></a>
    2508         <a href="http://hpinkjet.sf.net/" target="_top">HPIJS</a>
     2507<a class="indexterm" name="id429061"></a>
     2508        <a class="ulink" href="http://hpinkjet.sf.net/" target="_top">HPIJS</a>
    25092509        a free software project by HP to provide the support for its own
    25102510        range of models (very mature, printing in most cases is perfect and
    25112511        provides true photo quality). This currently supports 369
    25122512        models.</p></li><li><p>
    2513 <a class="indexterm" name="id405534"></a>
    2514         <a href="http://gimp-print.sf.net/" target="_top">Gimp-Print</a>  a free software
     2513<a class="indexterm" name="id429082"></a>
     2514        <a class="ulink" href="http://gimp-print.sf.net/" target="_top">Gimp-Print</a>  a free software
    25152515        effort, started by Michael Sweet (also lead developer for CUPS), now
    25162516        directed by Robert Krawitz, which has achieved an amazing level of
    25172517        photo print quality (many Epson users swear that its quality is
    25182518        better than the vendor drivers provided by Epson for the Microsoft
    2519         platforms). This currently supports 522 models.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405555"></a>Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX)</h4></div></div></div><p>
     2519        platforms). This currently supports 522 models.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id429104"></a>Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX)</h4></div></div></div><p>
    25202520Linuxprinting.org today is the one-stop shop to download printer drivers. Look for printer information and
    2521 <a href="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/" target="_top">tutorials</a> or solve
    2522 printing problems in its popular <a href="http://www.linuxprinting.org/newsportal/" target="_top">forums</a>. This
    2523 forum is not just for GNU/Linux users, but admins of <a href="http://www.linuxprinting.org/macosx/" target="_top">
     2521<a class="ulink" href="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/" target="_top">tutorials</a> or solve
     2522printing problems in its popular <a class="ulink" href="http://www.linuxprinting.org/newsportal/" target="_top">forums</a>. This
     2523forum is not just for GNU/Linux users, but admins of <a class="ulink" href="http://www.linuxprinting.org/macosx/" target="_top">
    25242524commercial UNIX systems</a> are also going there, and the relatively new
    2525 <a href="http://www.linuxprinting.org/newsportal/thread.php3?name=linuxprinting.macosx.general" target="_top">Mac OS X
     2525<a class="ulink" href="http://www.linuxprinting.org/newsportal/thread.php3?name=linuxprinting.macosx.general" target="_top">Mac OS X
    25262526forum</a> has turned out to be one of the most frequented forums after only a few weeks.
    25272527</p><p>
    2528 <a class="indexterm" name="id405594"></a>
    2529 <a class="indexterm" name="id405601"></a>
    2530 <a class="indexterm" name="id405607"></a>
     2528<a class="indexterm" name="id429142"></a>
     2529<a class="indexterm" name="id429149"></a>
     2530<a class="indexterm" name="id429156"></a>
    25312531Linuxprinting.org and the Foomatic driver wrappers around Ghostscript are now a standard tool-chain for
    25322532printing on all the important distros. Most of them also have CUPS underneath. While in recent years most
     
    25372537Till Kamppeter from Mandrakesoft is doing an excellent job in his spare time to maintain Linuxprinting.org and
    25382538Foomatic. So if you use it often, please send him a note showing your appreciation.
    2539 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id405626"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p>
    2540 <a class="indexterm" name="id405634"></a>
    2541 <a class="indexterm" name="id405641"></a>
    2542 <a class="indexterm" name="id405648"></a>
    2543 <a class="indexterm" name="id405655"></a>
    2544 <a class="indexterm" name="id405662"></a>
    2545 <a class="indexterm" name="id405668"></a>
    2546 <a class="indexterm" name="id405675"></a>
    2547 <a class="indexterm" name="id405682"></a>
    2548 <a class="indexterm" name="id405689"></a>
     2539</p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id429175"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p>
     2540<a class="indexterm" name="id429183"></a>
     2541<a class="indexterm" name="id429190"></a>
     2542<a class="indexterm" name="id429196"></a>
     2543<a class="indexterm" name="id429203"></a>
     2544<a class="indexterm" name="id429210"></a>
     2545<a class="indexterm" name="id429217"></a>
     2546<a class="indexterm" name="id429224"></a>
     2547<a class="indexterm" name="id429230"></a>
     2548<a class="indexterm" name="id429237"></a>
    25492549The Foomatic database is an amazing piece of ingenuity in itself. Not only does it keep the printer and driver
    25502550information, but it is organized in a way that it can generate PPD files on the fly from its internal
     
    25592559ask from Ghostscript to convert the PostScript print job into a raster format ready for the target device.
    25602560This usage of PPDs to describe the options of non-PostScript printers was the invention of the CUPS
    2561 developers. The rest is easy.  GUI tools (like KDE's marvelous <a href="http://printing.kde.org/overview/kprinter.phtml" target="_top">kprinter</a> or the GNOME <a href="http://gtklp.sourceforge.net/" target="_top">gtklp</a> xpp and the CUPS Web interface) read the PPD as well and use
     2561developers. The rest is easy.  GUI tools (like KDE's marvelous <a class="ulink" href="http://printing.kde.org/overview/kprinter.phtml" target="_top">kprinter</a> or the GNOME <a class="ulink" href="http://gtklp.sourceforge.net/" target="_top">gtklp</a> xpp and the CUPS Web interface) read the PPD as well and use
    25622562this information to present the available settings to the user as an intuitive menu selection.
    2563 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405729"></a>foomatic-rip and Foomatic PPD Download and Installation</h3></div></div></div><p>
     2563</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id429283"></a>foomatic-rip and Foomatic PPD Download and Installation</h3></div></div></div><p>
    25642564Here are the steps to install a foomatic-rip-driven LaserJet 4 Plus-compatible
    25652565printer in CUPS (note that recent distributions of SuSE, UnitedLinux and
     
    25672567<code class="literal">foomatic-rip</code> utility. Going directly to
    25682568Linuxprinting.org ensures that you get the latest driver/PPD files).
    2569 </p><div class="itemizedlist"><ul type="disc"><li><p>Open your browser at the Linuxprinting.org printer list <a href="http://www.linuxprinting.org/printer_list.cgi" target="_top">page.</a>
     2569</p><div class="itemizedlist"><ul type="disc"><li><p>Open your browser at the Linuxprinting.org printer list <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi" target="_top">page.</a>
    25702570        </p></li><li><p>Check the complete list of printers in the
    2571         <a href="http://www.linuxprinting.org/printer_list.cgi?make=Anyone" target="_top">database.</a>.
     2571        <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi?make=Anyone" target="_top">database.</a>.
    25722572        </p></li><li><p>Select your model and click on the link.
    25732573        </p></li><li><p>You'll arrive at a page listing all drivers working with this
     
    25752575        recommended driver. Try this one first).
    25762576        </p></li><li><p>In our case (HP LaserJet 4 Plus), we'll arrive at the default driver for the
    2577         <a href="http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus" target="_top">HP-LaserJet 4 Plus.</a>
     2577        <a class="ulink" href="http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus" target="_top">HP-LaserJet 4 Plus.</a>
    25782578        </p></li><li><p>The recommended driver is ljet4.</p></li><li><p>Several links are provided here. You should visit them all if you
    25792579        are not familiar with the Linuxprinting.org database.
    25802580        </p></li><li><p>There is a link to the database page for the
    2581         <a href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">ljet4</a>.
     2581        <a class="ulink" href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">ljet4</a>.
    25822582        On the driver's page, you'll find important and detailed information
    25832583        about how to use that driver within the various available
    25842584        spoolers.</p></li><li><p>Another link may lead you to the home page of the
    25852585        author of the driver.</p></li><li><p>Important links are the ones that provide hints with
    2586         setup instructions for <a href="http://www.linuxprinting.org/cups-doc.html" target="_top">CUPS</a>;
    2587         <a href="http://www.linuxprinting.org/pdq-doc.html" target="_top">PDQ</a>;
    2588         <a href="http://www.linuxprinting.org/lpd-doc.html" target="_top">LPD, LPRng, and GNUlpr</a>);
    2589         as well as <a href="http://www.linuxprinting.org/ppr-doc.html" target="_top">PPR</a>
    2590         or &#8220;<span class="quote">spoolerless</span>&#8221; <a href="http://www.linuxprinting.org/direct-doc.html" target="_top">printing</a>.
     2586        setup instructions for <a class="ulink" href="http://www.linuxprinting.org/cups-doc.html" target="_top">CUPS</a>;
     2587        <a class="ulink" href="http://www.linuxprinting.org/pdq-doc.html" target="_top">PDQ</a>;
     2588        <a class="ulink" href="http://www.linuxprinting.org/lpd-doc.html" target="_top">LPD, LPRng, and GNUlpr</a>);
     2589        as well as <a class="ulink" href="http://www.linuxprinting.org/ppr-doc.html" target="_top">PPR</a>
     2590        or &#8220;<span class="quote">spoolerless</span>&#8221; <a class="ulink" href="http://www.linuxprinting.org/direct-doc.html" target="_top">printing</a>.
    25912591        </p></li><li><p>You can view the PPD in your browser through this link:
    2592         <a href="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1" target="_top">http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1</a>
     2592        <a class="ulink" href="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1" target="_top">http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1</a>
    25932593        </p></li><li><p>Most importantly, you can also generate and download
    2594         the <a href="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=0" target="_top">PPD</a>.
     2594        the <a class="ulink" href="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=0" target="_top">PPD</a>.
    25952595        </p></li><li><p>The PPD contains all the information needed to use our
    25962596        model and the driver; once installed, this works transparently
     
    25982598        and so on, from the Web-based menu, or from the print dialog GUI, or from
    25992599        the command line.</p></li><li><p>If you ended up on the drivers
    2600         <a href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">page</a>,
     2600        <a class="ulink" href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">page</a>,
    26012601        you can choose to use the &#8220;<span class="quote">PPD-O-Matic</span>&#8221; online PPD generator
    26022602        program.</p></li><li><p>Select the exact model and check either <span class="guilabel">Download</span> or
     
    26272627        foomatic-rip.
    26282628        </p></li><li><p>The foomatic-rip Perl script itself also makes some
    2629         interesting <a href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=1" target="_top">reading</a>
     2629        interesting <a class="ulink" href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=1" target="_top">reading</a>
    26302630        because it is well documented by Kamppeter's in-line comments (even
    26312631        non-Perl hackers will learn quite a bit about printing by reading
     
    26542654        the driver/model) contain support for a certain device representing
    26552655        the selected driver for your model (as shown by <code class="literal">gs -h</code>).</p></li><li><p>foomatic-rip needs a new version of PPDs (PPD versions
    2656         produced for cupsomatic do not work with foomatic-rip).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406151"></a>Page Accounting with CUPS</h2></div></div></div><p>
    2657 <a class="indexterm" name="id406159"></a>
     2656        produced for cupsomatic do not work with foomatic-rip).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id429705"></a>Page Accounting with CUPS</h2></div></div></div><p>
     2657<a class="indexterm" name="id429713"></a>
    26582658Often there are questions regarding print quotas where Samba users (that is, Windows clients) should not be
    26592659able to print beyond a certain number of pages or data volume per day, week, or month. This feature is
     
    26632663Of course one could hack things with one's own scripts. But then there is CUPS. CUPS supports quotas that can
    26642664be based on the size of jobs or on the number of pages or both, and can span any time period you want.
    2665 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406181"></a>Setting Up Quotas</h3></div></div></div><p>
    2666 <a class="indexterm" name="id406189"></a>
     2665</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id429735"></a>Setting Up Quotas</h3></div></div></div><p>
     2666<a class="indexterm" name="id429742"></a>
    26672667This is an example command of how root would set a print quota in CUPS, assuming an existing printer named
    26682668&#8220;<span class="quote">quotaprinter</span>&#8221;:
    2669 <a class="indexterm" name="id406203"></a>
     2669<a class="indexterm" name="id429756"></a>
    26702670</p><pre class="screen">
    26712671<code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p quotaprinter -o job-quota-period=604800 \
     
    26742674This would limit every single user to print no more than 100 pages or 1024 KB of
    26752675data (whichever comes first) within the last 604,800 seconds ( = 1 week).
    2676 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406232"></a>Correct and Incorrect Accounting</h3></div></div></div><p>
     2676</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id429785"></a>Correct and Incorrect Accounting</h3></div></div></div><p>
    26772677For CUPS to count correctly, the printfile needs to pass the CUPS pstops filter; otherwise it uses a dummy
    26782678count of &#8220;<span class="quote">one</span>&#8221;. Some print files do not pass it (e.g., image files), but then those are mostly
     
    26842684accounting done. If the printer is a non-PostScript model, you need to let CUPS do the job to convert the file
    26852685to a print-ready format for the target printer. This is currently working for about a thousand different
    2686 printer models.  Linuxprinting.org has a driver <a href="http://www.linuxprinting.org/printer_list.cgi" target="_top">list</a>.
    2687 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406265"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p>
    2688 <a class="indexterm" name="id406273"></a>
    2689 <a class="indexterm" name="id406279"></a>
    2690 <a class="indexterm" name="id406286"></a>
    2691 <a class="indexterm" name="id406293"></a>
    2692 <a class="indexterm" name="id406300"></a>
     2686printer models.  Linuxprinting.org has a driver <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi" target="_top">list</a>.
     2687</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id429818"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p>
     2688<a class="indexterm" name="id429826"></a>
     2689<a class="indexterm" name="id429833"></a>
     2690<a class="indexterm" name="id429840"></a>
     2691<a class="indexterm" name="id429846"></a>
     2692<a class="indexterm" name="id429853"></a>
    26932693Before CUPS 1.1.16, your only option was to use the Adobe PostScript driver on the Windows clients. The output
    26942694of this driver was not always passed through the <code class="literal">pstops</code> filter on the CUPS/Samba side, and
     
    27012701<code class="filename">cups-samba-1.1.16.tar.gz</code> package). It does <span class="emphasis"><em>not</em></span> work for Windows
    270227029x/Me clients, but it guarantees:
    2703 </p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id406354"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the
     2703</p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id429908"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the
    27042704        driver PPD with its own means.</p></li><li><p>That the file will pass through the <code class="literal">pstops</code> filter
    27052705        on the CUPS/Samba server.</p></li><li><p>To page-count correctly the print file.</p></li></ul></div><p>
    27062706You can read more about the setup of this combination in the man page for <code class="literal">cupsaddsmb</code> (which
    27072707is only present with CUPS installed, and only current from CUPS 1.1.16).
    2708 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406396"></a>The page_log File Syntax</h3></div></div></div><p>
    2709 <a class="indexterm" name="id406403"></a>
     2708</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id429949"></a>The page_log File Syntax</h3></div></div></div><p>
     2709<a class="indexterm" name="id429957"></a>
    27102710These are the items CUPS logs in the <code class="filename">page_log</code> for every page of a job:
    27112711</p><div class="itemizedlist"><ul type="disc"><li><p>Printer name</p></li><li><p>User name</p></li><li><p>Job ID</p></li><li><p>Time of printing</p></li><li><p>Page number</p></li><li><p>Number of copies</p></li><li><p>A billing information string (optional)</p></li><li><p>The host that sent the job (included since version 1.1.19)</p></li></ul></div><p>
     
    27252725from IP address <code class="constant">10.160.51.33</code>, printed from one page 440 copies, and
    27262726is set to be billed to <em class="parameter"><code>finance-dep</code></em>.
    2727 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406532"></a>Possible Shortcomings</h3></div></div></div><p>
     2727</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430085"></a>Possible Shortcomings</h3></div></div></div><p>
    27282728What flaws or shortcomings are there with this quota system?
    27292729</p><div class="itemizedlist"><ul type="disc"><li><p>The ones named above (wrongly logged job in case of
     
    27392739        still be able to send and print a 1,000 sheet job.</p></li><li><p>A user being denied a job because of a filled-up quota
    27402740        does not get a meaningful error message from CUPS other than
    2741         &#8220;<span class="quote">client-error-not-possible</span>&#8221;.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406590"></a>Future Developments</h3></div></div></div><p>
     2741        &#8220;<span class="quote">client-error-not-possible</span>&#8221;.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430143"></a>Future Developments</h3></div></div></div><p>
    27422742This is the best system currently available, and there are huge
    27432743improvements under development for CUPS 1.2:
     
    27472747        stop in the counting).</p></li><li><p>Quotas will be handled more flexibly.</p></li><li><p>Probably there will be support for users to inquire
    27482748        about their accounts in advance.</p></li><li><p>Probably there will be support for some other tools
    2749         around this topic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406625"></a>Other Accounting Tools</h3></div></div></div><p>
     2749        around this topic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430178"></a>Other Accounting Tools</h3></div></div></div><p>
    27502750Other accounting tools that can be used includes: PrintAnalyzer, pyKota, printbill, LogReport.
    27512751For more information regarding these tools you can try a Google search.
    2752 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406637"></a>Additional Material</h2></div></div></div><p>
     2752</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id430191"></a>Additional Material</h2></div></div></div><p>
    27532753A printer queue with <span class="emphasis"><em>no</em></span> PPD associated to it is a
    27542754&#8220;<span class="quote">raw</span>&#8221; printer, and all files will go directly there as received by the
     
    28292829to load the proper paper type before running the 10,000 page job
    28302830requested by marketing for the mailing, and so on).
    2831 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406826"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p>
    2832 <a class="indexterm" name="id406834"></a>
    2833 <a class="indexterm" name="id406840"></a>
    2834 <a class="indexterm" name="id406847"></a>
     2831</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id430379"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p>
     2832<a class="indexterm" name="id430387"></a>
     2833<a class="indexterm" name="id430394"></a>
     2834<a class="indexterm" name="id430401"></a>
    28352835Samba print files pass through two spool directories. One is the incoming directory managed by Samba (set in
    2836 the <a class="indexterm" name="id406855"></a>path = /var/spool/samba directive in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>). The other is the spool directory of your UNIX print subsystem. For
     2836the <a class="link" href="smb.conf.5.html#PATH">path = /var/spool/samba</a> directive in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>). The other is the spool directory of your UNIX print subsystem. For
    28372837CUPS it is normally <code class="filename">/var/spool/cups/</code>, as set by the <code class="filename">cupsd.conf</code>
    28382838directive <code class="filename">RequestRoot /var/spool/cups</code>.
    2839 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406894"></a>CUPS Configuration Settings Explained</h3></div></div></div><p>
     2839</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430451"></a>CUPS Configuration Settings Explained</h3></div></div></div><p>
    28402840Some important parameter settings in the CUPS configuration file
    28412841<code class="filename">cupsd.conf</code> are:
     
    28612861(There are also additional settings for <em class="parameter"><code>MaxJobsPerUser</code></em> and
    28622862<em class="parameter"><code>MaxJobsPerPrinter</code></em>.)
    2863 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406971"></a>Preconditions</h3></div></div></div><p>
     2863</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430528"></a>Preconditions</h3></div></div></div><p>
    28642864For everything to work as it should, you need to have three things:
    28652865</p><div class="itemizedlist"><ul type="disc"><li><p>A Samba smbd that is compiled against <code class="filename">libcups</code> (check
    28662866        on Linux by running <strong class="userinput"><code>ldd `which smbd'</code></strong>).</p></li><li><p>A Samba-<code class="filename">smb.conf</code> setting of
    2867                         <a class="indexterm" name="id407008"></a>printing = cups.</p></li><li><p>Another Samba <code class="filename">smb.conf</code> setting of
    2868                         <a class="indexterm" name="id407026"></a>printcap = cups.</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     2867                        <a class="link" href="smb.conf.5.html#PRINTING">printing = cups</a>.</p></li><li><p>Another Samba <code class="filename">smb.conf</code> setting of
     2868                        <a class="link" href="smb.conf.5.html#PRINTCAP">printcap = cups</a>.</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    28692869In this case, all other manually set printing-related commands (like
    2870 <a class="indexterm" name="id407039"></a>print command,
    2871 <a class="indexterm" name="id407046"></a>lpq command,
    2872 <a class="indexterm" name="id407053"></a>lprm command,
    2873 <a class="indexterm" name="id407060"></a>lppause command, and
    2874 <a class="indexterm" name="id407067"></a>lpresume command) are ignored, and they should normally have no
     2870<a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a>,
     2871<a class="link" href="smb.conf.5.html#LPQCOMMAND">lpq command</a>,
     2872<a class="link" href="smb.conf.5.html#LPRMCOMMAND">lprm command</a>,
     2873<a class="link" href="smb.conf.5.html#LPPAUSECOMMAND">lppause command</a>, and
     2874<a class="link" href="smb.conf.5.html#LPRESUMECOMMAND">lpresume command</a>) are ignored, and they should normally have no
    28752875influence whatsoever on your printing.
    2876 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407077"></a>Manual Configuration</h3></div></div></div><p>
    2877 If you want to do things manually, replace the <a class="indexterm" name="id407086"></a>printing = cups
    2878 by <a class="indexterm" name="id407093"></a>printing = bsd. Then your manually set commands may work
    2879 (I haven't tested this), and a <a class="indexterm" name="id407100"></a>print command = lp -d %P %s; rm %s
     2876</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id430657"></a>Manual Configuration</h3></div></div></div><p>
     2877If you want to do things manually, replace the <a class="link" href="smb.conf.5.html#PRINTING">printing = cups</a>
     2878by <a class="link" href="smb.conf.5.html#PRINTING">printing = bsd</a>. Then your manually set commands may work
     2879(I haven't tested this), and a <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command = lp -d %P %s; rm %s</a>
    28802880may do what you need.
    2881 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id407111"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p>
    2882 <a class="indexterm" name="id407119"></a>
    2883 <a class="indexterm" name="id407126"></a>
     2881</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id430701"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p>
     2882<a class="indexterm" name="id430709"></a>
     2883<a class="indexterm" name="id430715"></a>
    28842884From time to time the question arises, how can you print <span class="emphasis"><em>to</em></span> a Windows-attached printer
    28852885<span class="emphasis"><em>from</em></span> Samba? Normally the local connection from Windows host to printer would be done by
     
    29162916<code class="prompt">root# </code><strong class="userinput"><code>ln -s `which smbspool` /usr/lib/cups/backend/smb</code></strong>
    29172917</pre><p>
    2918 <a class="indexterm" name="id407234"></a>
    2919 <a class="indexterm" name="id407241"></a>
     2918<a class="indexterm" name="id430824"></a>
     2919<a class="indexterm" name="id430831"></a>
    29202920<code class="literal">smbspool</code> was written by Mike Sweet from the CUPS folks. It is included and ships with
    29212921Samba. It may also be used with print subsystems other than CUPS, to spool jobs to Windows printer shares. To
     
    29322932  -P /path/to/PPD</code></strong>
    29332933</pre><p>
    2934 <a class="indexterm" name="id407294"></a>
    2935 <a class="indexterm" name="id407301"></a>
    2936 <a class="indexterm" name="id407307"></a>
     2934<a class="indexterm" name="id430883"></a>
     2935<a class="indexterm" name="id430890"></a>
     2936<a class="indexterm" name="id430897"></a>
    29372937The PPD must be able to direct CUPS to generate the print data for the target model. For PostScript printers,
    29382938just use the PPD that would be used with the Windows NT PostScript driver. But what can you do if the printer
     
    29472947feature of CUPS and you do not necessarily need to have smbd running.
    29482948
    2949 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id407368"></a>More CUPS Filtering Chains</h2></div></div></div><p>
    2950 The diagrams in <a href="CUPS-printing.html#cups1" title="Figure 22.17. Filtering Chain 1.">Filtering Chain 1</a> and <a href="CUPS-printing.html#cups2" title="Figure 22.18. Filtering Chain with cupsomatic">Filtering Chain with
     2949</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id430957"></a>More CUPS Filtering Chains</h2></div></div></div><p>
     2950The diagrams in <a class="link" href="CUPS-printing.html#cups1" title="Figure 22.17. Filtering Chain 1.">Filtering Chain 1</a> and <a class="link" href="CUPS-printing.html#cups2" title="Figure 22.18. Filtering Chain with cupsomatic">Filtering Chain with
    29512951cupsomatic</a> show how CUPS handles print jobs.
    2952 </p><div class="figure"><a name="cups1"></a><p class="title"><b>Figure 22.17. Filtering Chain 1.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups1.png" alt="Filtering Chain 1."></div></div></div><br class="figure-break"><div class="figure"><a name="cups2"></a><p class="title"><b>Figure 22.18. Filtering Chain with cupsomatic</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups2.png" width="243" alt="Filtering Chain with cupsomatic"></div></div></div><br class="figure-break"></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id407477"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407482"></a>Windows 9x/Me Client Can't Install Driver</h3></div></div></div><p>For Windows 9x/Me, clients require the printer names to be eight
     2952</p><div class="figure"><a name="cups1"></a><p class="title"><b>Figure 22.17. Filtering Chain 1.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups1.png" alt="Filtering Chain 1."></div></div></div><br class="figure-break"><div class="figure"><a name="cups2"></a><p class="title"><b>Figure 22.18. Filtering Chain with cupsomatic</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups2.png" width="243" alt="Filtering Chain with cupsomatic"></div></div></div><br class="figure-break"></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id431066"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431072"></a>Windows 9x/Me Client Can't Install Driver</h3></div></div></div><p>For Windows 9x/Me, clients require the printer names to be eight
    29532953        characters (or &#8220;<span class="quote">8 plus 3 chars suffix</span>&#8221;) max; otherwise, the driver files
    2954         will not get transferred when you want to download them from Samba.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="root-ask-loop"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Keeps Asking for Root Password in Never-ending Loop</h3></div></div></div><p>Have you set <a class="indexterm" name="id407512"></a>security = user? Have
     2954        will not get transferred when you want to download them from Samba.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="root-ask-loop"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Keeps Asking for Root Password in Never-ending Loop</h3></div></div></div><p>Have you set <a class="link" href="smb.conf.5.html#SECURITY">security = user</a>? Have
    29552955        you used <code class="literal">smbpasswd</code> to give root a Samba account?
    29562956        You can do two things: open another terminal and execute
     
    29612961        If the error is &#8220;<span class="quote">Tree connect failed: NT_STATUS_BAD_NETWORK_NAME</span>&#8221;,
    29622962        you may have forgotten to create the <code class="filename">/etc/samba/drivers</code> directory.
    2963         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407549"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</h3></div></div></div><p>
     2963        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431141"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</h3></div></div></div><p>
    29642964        If <code class="literal">cupsaddsmb</code>, or <code class="literal">rpcclient addriver</code> emit the error message
    2965         WERR_BAD_PASSWORD, refer to <a href="CUPS-printing.html#root-ask-loop" title="&#8220;cupsaddsmb&#8221; Keeps Asking for Root Password in Never-ending Loop">the previous common error</a>.
    2966         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407585"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</h3></div></div></div><p>
     2965        WERR_BAD_PASSWORD, refer to <a class="link" href="CUPS-printing.html#root-ask-loop" title="&#8220;cupsaddsmb&#8221; Keeps Asking for Root Password in Never-ending Loop">the previous common error</a>.
     2966        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431178"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</h3></div></div></div><p>
    29672967        The use of &#8220;<span class="quote">cupsaddsmb</span>&#8221; gives &#8220;<span class="quote">No PPD file for printer...</span>&#8221;
    29682968        message while PPD file is present.  What might the problem be?
     
    29752975        </p><p>Is your <em class="parameter"><code>TempDir</code></em> directive in
    29762976        <code class="filename">cupsd.conf</code> set to a valid value, and is it writable?
    2977         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407655"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user
     2977        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431248"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user
    29782978        you are from Samba's point of view. Do you have the privileges to
    29792979        write into the <em class="parameter"><code>[print$]</code></em>
    2980         share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407678"></a>New Account Reconnection from Windows 200x/XP Troubles</h3></div></div></div><p>
     2980        share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431271"></a>New Account Reconnection from Windows 200x/XP Troubles</h3></div></div></div><p>
    29812981Once you are connected as the wrong user (for example, as <code class="constant">nobody</code>, which often occurs if
    2982 you have <a class="indexterm" name="id407691"></a>map to guest = bad user), Windows Explorer will not accept an
     2982you have <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>), Windows Explorer will not accept an
    29832983attempt to connect again as a different user. There will not be any bytes transferred on the wire to Samba,
    29842984but still you'll see a stupid error message that makes you think Samba has denied access. Use
     
    29932993the <span class="guilabel">Network Neighborhood</span>), right-click on the printer in question, and select
    29942994<span class="guibutton">Connect....</span>.
    2995 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407756"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p>
    2996 <a class="indexterm" name="id407764"></a>
     2995</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431352"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p>
     2996<a class="indexterm" name="id431360"></a>
    29972997You see per <code class="literal">smbstatus</code> that you are connected as user nobody, but you want to be root or
    2998 printer admin. This is probably due to <a class="indexterm" name="id407778"></a>map to guest = bad user, which
     2998printer admin. This is probably due to <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>, which
    29992999silently connected you under the guest account when you gave (maybe by accident) an incorrect username. Remove
    3000 <a class="indexterm" name="id407786"></a>map to guest if you want to prevent this.
    3001 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407795"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p>
     3000<a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest</a> if you want to prevent this.
     3001</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431398"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p>
    30023002This information came from a mailing list posting regarding problems experienced when
    30033003upgrading from Adobe drivers to CUPS drivers on Microsoft Windows NT/200x/XP clients.
    30043004</p><p>First delete all old Adobe-using printers. Then delete all old Adobe drivers. (On Windows 200x/XP, right-click in
    30053005the background of <span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties...</span>, select
    3006 tab <span class="guilabel">Drivers</span>, and delete here).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407830"></a>Can't Use &#8220;<span class="quote">cupsaddsmb</span>&#8221; on Samba Server, Which Is a PDC</h3></div></div></div><p>Do you use the &#8220;<span class="quote">naked</span>&#8221; root user name? Try to do it
     3006tab <span class="guilabel">Drivers</span>, and delete here).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431432"></a>Can't Use &#8220;<span class="quote">cupsaddsmb</span>&#8221; on Samba Server, Which Is a PDC</h3></div></div></div><p>Do you use the &#8220;<span class="quote">naked</span>&#8221; root user name? Try to do it
    30073007this way: <strong class="userinput"><code>cupsaddsmb -U <em class="replaceable"><code>DOMAINNAME</code></em>\\root -v
    30083008<em class="replaceable"><code>printername</code></em></code></strong>&gt; (note the two backslashes: the first one is
    3009 required to &#8220;<span class="quote">escape</span>&#8221; the second one).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407864"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the
     3009required to &#8220;<span class="quote">escape</span>&#8221; the second one).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431467"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the
    30103010driver too (to verify, right-click on the white background of the
    30113011<span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties</span> and click on the
     
    30133013install a printer with the same name. If you want to update to a new
    30143014driver, delete the old ones first. Deletion is only possible if no
    3015 other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407895"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id407901"></a><a class="indexterm" name="id407908"></a><p>Local security policies may not allow the installation of unsigned drivers  &#8220;<span class="quote">local
    3016 security policies</span>&#8221; may not allow the installation of printer drivers at all.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407926"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p>
    3017 <a class="indexterm" name="id407934"></a>
    3018 <a class="indexterm" name="id407941"></a>
     3015other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431498"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id431504"></a><a class="indexterm" name="id431510"></a><p>Local security policies may not allow the installation of unsigned drivers  &#8220;<span class="quote">local
     3016security policies</span>&#8221; may not allow the installation of printer drivers at all.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431529"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p>
     3017<a class="indexterm" name="id431537"></a>
     3018<a class="indexterm" name="id431544"></a>
    30193019Windows XP handles SMB printers on a &#8220;<span class="quote">per-user</span>&#8221; basis.
    30203020This means every user needs to install the printer himself or herself. To have a printer available for
     
    30223022path of <em class="parameter"><code>http://cupsserver:631/printers/printername</code></em>.  We're still looking into this one.
    30233023Maybe a logon script could automatically install printers for all users.
    3024 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407963"></a>Print Change, Notify Functions on NT Clients</h3></div></div></div><p>For print change, notify functions on NT++ clients.  These need to run the <code class="literal">Server</code>
    3025 service first (renamed to <code class="literal">File &amp; Print Sharing for MS Networks</code> in XP).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id407987"></a>Win XP-SP1</h3></div></div></div><p>Win XP-SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to
     3024</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431566"></a>Print Change, Notify Functions on NT Clients</h3></div></div></div><p>For print change, notify functions on NT++ clients.  These need to run the <code class="literal">Server</code>
     3025service first (renamed to <code class="literal">File &amp; Print Sharing for MS Networks</code> in XP).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431589"></a>Win XP-SP1</h3></div></div></div><p>Win XP-SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to
    30263026&#8220;<span class="quote">Administrator</span>&#8221; or &#8220;<span class="quote">Power User</span>&#8221; groups of users). In Group Policy Object Editor, go
    30273027to <span class="guimenu">User Configuration -&gt; Administrative Templates -&gt; Control Panel -&gt; Printers</span>. The policy
     
    30303030<code class="constant">Users can only Point and Print to these servers</code> to make driver downloads from Samba
    30313031possible.
    3032 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408028"></a>Print Options for All Users Can't Be Set on Windows 200x/XP</h3></div></div></div><p>How are you doing it? I bet the wrong way (it is not easy to find out, though). There are three
     3032</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431631"></a>Print Options for All Users Can't Be Set on Windows 200x/XP</h3></div></div></div><p>How are you doing it? I bet the wrong way (it is not easy to find out, though). There are three
    30333033different ways to bring you to a dialog that <span class="emphasis"><em>seems</em></span> to set everything. All three dialogs
    30343034<span class="emphasis"><em>look</em></span> the same, yet only one of them does what you intend. You need to be Administrator or
     
    30603060&#8220;<span class="quote">C.1. to C.6.</span>&#8221;, will save any settings permanently and be the defaults for new users. If you want
    30613061all clients to get the same defaults, you need to conduct these steps <span class="emphasis"><em>as Administrator</em></span>
    3062 (<a class="indexterm" name="id408262"></a>printer admin in <code class="filename">smb.conf</code>) <span class="emphasis"><em>before</em></span> a client downloads the
     3062(<a class="link" href="smb.conf.5.html#PRINTERADMIN">printer admin</a> in <code class="filename">smb.conf</code>) <span class="emphasis"><em>before</em></span> a client downloads the
    30633063driver (the clients can later set their own <span class="emphasis"><em>per-user defaults</em></span> by following the procedures
    30643064<span class="emphasis"><em>A</em></span> or <span class="emphasis"><em>B</em></span>).
    3065 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408292"></a>Most Common Blunders in Driver Settings on Windows Clients</h3></div></div></div><p>
     3065</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431898"></a>Most Common Blunders in Driver Settings on Windows Clients</h3></div></div></div><p>
    30663066Don't use <em class="parameter"><code>Optimize for Speed</code></em>, but use <em class="parameter"><code>Optimize for Portability</code></em>
    30673067instead (Adobe PS Driver). Don't use <em class="parameter"><code>Page Independence: No</code></em>. Always settle with
     
    30703070Driver). For <span class="guilabel">TrueType Download Options</span> choose <code class="constant">Outline</code>. Use
    30713071PostScript Level 2 if you are having trouble with a non-PS printer and if there is a choice.
    3072 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408345"></a><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</h3></div></div></div><p>
     3072</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431951"></a><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</h3></div></div></div><p>
    30733073Symptom: The last command of <code class="literal">cupsaddsmb</code> does not complete successfully. If the <code class="literal">cmd
    30743074= setdriver printername printername</code> result was NT_STATUS_UNSUCCESSFUL, then possibly the printer was
     
    30763076hostname -c `enumprinters'</code>? Restart smbd (or send a <code class="literal">kill -HUP</code> to all processes
    30773077listed by <code class="literal">smbstatus</code>, and try again.
    3078 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408391"></a>Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</h3></div></div></div><p>
     3078</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431997"></a>Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</h3></div></div></div><p>
    30793079Have you ever by accident set the CUPS spool directory to the same location (<em class="parameter"><code>RequestRoot
    30803080/var/spool/samba/</code></em> in <code class="filename">cupsd.conf</code> or the other way round:
    3081 <code class="filename">/var/spool/cups/</code> is set as <a class="indexterm" name="id408424"></a>path&gt; in the <em class="parameter"><code>[printers]</code></em> section)? These <em class="parameter"><code>must</code></em> be different. Set <em class="parameter"><code>RequestRoot
    3082 /var/spool/cups/</code></em> in <code class="filename">cupsd.conf</code> and <a class="indexterm" name="id408455"></a>path =
    3083 /var/spool/samba in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>. Otherwise,
     3081<code class="filename">/var/spool/cups/</code> is set as <a class="link" href="smb.conf.5.html#PATH">path</a>&gt; in the <em class="parameter"><code>[printers]</code></em> section)? These <em class="parameter"><code>must</code></em> be different. Set <em class="parameter"><code>RequestRoot
     3082/var/spool/cups/</code></em> in <code class="filename">cupsd.conf</code> and <a class="link" href="smb.conf.5.html#PATH">path =
     3083/var/spool/samba</a> in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>. Otherwise,
    30843084cupsd will sanitize permissions to its spool directory with each restart and printing will not work reliably.
    3085 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408477"></a>Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</h3></div></div></div><p>
     3085</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id432090"></a>Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</h3></div></div></div><p>
    30863086In this case a print queue called &#8220;<span class="quote">lp</span>&#8221; intermittently swallows jobs and
    30873087spits out completely different ones from what was sent.
    30883088</p><p>
    3089 <a class="indexterm" name="id408496"></a>
    3090 <a class="indexterm" name="id408503"></a>
    3091 <a class="indexterm" name="id408510"></a>
     3089<a class="indexterm" name="id432109"></a>
     3090<a class="indexterm" name="id432115"></a>
     3091<a class="indexterm" name="id432122"></a>
    30923092It is a bad idea to name any printer &#8220;<span class="quote">lp</span>&#8221;. This is the traditional UNIX name for the default
    30933093printer. CUPS may be set up to do an automatic creation of Implicit Classes. This means, to group all printers
     
    30983098<em class="replaceable"><code>printername@cupshost</code></em>, which gives you better control over what may happen in a
    30993099large networked environment.
    3100 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id408540"></a>Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</h3></div></div></div><p>
     3100</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id432153"></a>Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</h3></div></div></div><p>
    31013101Use <code class="literal">smbclient</code> to connect to any Windows box with a shared PostScript printer:
    31023102<code class="literal">smbclient //windowsbox/print\$ -U guest</code>. You can navigate to the
     
    31043104<code class="filename">WIN40/0</code> to do the same.  Another option is to download the <code class="filename">*.exe</code>
    31053105packaged files from the Adobe Web site.
    3106 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id408591"></a>Overview of the CUPS Printing Processes</h2></div></div></div><p>
    3107 A complete overview of the CUPS printing processes can be found in <a href="CUPS-printing.html#a_small" title="Figure 22.19. CUPS Printing Overview.">the CUPS
     3106</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id432204"></a>Overview of the CUPS Printing Processes</h2></div></div></div><p>
     3107A complete overview of the CUPS printing processes can be found in <a class="link" href="CUPS-printing.html#a_small" title="Figure 22.19. CUPS Printing Overview.">the CUPS
    31083108Printing Overview diagram</a>.
    3109 </p><div class="figure"><a name="a_small"></a><p class="title"><b>Figure 22.19. CUPS Printing Overview.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/a_small.png" width="243" alt="CUPS Printing Overview."></div></div></div><br class="figure-break"></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id398861" href="#id398861">6</a>] </sup>See also <a href="http://www.cups.org/cups-help.html" target="_top">http://www.cups.org/cups-help.html</a></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. Classical Printing Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. Stackable VFS modules</td></tr></table></div></body></html>
     3109</p><div class="figure"><a name="a_small"></a><p class="title"><b>Figure 22.19. CUPS Printing Overview.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/a_small.png" width="243" alt="CUPS Printing Overview."></div></div></div><br class="figure-break"></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id422411" href="#id422411" class="para">6</a>] </sup>See also <a class="ulink" href="http://www.cups.org/cups-help.html" target="_top">http://www.cups.org/cups-help.html</a></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. Classical Printing Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. Stackable VFS modules</td></tr></table></div></body></html>
Note: See TracChangeset for help on using the changeset viewer.