Ignore:
Timestamp:
May 27, 2009, 9:08:03 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.8 docs

File:
1 edited

Legend:

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

    r226 r231  
    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.1"><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#id2625955">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2625960">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2626020">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2626139">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2626254">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2626501">Simple <code class="filename">smb.conf</code> Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2626746">More Complex CUPS <code class="filename">smb.conf</code> Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2627122">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2627140">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#id2627190">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2627425">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#id2627712">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2627834">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#id2628025">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2628203">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#id2628562">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2628716">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2628799">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2628918">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2628958">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2629194">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2629622">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2629829">Filtering  Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2629986">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2630173">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2630341">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2630611">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2630695">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2630915">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631254">The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631489">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631502"><code class="filename">mime.convs</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631571">&#8220;<span class="quote">Raw</span>&#8221; Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631679">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2631958">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2632241"><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#id2632578">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633006">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633129">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2633224">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2633241">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633303">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633375">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2633480">Network Printing (Windows Clients and UNIX/Samba Print
    2 Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2633498">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633689">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2633768">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2633858">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633902">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2633970">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2633985">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#id2634023">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634041">CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634084">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#id2634171">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2634194"><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634292">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#id2634572">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#id2634811">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634930">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634955">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635017">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635317">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635535">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635675">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635867">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636011">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636133">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636214">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636295">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#id2636530">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2636704">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636876">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636981">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637113">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637337">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638296">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2638439">The Printing <code class="filename">*.tdb</code> Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2638642">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638709">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638775">Losing <code class="filename">*.tdb</code> Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638826">Using <code class="literal">tdbbackup</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2638946">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2639121">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2639948">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640421">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2640456">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640510">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640551">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640692">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640836">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640902">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640942">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640956">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2641173">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2641249">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641334">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641472">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2641520">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2641816">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2641927">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2641933">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#id2642010">&#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#id2642048">&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642122">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642146">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642237">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642289">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642326">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#id2642362">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642397">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642430">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642471">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642496">Windows XP SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642543">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#id2642826">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642881"><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642931">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#id2643029">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#id2643098">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#id2643152">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="id2625955"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2625960"></a>Features and Benefits</h3></div></div></div><p>
    5 <a class="indexterm" name="id2625968"></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.74.0"><link rel="home" 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="orgname">Danka Deutschland GmbH </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="orgname">The Samba Team</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#id2632918">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2632924">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2632984">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2633103">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2633218">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633467">Simple smb.conf Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2633711">More Complex CUPS smb.conf Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2634088">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2634106">Central Spooling vs. Peer-to-Peer Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634156">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634391">Installation of Windows Client Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-raw">Explicitly Enable raw Printing for application/octet-stream</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2634678">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2634800">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#id2634992">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635170">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#id2635529">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635683">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635766">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2635886">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2635925">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2636161">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636590">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636798">Filtering  Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2636955">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637143">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637311">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637580">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637665">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2637884">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638223">The Role of cupsomatic/foomatic</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638458">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638471">mime.convs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638540">Raw Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638648">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2638927">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2639210">cupsomatic/foomatic-rip Versus Native CUPS Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2639547">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2639975">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640098">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640193">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2640209">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640271">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640343">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640448">Network Printing (Windows Clients and UNIX/Samba Print
     2Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2640466">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640656">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640735">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2640826">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640870">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2640938">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2640953">Printer Drivers Running in Kernel Mode Cause Many
     3Problems</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2640991">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641009">CUPS: A Magical Stone?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641052">PostScript Drivers with No Major Problems, Even in Kernel
     4Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2641139">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2641162">cupsaddsmb: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641260">Prepare Your smb.conf for cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641541">CUPS PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641780">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641899">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641924">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2641987">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642286">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642504">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642644">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642836">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2642980">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2643102">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2643183">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2643264">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#id2643499">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2643673">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2643845">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2643950">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2644082">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2644307">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2645265">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2645408">The Printing *.tdb Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2645611">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2645679">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2645745">Losing *.tdb Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2645796">Using tdbbackup</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2645915">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2646091">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2646918">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2647391">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2647427">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647481">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647521">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647662">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647807">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647873">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2647913">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2647927">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2648144">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2648220">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2648305">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2648444">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2648491">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2648787">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id2648899">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id2648904">Windows 9x/Me Client Can't Install Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#root-ask-loop">cupsaddsmb Keeps Asking for Root Password in Never-ending Loop</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2648981">cupsaddsmb or rpcclient addriver Emit Error</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649019">cupsaddsmb Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649093">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649118">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649209">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649260">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649298">Can't Use cupsaddsmb on Samba Server, Which Is a PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649333">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649368">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649401">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649442">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649468">Windows XP SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649514">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#id2649797">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649853">cupsaddsmb Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2649902">Permissions on /var/spool/samba/ Get Reset After Each Reboot</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2650001">Print Queue Called lp Mishandles Print Jobs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id2650070">Location of Adobe PostScript Driver Files for cupsaddsmb</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id2650124">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="id2632918"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2632924"></a>Features and Benefits</h3></div></div></div><p>
     5<a class="indexterm" name="id2632932"></a>
    66                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
     
    1212                that is also relevant to CUPS.
    1313                </p><p>
    14 <a class="indexterm" name="id2626003"></a>
     14<a class="indexterm" name="id2632967"></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="id2626020"></a>Overview</h3></div></div></div><p>
    21 <a class="indexterm" name="id2626028"></a>
    22 <a class="indexterm" name="id2626035"></a>
    23 <a class="indexterm" name="id2626042"></a>
    24 <a class="indexterm" name="id2626049"></a>
    25 <a class="indexterm" name="id2626056"></a>
    26 <a class="indexterm" name="id2626065"></a>
    27 <a class="indexterm" name="id2626075"></a>
    28 <a class="indexterm" name="id2626081"></a>
     20                </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2632984"></a>Overview</h3></div></div></div><p>
     21<a class="indexterm" name="id2632991"></a>
     22<a class="indexterm" name="id2632998"></a>
     23<a class="indexterm" name="id2633005"></a>
     24<a class="indexterm" name="id2633012"></a>
     25<a class="indexterm" name="id2633019"></a>
     26<a class="indexterm" name="id2633029"></a>
     27<a class="indexterm" name="id2633038"></a>
     28<a class="indexterm" name="id2633045"></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
     
    3434        like KDE's overwhelming <a class="ulink" href="http://printing.kde.org/" target="_top">KDEPrint</a>).
    3535        </p><p>
    36 <a class="indexterm" name="id2626107"></a>
    37 <a class="indexterm" name="id2626114"></a>
     36<a class="indexterm" name="id2633071"></a>
     37<a class="indexterm" name="id2633078"></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="id2626139"></a>Basic CUPS Support Configuration</h2></div></div></div><p>
    44 <a class="indexterm" name="id2626147"></a>
    45 <a class="indexterm" name="id2626154"></a>
    46 <a class="indexterm" name="id2626160"></a>
    47 <a class="indexterm" name="id2626167"></a>
    48 <a class="indexterm" name="id2626174"></a>
     43        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633103"></a>Basic CUPS Support Configuration</h2></div></div></div><p>
     44<a class="indexterm" name="id2633111"></a>
     45<a class="indexterm" name="id2633118"></a>
     46<a class="indexterm" name="id2633124"></a>
     47<a class="indexterm" name="id2633131"></a>
     48<a class="indexterm" name="id2633138"></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="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
     50parameters: <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = cups</a> and <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">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
     
    5656cupsd.conf</code> and other CUPS-related documentation, like the wealth of documents regarding the CUPS
    5757server 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="id2626254"></a>Linking smbd with libcups.so</h3></div></div></div><p>
    59 <a class="indexterm" name="id2626262"></a>
     58        </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633218"></a>Linking smbd with libcups.so</h3></div></div></div><p>
     59<a class="indexterm" name="id2633226"></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="id2626288"></a>
    67 <a class="indexterm" name="id2626294"></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>
     66<a class="indexterm" name="id2633251"></a>
     67<a class="indexterm" name="id2633258"></a>
     68        When Samba is compiled and linked with <code class="filename">libcups</code>, <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">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="id2626365"></a>
     82<a class="indexterm" name="id2633329"></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="link" href="smb.conf.5.html#PRINTING">printing = sysv</a>. However, you will lose all the benefits
     88        <a class="link" href="smb.conf.5.html#PRINTING" target="_top">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="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="id2626501"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p>
     91        <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a>; other commands are
     92        <a class="link" href="smb.conf.5.html#LPPAUSECOMMAND" target="_top">lppause command</a>,
     93        <a class="link" href="smb.conf.5.html#LPRESUMECOMMAND" target="_top">lpresume command</a>,
     94        <a class="link" href="smb.conf.5.html#LPQCOMMAND" target="_top">lpq command</a>,
     95        <a class="link" href="smb.conf.5.html#LPRMCOMMAND" target="_top">lprm command</a>,
     96        <a class="link" href="smb.conf.5.html#QUEUEPAUSECOMMAND" target="_top">queuepause command</a> and
     97        <a class="link" href="smb.conf.5.html#QUEUERESUMECOMMAND" target="_top">queue resume command</a>).
     98        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633467"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p>
    9999        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="id2626561"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2626573"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2626584"></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="id2626605"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2626617"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2626628"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2626640"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2626652"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2626663"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2626675"></a><em class="parameter"><code>printer admin = root, @ntadmins, @smbprintadm</code></em></td></tr></table></div></div><br class="example-break"><p>
    103 <a class="indexterm" name="id2626690"></a>
    104 <a class="indexterm" name="id2626697"></a>
    105 <a class="indexterm" name="id2626704"></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="id2633527"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633538"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2633550"></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="id2633571"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2633583"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2633594"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2633606"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633618"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2633629"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633641"></a><em class="parameter"><code>printer admin = root, @ntadmins, @smbprintadm</code></em></td></tr></table></div></div><br class="example-break"><p>
     103<a class="indexterm" name="id2633656"></a>
     104<a class="indexterm" name="id2633663"></a>
     105<a class="indexterm" name="id2633670"></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="id2626746"></a>More Complex CUPS <code class="filename">smb.conf</code> Settings</h3></div></div></div><p>
     115        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633711"></a>More Complex CUPS <code class="filename">smb.conf</code> Settings</h3></div></div></div><p>
    116116        <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="id2626803"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2626814"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2626826"></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="id2626847"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2626858"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2626870"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2626882"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2626893"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2626905"></a><em class="parameter"><code>printer admin = root, @ntadmins, @smbprintadm</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="id2626926"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id2626938"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id2626950"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id2626962"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id2626973"></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="id2626990"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id2627002"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2627013"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2627025"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id2627037"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id2627048"></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="id2633768"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2633779"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2633791"></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="id2633812"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2633824"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2633835"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633847"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2633858"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633870"></a><em class="parameter"><code>printer admin = root, @ntadmins, @smbprintadm</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="id2633891"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id2633904"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id2633915"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id2633927"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id2633939"></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="id2633955"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id2633967"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2633978"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2633990"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id2634002"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id2634014"></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="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),
     122        <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">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="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="id2627122"></a>Advanced Configuration</h2></div></div></div><p>
     125        <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = sysv</a> and <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">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="id2634088"></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="id2627140"></a>Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</h3></div></div></div><p>
    131 <a class="indexterm" name="id2627151"></a>
    132         <a class="indexterm" name="id2627158"></a>
    133         <a class="indexterm" name="id2627167"></a>
     130        </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634106"></a>Central Spooling vs. &#8220;<span class="quote">Peer-to-Peer</span>&#8221; Printing</h3></div></div></div><p>
     131<a class="indexterm" name="id2634117"></a>
     132        <a class="indexterm" name="id2634124"></a>
     133        <a class="indexterm" name="id2634133"></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="id2627190"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p>
    142         <a class="indexterm" name="id2627199"></a>
    143         <a class="indexterm" name="id2627205"></a>
     141        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634156"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p>
     142        <a class="indexterm" name="id2634165"></a>
     143        <a class="indexterm" name="id2634171"></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="id2627227"></a>
    153 <a class="indexterm" name="id2627234"></a>
     152<a class="indexterm" name="id2634193"></a>
     153<a class="indexterm" name="id2634200"></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="id2627258"></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="id2627270"></a>
     167        </p><div class="procedure"><a name="id2634224"></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="id2634236"></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="id2627297"></a>
     175<a class="indexterm" name="id2634263"></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="link" href="smb.conf.5.html#USECLIENTDRIVER">use client driver = Yes</a>,
     184                <a class="link" href="smb.conf.5.html#USECLIENTDRIVER" target="_top">use client driver = Yes</a>,
    185185                and in the <code class="constant">[global]</code> section add
    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>.
     186                <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = CUPS</a>, plus
     187                <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">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="id2627425"></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="id2634391"></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="id2627455"></a>
     203        <a class="indexterm" name="id2634421"></a>
    204204                        Deposit and prepare the drivers (for later download) on
    205205                        the print server (Samba); this enables the clients to use
     
    212212        are used accidentally.
    213213        </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>
    214         <a class="indexterm" name="id2627501"></a>
    215         <a class="indexterm" name="id2627508"></a>
    216         <a class="indexterm" name="id2627515"></a>
     214        <a class="indexterm" name="id2634467"></a>
     215        <a class="indexterm" name="id2634474"></a>
     216        <a class="indexterm" name="id2634481"></a>
    217217        If you use the first option (drivers are installed on the client
    218218        side), there is one setting to take care of: CUPS needs to be told
     
    226226application/octet-stream
    227227</pre><p>
    228         <a class="indexterm" name="id2627570"></a>
    229         <a class="indexterm" name="id2627577"></a>
     228        <a class="indexterm" name="id2634536"></a>
     229        <a class="indexterm" name="id2634543"></a>
    230230        In <code class="filename">/etc/cups/mime.convs</code>, have this line:
    231         <a class="indexterm" name="id2627590"></a>
     231        <a class="indexterm" name="id2634556"></a>
    232232</p><pre class="programlisting">
    233233application/octet-stream   application/vnd.cups-raw   0   -
     
    240240        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.
    241241        </p></div><p><b>Background. </b>
    242         <a class="indexterm" name="id2627654"></a>
    243 <a class="indexterm" name="id2627661"></a>
     242        <a class="indexterm" name="id2634620"></a>
     243<a class="indexterm" name="id2634627"></a>
    244244        That CUPS is a more security-aware printing system than traditional ones does not by default allow a user to
    245245        send deliberate (possibly binary) data to printing devices. This could be easily abused to launch a
     
    255255        more advanced CUPS/Samba printing, simply skip the remaining sections
    256256        of this chapter.
    257         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2627712"></a>Driver Upload Methods</h3></div></div></div><p>
     257        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634678"></a>Driver Upload Methods</h3></div></div></div><p>
    258258        This section describes three familiar methods, plus one new one, by which
    259259        printer drivers may be uploaded.
    260260        </p><p>
    261         <a class="indexterm" name="id2627726"></a>
     261        <a class="indexterm" name="id2634692"></a>
    262262        If you want to use the MS-RPC-type printing, you must upload the
    263263        drivers onto the Samba server first (<em class="parameter"><code>[print$]</code></em>
     
    268268        three methods of preparing the client drivers on the Samba server:
    269269        </p><div class="itemizedlist"><ul type="disc"><li><p>
    270                 <a class="indexterm" name="id2627763"></a>
     270                <a class="indexterm" name="id2634729"></a>
    271271                The GUI, &#8220;<span class="quote">Add Printer Wizard</span>&#8221; <span class="emphasis"><em>upload-from-a-Windows-client</em></span> method.
    272272                </p></li><li><p>
    273273                The command line, &#8220;<span class="quote">smbclient/rpcclient</span>&#8221; upload-from-a-UNIX-workstation method.
    274274                </p></li><li><p>
    275                 <a class="indexterm" name="id2627791"></a>
     275                <a class="indexterm" name="id2634757"></a>
    276276                The Imprints tool set method.
    277277                </p></li></ul></div><p>
    278 <a class="indexterm" name="id2627803"></a>
     278<a class="indexterm" name="id2634769"></a>
    279279        These three methods apply to CUPS all the same. The <code class="literal">cupsaddsmb</code> utility is a new and more
    280280        convenient way to load the Windows drivers into Samba and is provided if you use CUPS.
     
    282282        <code class="literal">cupsaddsmb</code> is discussed in much detail later in this chapter. But we first
    283283        explore the CUPS filtering system and compare the Windows and UNIX printing architectures.
    284         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2627834"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p>
    285         <a class="indexterm" name="id2627842"></a>
     284        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2634800"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p>
     285        <a class="indexterm" name="id2634808"></a>
    286286        We now know how to set up a &#8220;<span class="quote">dump</span>&#8221; print server, that is, a server that spools
    287287        print jobs &#8220;<span class="quote">raw</span>&#8221;, leaving the print data untouched.
    288288        </p><p>
    289289        You might need to set up CUPS in a smarter way. The reasons could be manifold:
    290         </p><a class="indexterm" name="id2627866"></a><a class="indexterm" name="id2627873"></a><a class="indexterm" name="id2627880"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which
     290        </p><a class="indexterm" name="id2634832"></a><a class="indexterm" name="id2634839"></a><a class="indexterm" name="id2634846"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which
    291291        printer did how many pages? What was the average data size of a job?
    292292        What was the average print run per day? What are the typical hourly
     
    304304        CUPS filtering system, how it works, and how you can tweak it.
    305305        </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>
    306         <a class="indexterm" name="id2627950"></a>
    307         <a class="indexterm" name="id2627956"></a>
     306        <a class="indexterm" name="id2634915"></a>
     307        <a class="indexterm" name="id2634922"></a>
    308308        Network printing is one of the most complicated and error-prone
    309309        day-to-day tasks any user or administrator may encounter. This is
    310310        true for all OS platforms, and there are reasons it is so.
    311311        </p><p>
    312         <a class="indexterm" name="id2627970"></a>
    313         <a class="indexterm" name="id2627976"></a>
    314 <a class="indexterm" name="id2627983"></a>
    315 <a class="indexterm" name="id2627990"></a>
    316 <a class="indexterm" name="id2627996"></a>
     312        <a class="indexterm" name="id2634935"></a>
     313        <a class="indexterm" name="id2634942"></a>
     314<a class="indexterm" name="id2634949"></a>
     315<a class="indexterm" name="id2634956"></a>
     316<a class="indexterm" name="id2634963"></a>
    317317        You can't expect to throw just any file format at a printer and have it get printed. A file format conversion
    318318        must take place. The problem is that there is no common standard for print file formats across all
     
    321321        used page description languages (PDLs), there are still many manufacturers who &#8220;<span class="quote">roll their own</span>&#8221;
    322322        (their reasons may be unacceptable license fees for using printer-embedded PostScript interpreters, and so on).
    323         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628025"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p>
    324         <a class="indexterm" name="id2628033"></a>
    325         <a class="indexterm" name="id2628040"></a>
    326         <a class="indexterm" name="id2628046"></a>
    327 <a class="indexterm" name="id2628053"></a>
     323        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634992"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p>
     324        <a class="indexterm" name="id2635000"></a>
     325        <a class="indexterm" name="id2635006"></a>
     326        <a class="indexterm" name="id2635013"></a>
     327<a class="indexterm" name="id2635020"></a>
    328328        In Windows OS, the format conversion job is done by the printer drivers. On MS Windows OS platforms all
    329329        application programmers have at their disposal a built-in API, the graphical device interface (GDI), as part
     
    336336        driver and converted to the printer-specific file format.
    337337        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    338         <a class="indexterm" name="id2628089"></a>
    339 <a class="indexterm" name="id2628095"></a>
    340 <a class="indexterm" name="id2628102"></a>
     338        <a class="indexterm" name="id2635055"></a>
     339<a class="indexterm" name="id2635062"></a>
     340<a class="indexterm" name="id2635069"></a>
    341341        To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation
    342         for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id2628112"></a> <a class="indexterm" name="id2628119"></a>
    343         <a class="indexterm" name="id2628126"></a> <a class="indexterm" name="id2628132"></a> systems.
     342        for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id2635079"></a> <a class="indexterm" name="id2635086"></a>
     343        <a class="indexterm" name="id2635093"></a> <a class="indexterm" name="id2635099"></a> systems.
    344344        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.
    345345        </p></div><p>
    346346        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
    347347        printing.
    348         </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="id2628203"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p>
    349         <a class="indexterm" name="id2628211"></a>
    350         <a class="indexterm" name="id2628218"></a>
    351         <a class="indexterm" name="id2628225"></a>
    352         <a class="indexterm" name="id2628232"></a>
     348        </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="id2635170"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p>
     349        <a class="indexterm" name="id2635179"></a>
     350        <a class="indexterm" name="id2635186"></a>
     351        <a class="indexterm" name="id2635192"></a>
     352        <a class="indexterm" name="id2635199"></a>
    353353        In UNIX and Linux, there is no comparable layer built into the OS kernel(s) or the X (screen display) server.
    354354        Every application is responsible for itself to create its print output. Fortunately, most use PostScript and
     
    364364        your system; there are separate ones for fonts used for X display and fonts to be used on paper.
    365365        </p><p><b>Background. </b>
    366         <a class="indexterm" name="id2628282"></a>
    367 <a class="indexterm" name="id2628289"></a>
    368 <a class="indexterm" name="id2628295"></a>
    369 <a class="indexterm" name="id2628302"></a>
    370 <a class="indexterm" name="id2628309"></a>
    371 <a class="indexterm" name="id2628316"></a>
    372 <a class="indexterm" name="id2628323"></a>
    373 <a class="indexterm" name="id2628329"></a>
    374 <a class="indexterm" name="id2628336"></a>
    375 <a class="indexterm" name="id2628343"></a>
     366        <a class="indexterm" name="id2635249"></a>
     367<a class="indexterm" name="id2635256"></a>
     368<a class="indexterm" name="id2635263"></a>
     369<a class="indexterm" name="id2635269"></a>
     370<a class="indexterm" name="id2635276"></a>
     371<a class="indexterm" name="id2635283"></a>
     372<a class="indexterm" name="id2635290"></a>
     373<a class="indexterm" name="id2635297"></a>
     374<a class="indexterm" name="id2635304"></a>
     375<a class="indexterm" name="id2635310"></a>
    376376        The PostScript programming language is an &#8220;<span class="quote">invention</span>&#8221; by Adobe, but its specifications have been
    377377        published extensively. Its strength lies in its powerful abilities to describe graphical objects (fonts,
     
    385385        program or on paper by a printer.
    386386        </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>
    387         <a class="indexterm" name="id2628393"></a>
    388         <a class="indexterm" name="id2628400"></a>
    389         <a class="indexterm" name="id2628409"></a>
    390 <a class="indexterm" name="id2628418"></a>
    391 <a class="indexterm" name="id2628425"></a>
     387        <a class="indexterm" name="id2635360"></a>
     388        <a class="indexterm" name="id2635367"></a>
     389        <a class="indexterm" name="id2635376"></a>
     390<a class="indexterm" name="id2635385"></a>
     391<a class="indexterm" name="id2635392"></a>
    392392        So UNIX is lacking a common ground for printing on paper and displaying on screen. Despite this unfavorable
    393393        legacy for UNIX, basic printing is fairly easy if you have PostScript printers at your disposal. The reason is
     
    398398        different than PostScript printing a file from a Windows origin.
    399399        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    400         <a class="indexterm" name="id2628454"></a>
    401 <a class="indexterm" name="id2628461"></a>
    402 <a class="indexterm" name="id2628467"></a>
     400        <a class="indexterm" name="id2635421"></a>
     401<a class="indexterm" name="id2635428"></a>
     402<a class="indexterm" name="id2635435"></a>
    403403        Traditional UNIX programs and printing systems  while using PostScript  are largely not
    404404        PPD-aware. PPDs are &#8220;<span class="quote">PostScript Printer Description</span>&#8221; files. They enable you to specify and
     
    407407        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>.
    408408        </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>
    409         <a class="indexterm" name="id2628546"></a>
     409        <a class="indexterm" name="id2635513"></a>
    410410        However, there are other types of printers out there. These do not know how to print PostScript. They use
    411411        their own PDL, often proprietary. To print to them is much more demanding. Since your UNIX applications mostly
    412412        produce PostScript, and since these devices do not understand PostScript, you need to convert the print files
    413413        to a format suitable for your printer on the host before you can send it away.
    414         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628562"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p>
    415         <a class="indexterm" name="id2628570"></a>
     414        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635529"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p>
     415        <a class="indexterm" name="id2635538"></a>
    416416        Here is where Ghostscript kicks in. Ghostscript is the traditional (and quite powerful) PostScript interpreter
    417417        used on UNIX platforms. It is a RIP in software, capable of doing a <span class="emphasis"><em>lot</em></span> of file format
     
    420420        <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>.
    421421        </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>
    422 <a class="indexterm" name="id2628641"></a>
    423 <a class="indexterm" name="id2628648"></a>
    424 <a class="indexterm" name="id2628654"></a>
     422<a class="indexterm" name="id2635609"></a>
     423<a class="indexterm" name="id2635615"></a>
     424<a class="indexterm" name="id2635622"></a>
    425425        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
    426426        version. If you specify a parameter of <em class="parameter"><code>-sDEVICE=png256</code></em> on your Ghostscript command
     
    430430        initially put under the &#8220;<span class="quote">AFPL</span>&#8221; license, but re-released under the GNU GPL as soon as the next
    431431        AFPL version appears. GNU Ghostscript is probably the version installed on most Samba systems. But it has some
    432         deficiencies.  <a class="indexterm" name="id2628693"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript,
     432        deficiencies.  <a class="indexterm" name="id2635660"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript,
    433433        with lots of bug-fixes, additional devices, and improvements. It is jointly maintained by developers from
    434434        CUPS, Gutenprint, MandrakeSoft, SuSE, Red Hat, and Debian. It includes the &#8220;<span class="quote">cups</span>&#8221; device
    435435        (essential to print to non-PS printers from CUPS).
    436         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628716"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p>
    437         <a class="indexterm" name="id2628724"></a>
    438 <a class="indexterm" name="id2628731"></a>
    439 <a class="indexterm" name="id2628737"></a>
     436        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635683"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p>
     437        <a class="indexterm" name="id2635692"></a>
     438<a class="indexterm" name="id2635698"></a>
     439<a class="indexterm" name="id2635705"></a>
    440440        While PostScript in essence is a PDL to represent the page layout in a device-independent way, real-world
    441441        print jobs are always ending up being output on hardware with device-specific features. To take care of all
     
    459459        file created by the driver.
    460460        </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    461         <a class="indexterm" name="id2628777"></a>
    462 <a class="indexterm" name="id2628784"></a>
     461        <a class="indexterm" name="id2635745"></a>
     462<a class="indexterm" name="id2635751"></a>
    463463        A PostScript file that was created to contain device-specific commands
    464464        for achieving a certain print job output (e.g., duplexed, stapled, and
     
    466466        may not be printable at all on other models; it also may not be fit
    467467        for further processing by software (e.g., by a PDF distilling program).
    468         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628799"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p>
    469 <a class="indexterm" name="id2628807"></a>
    470 <a class="indexterm" name="id2628814"></a>
    471 <a class="indexterm" name="id2628820"></a>
     468        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635766"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p>
     469<a class="indexterm" name="id2635774"></a>
     470<a class="indexterm" name="id2635781"></a>
     471<a class="indexterm" name="id2635788"></a>
    472472        CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if
    473473        a vendor does not mention our favorite OS in his or her manuals and brochures, you can safely trust this:
     
    480480        first pit stops.
    481481        </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    482         <a class="indexterm" name="id2628860"></a>
    483         <a class="indexterm" name="id2628867"></a>
     482        <a class="indexterm" name="id2635828"></a>
     483        <a class="indexterm" name="id2635834"></a>
    484484        For real PostScript printers, <span class="emphasis"><em>do not</em></span> use the <span class="emphasis"><em>Foomatic</em></span> or
    485485        <span class="emphasis"><em>cupsomatic</em></span> PPDs from Linuxprinting.org. With these devices, the original vendor-provided
    486486        PPDs are always the first choice.
    487487        </p></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    488 <a class="indexterm" name="id2628892"></a>
     488<a class="indexterm" name="id2635859"></a>
    489489        If you are looking for an original vendor-provided PPD of a specific device, and you know that an NT4 box (or
    490490        any other Windows box) on your LAN has the PostScript driver installed, just use <code class="literal">smbclient
    491491        //NT4-box/print\$ -U username</code> to access the Windows directory where all printer driver files are
    492492        stored. First look in the <code class="filename">W32X86/2</code> subdirectory for the PPD you are seeking.
    493         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628918"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p>
    494 <a class="indexterm" name="id2628927"></a>
    495 <a class="indexterm" name="id2628934"></a>
    496 <a class="indexterm" name="id2628940"></a>
     493        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635886"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p>
     494<a class="indexterm" name="id2635894"></a>
     495<a class="indexterm" name="id2635901"></a>
     496<a class="indexterm" name="id2635908"></a>
    497497        CUPS also uses specially crafted PPDs to handle non-PostScript printers. These PPDs are usually not available
    498498        from the vendors (and no, you can't just take the PPD of a PostScript printer with the same model name and
    499499        hope it works for the non-PostScript version too). To understand how these PPDs work for non-PS printers, we
    500500        first need to dive deeply into the CUPS filtering and file format conversion architecture. Stay tuned.
    501         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2628958"></a>The CUPS Filtering Architecture</h2></div></div></div><p>
    502 <a class="indexterm" name="id2628966"></a>
    503 <a class="indexterm" name="id2628973"></a>
    504 <a class="indexterm" name="id2628980"></a>
    505 <a class="indexterm" name="id2628986"></a>
    506 <a class="indexterm" name="id2628993"></a>
     501        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2635925"></a>The CUPS Filtering Architecture</h2></div></div></div><p>
     502<a class="indexterm" name="id2635934"></a>
     503<a class="indexterm" name="id2635940"></a>
     504<a class="indexterm" name="id2635947"></a>
     505<a class="indexterm" name="id2635954"></a>
     506<a class="indexterm" name="id2635961"></a>
    507507The core of the CUPS filtering system is based on Ghostscript. In addition to Ghostscript, CUPS uses some
    508508other filters of its own. You (or your OS vendor) may have plugged in even more filters. CUPS handles all data
     
    515515If CUPS rasterizes a PostScript file natively to a bitmap, this is done in two stages:
    516516</p><div class="itemizedlist"><ul type="disc"><li><p>
    517 <a class="indexterm" name="id2629023"></a>
    518 <a class="indexterm" name="id2629030"></a>
     517<a class="indexterm" name="id2635991"></a>
     518<a class="indexterm" name="id2635998"></a>
    519519        The first stage uses a Ghostscript device named &#8220;<span class="quote">cups</span>&#8221;
    520520        (this is since version 1.1.15) and produces a generic raster format
    521521        called &#8220;<span class="quote">CUPS raster</span>&#8221;.
    522522        </p></li><li><p>
    523 <a class="indexterm" name="id2629050"></a>
     523<a class="indexterm" name="id2636018"></a>
    524524        The second stage uses a &#8220;<span class="quote">raster driver</span>&#8221; that converts
    525525        the generic CUPS raster to a device-specific raster.
    526526        </p></li></ul></div><p>
    527 <a class="indexterm" name="id2629067"></a>
    528 <a class="indexterm" name="id2629074"></a>
    529 <a class="indexterm" name="id2629081"></a>
     527<a class="indexterm" name="id2636035"></a>
     528<a class="indexterm" name="id2636042"></a>
     529<a class="indexterm" name="id2636048"></a>
    530530Make sure your Ghostscript version has the &#8220;<span class="quote">cups</span>&#8221; device compiled in (check with <code class="literal">gs -h |
    531531grep cups</code>). Otherwise you may encounter the dreaded <code class="computeroutput">Unable to convert file
    5325320</code> in your CUPS error_log file. To have &#8220;<span class="quote">cups</span>&#8221; as a device in your Ghostscript,
    533533you either need to patch GNU Ghostscript and recompile or use
    534 <a class="indexterm" name="id2629112"></a><a class="ulink" href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP
     534<a class="indexterm" name="id2636079"></a><a class="ulink" href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP
    535535Ghostscript. It supports not just CUPS, but 300 other devices (while GNU Ghostscript supports only about 180).
    536536Because of this broad output device support, ESP Ghostscript is the first choice for non-CUPS spoolers, too.
    537537It is now recommended by Linuxprinting.org for all spoolers.
    538538</p><p>
    539 <a class="indexterm" name="id2629134"></a>
    540 <a class="indexterm" name="id2629141"></a>
    541 <a class="indexterm" name="id2629148"></a>
    542 <a class="indexterm" name="id2629155"></a>
     539<a class="indexterm" name="id2636102"></a>
     540<a class="indexterm" name="id2636109"></a>
     541<a class="indexterm" name="id2636115"></a>
     542<a class="indexterm" name="id2636122"></a>
    543543CUPS printers may be set up to use external rendering paths. One of the most common is provided by the
    544544Foomatic/cupsomatic concept from <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a>. This
    545545uses the classical Ghostscript approach, doing everything in one step.  It does not use the
    546546&#8220;<span class="quote">cups</span>&#8221; device, but one of the many others. However, even for Foomatic/cupsomatic usage, best
    547 results and <a class="indexterm" name="id2629177"></a> broadest printer
     547results and <a class="indexterm" name="id2636145"></a> broadest printer
    548548model support is provided by ESP Ghostscript (more about Foomatic/cupsomatic, particularly the new version
    549549called now <span class="emphasis"><em>foomatic-rip</em></span>, follows).
    550 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2629194"></a>MIME Types and CUPS Filters</h3></div></div></div><p>
    551         <a class="indexterm" name="id2629202"></a>
    552         <a class="indexterm" name="id2629211"></a>
    553 <a class="indexterm" name="id2629218"></a>
    554 <a class="indexterm" name="id2629224"></a>
    555 <a class="indexterm" name="id2629231"></a>
     550</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636161"></a>MIME Types and CUPS Filters</h3></div></div></div><p>
     551        <a class="indexterm" name="id2636169"></a>
     552        <a class="indexterm" name="id2636178"></a>
     553<a class="indexterm" name="id2636185"></a>
     554<a class="indexterm" name="id2636192"></a>
     555<a class="indexterm" name="id2636199"></a>
    556556        CUPS reads the file <code class="filename">/etc/cups/mime.types</code> (and all other files carrying a
    557557        <code class="filename">*.types</code> suffix in the same directory) upon startup. These files contain the MIME type
     
    559559        man page for <code class="filename">mime.types</code> and in the comments section of the
    560560        <code class="filename">mime.types</code> file itself. A simple rule reads like this:
    561         <a class="indexterm" name="id2629268"></a>
     561        <a class="indexterm" name="id2636236"></a>
    562562</p><pre class="programlisting">
    563563application/pdf         pdf string(0,%PDF)
    564564</pre><p>
    565 <a class="indexterm" name="id2629281"></a>
    566 <a class="indexterm" name="id2629288"></a>
     565<a class="indexterm" name="id2636249"></a>
     566<a class="indexterm" name="id2636256"></a>
    567567        This means if a filename has a <code class="filename">.pdf</code> suffix or if the magic string
    568568        <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
     
    571571application/postscript  ai eps ps string(0,%!) string(0,&lt;04&gt;%!)
    572572</pre><p>
    573 <a class="indexterm" name="id2629321"></a>
    574 <a class="indexterm" name="id2629328"></a>
    575 <a class="indexterm" name="id2629335"></a>
    576 <a class="indexterm" name="id2629342"></a>
    577 <a class="indexterm" name="id2629348"></a>
    578 <a class="indexterm" name="id2629355"></a>
     573<a class="indexterm" name="id2636289"></a>
     574<a class="indexterm" name="id2636296"></a>
     575<a class="indexterm" name="id2636303"></a>
     576<a class="indexterm" name="id2636310"></a>
     577<a class="indexterm" name="id2636316"></a>
     578<a class="indexterm" name="id2636323"></a>
    579579        If the filename has one of the suffixes <code class="filename">.ai</code>, <code class="filename">.eps</code>,
    580580        <code class="filename">.ps</code>, or if the file itself starts with one of the strings <span class="emphasis"><em>%!</em></span> or
     
    582582        (<em class="parameter"><code>application/postscript</code></em>).
    583583        </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
    584 <a class="indexterm" name="id2629399"></a>
     584<a class="indexterm" name="id2636368"></a>
    585585        Don't confuse the other mime.types files your system might be using
    586586        with the one in the <code class="filename">/etc/cups/</code> directory.
    587587        </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    588 <a class="indexterm" name="id2629418"></a>
    589 <a class="indexterm" name="id2629425"></a>
    590 <a class="indexterm" name="id2629432"></a>
    591 <a class="indexterm" name="id2629439"></a>
    592 <a class="indexterm" name="id2629445"></a>
     588<a class="indexterm" name="id2636386"></a>
     589<a class="indexterm" name="id2636394"></a>
     590<a class="indexterm" name="id2636400"></a>
     591<a class="indexterm" name="id2636407"></a>
     592<a class="indexterm" name="id2636414"></a>
    593593        There is an important difference between two similar MIME types in CUPS: one is
    594594        <em class="parameter"><code>application/postscript</code></em>, the other is
     
    601601        <em class="parameter"><code>pstops</code></em> filter. pstops uses information contained in the PPD to do the transformation.
    602602        </p></div><p>
    603 <a class="indexterm" name="id2629508"></a>
    604 <a class="indexterm" name="id2629515"></a>
    605 <a class="indexterm" name="id2629521"></a>
    606 <a class="indexterm" name="id2629528"></a>
    607 <a class="indexterm" name="id2629535"></a>
    608 <a class="indexterm" name="id2629541"></a>
    609 <a class="indexterm" name="id2629548"></a>
    610 <a class="indexterm" name="id2629554"></a>
    611 <a class="indexterm" name="id2629561"></a>
    612 <a class="indexterm" name="id2629568"></a>
    613 <a class="indexterm" name="id2629575"></a>
    614 <a class="indexterm" name="id2629582"></a>
    615 <a class="indexterm" name="id2629588"></a>
    616 <a class="indexterm" name="id2629595"></a>
    617 <a class="indexterm" name="id2629602"></a>
    618 <a class="indexterm" name="id2629609"></a>
     603<a class="indexterm" name="id2636476"></a>
     604<a class="indexterm" name="id2636483"></a>
     605<a class="indexterm" name="id2636490"></a>
     606<a class="indexterm" name="id2636496"></a>
     607<a class="indexterm" name="id2636503"></a>
     608<a class="indexterm" name="id2636510"></a>
     609<a class="indexterm" name="id2636516"></a>
     610<a class="indexterm" name="id2636523"></a>
     611<a class="indexterm" name="id2636530"></a>
     612<a class="indexterm" name="id2636536"></a>
     613<a class="indexterm" name="id2636543"></a>
     614<a class="indexterm" name="id2636550"></a>
     615<a class="indexterm" name="id2636557"></a>
     616<a class="indexterm" name="id2636564"></a>
     617<a class="indexterm" name="id2636571"></a>
     618<a class="indexterm" name="id2636577"></a>
    619619        CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and
    620620        many image formats (GIF, PNG, TIFF, JPEG, Photo-CD, SUN-Raster,
    621621        PNM, PBM, SGI-RGB, and more) and their associated MIME types
    622622        with its filters.
    623         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2629622"></a>MIME Type Conversion Rules</h3></div></div></div><p>
    624         <a class="indexterm" name="id2629630"></a>
    625         <a class="indexterm" name="id2629636"></a>
    626 <a class="indexterm" name="id2629643"></a>
    627 <a class="indexterm" name="id2629650"></a>
    628 <a class="indexterm" name="id2629657"></a>
     623        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636590"></a>MIME Type Conversion Rules</h3></div></div></div><p>
     624        <a class="indexterm" name="id2636598"></a>
     625        <a class="indexterm" name="id2636605"></a>
     626<a class="indexterm" name="id2636612"></a>
     627<a class="indexterm" name="id2636619"></a>
     628<a class="indexterm" name="id2636626"></a>
    629629        CUPS reads the file <code class="filename">/etc/cups/mime.convs</code>
    630630        (and all other files named with a <code class="filename">*.convs</code>
     
    637637application/pdf         application/postscript   33   pdftops
    638638</pre><p>
    639 <a class="indexterm" name="id2629689"></a>
     639<a class="indexterm" name="id2636658"></a>
    640640        This means that the <em class="parameter"><code>pdftops</code></em> filter will take
    641641        <em class="parameter"><code>application/pdf</code></em> as input and produce
     
    643643        cost of this operation is 33 CUPS-$. The next filter is more
    644644        expensive, costing 66 CUPS-$:
    645         <a class="indexterm" name="id2629717"></a>
     645        <a class="indexterm" name="id2636686"></a>
    646646</p><pre class="programlisting">
    647647application/vnd.hp-HPGL application/postscript   66   hpgltops
    648648</pre><p>
    649 <a class="indexterm" name="id2629730"></a>
     649<a class="indexterm" name="id2636699"></a>
    650650        This is the <em class="parameter"><code>hpgltops</code></em>, which processes HP-GL
    651651        plotter files to PostScript.
    652         <a class="indexterm" name="id2629744"></a>
     652        <a class="indexterm" name="id2636713"></a>
    653653</p><pre class="programlisting">
    654654application/octet-stream
    655655</pre><p>
    656656        Here are two more examples:
    657         <a class="indexterm" name="id2629758"></a>
    658 <a class="indexterm" name="id2629765"></a>
    659 <a class="indexterm" name="id2629772"></a>
    660 <a class="indexterm" name="id2629779"></a>
     657        <a class="indexterm" name="id2636727"></a>
     658<a class="indexterm" name="id2636734"></a>
     659<a class="indexterm" name="id2636741"></a>
     660<a class="indexterm" name="id2636748"></a>
    661661</p><pre class="programlisting">
    662662application/x-shell     application/postscript   33    texttops
    663663text/plain              application/postscript   33    texttops
    664664</pre><p>
    665 <a class="indexterm" name="id2629794"></a>
     665<a class="indexterm" name="id2636762"></a>
    666666        The last two examples name the <em class="parameter"><code>texttops</code></em> filter to work on
    667667        <em class="parameter"><code>text/plain</code></em> as well as on <em class="parameter"><code>application/x-shell</code></em>. (Hint: This
    668668        differentiation is needed for the syntax highlighting feature of <em class="parameter"><code>texttops</code></em>).
    669         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2629829"></a>Filtering  Overview</h3></div></div></div><p>
    670         <a class="indexterm" name="id2629837"></a>
     669        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636798"></a>Filtering  Overview</h3></div></div></div><p>
     670        <a class="indexterm" name="id2636806"></a>
    671671        There are many more combinations named in <code class="filename">mime.convs</code>. However, you are not limited to use
    672672        the ones predefined there. You can plug in any filter you like to the CUPS framework. It must meet, or must be
     
    674674        sure it complies with what CUPS needs and put in the right lines in <code class="filename">mime.types</code> and
    675675        <code class="filename">mime.convs</code>; then it will work seamlessly inside CUPS.
    676         </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629870"></a>Filter Requirements</h4></div></div></div><p>
     676        </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2636838"></a>Filter Requirements</h4></div></div></div><p>
    677677        The &#8220;<span class="quote">CUPS requirements</span>&#8221; for filters are simple. Take filenames or <code class="filename">stdin</code> as
    678678        input and write to <code class="filename">stdout</code>. They should take these arguments:
     
    693693                        fed through <code class="filename">stdin</code>). In most cases, it is easy to
    694694                        write a simple wrapper script around existing filters to make them work with CUPS.
    695                         </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2629986"></a>Prefilters</h3></div></div></div><p>
    696         <a class="indexterm" name="id2629994"></a>
    697 <a class="indexterm" name="id2630001"></a>
    698 <a class="indexterm" name="id2630008"></a>
     695                        </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636955"></a>Prefilters</h3></div></div></div><p>
     696        <a class="indexterm" name="id2636963"></a>
     697<a class="indexterm" name="id2636970"></a>
     698<a class="indexterm" name="id2636977"></a>
    699699        As previously stated, PostScript is the central file format to any UNIX-based
    700700        printing system. From PostScript, CUPS generates raster data to feed
    701701        non-PostScript printers.
    702702        </p><p>
    703 <a class="indexterm" name="id2630021"></a>
    704 <a class="indexterm" name="id2630028"></a>
    705 <a class="indexterm" name="id2630034"></a>
    706 <a class="indexterm" name="id2630041"></a>
    707 <a class="indexterm" name="id2630048"></a>
    708 <a class="indexterm" name="id2630054"></a>
    709 <a class="indexterm" name="id2630061"></a>
    710 <a class="indexterm" name="id2630068"></a>
    711 <a class="indexterm" name="id2630075"></a>
    712 <a class="indexterm" name="id2630082"></a>
     703<a class="indexterm" name="id2636990"></a>
     704<a class="indexterm" name="id2636997"></a>
     705<a class="indexterm" name="id2637004"></a>
     706<a class="indexterm" name="id2637010"></a>
     707<a class="indexterm" name="id2637017"></a>
     708<a class="indexterm" name="id2637023"></a>
     709<a class="indexterm" name="id2637030"></a>
     710<a class="indexterm" name="id2637037"></a>
     711<a class="indexterm" name="id2637044"></a>
     712<a class="indexterm" name="id2637051"></a>
    713713        But what happens if you send one of the supported non-PS formats to print? Then CUPS runs
    714714        &#8220;<span class="quote">prefilters</span>&#8221; on these input formats to generate PostScript first. There are prefilters to create
     
    720720        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
    721721        CUPS to Form PostScript</a>.
    722         </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="id2630173"></a>pstops</h3></div></div></div><p>
    723 <a class="indexterm" name="id2630181"></a>
    724 <a class="indexterm" name="id2630188"></a>
    725 <a class="indexterm" name="id2630195"></a>
    726 <a class="indexterm" name="id2630202"></a>
    727 <a class="indexterm" name="id2630209"></a>
    728 <a class="indexterm" name="id2630216"></a>
    729 <a class="indexterm" name="id2630223"></a>
     722        </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="id2637143"></a>pstops</h3></div></div></div><p>
     723<a class="indexterm" name="id2637151"></a>
     724<a class="indexterm" name="id2637158"></a>
     725<a class="indexterm" name="id2637165"></a>
     726<a class="indexterm" name="id2637172"></a>
     727<a class="indexterm" name="id2637179"></a>
     728<a class="indexterm" name="id2637186"></a>
     729<a class="indexterm" name="id2637193"></a>
    730730        <span class="emphasis"><em>pstops</em></span> is a filter that is used to convert <em class="parameter"><code>application/postscript</code></em> to
    731731        <em class="parameter"><code>application/vnd.cups-postscript</code></em>. As stated earlier, this filter inserts all
     
    743743                </p></li><li><p>Counting the pages of the job to insert the accounting
    744744                information into the <code class="filename">/var/log/cups/page_log</code>.
    745                 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2630341"></a>pstoraster</h3></div></div></div><p>
    746 <a class="indexterm" name="id2630349"></a>
    747 <a class="indexterm" name="id2630356"></a>
    748 <a class="indexterm" name="id2630362"></a>
     745                </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2637311"></a>pstoraster</h3></div></div></div><p>
     746<a class="indexterm" name="id2637319"></a>
     747<a class="indexterm" name="id2637326"></a>
     748<a class="indexterm" name="id2637332"></a>
    749749        <em class="parameter"><code>pstoraster</code></em> is at the core of the CUPS filtering system. It is responsible for the first
    750750        stage of the rasterization process. Its input is of MIME type application/vnd.cups-postscript; its output is
     
    754754        Intermediate Raster Format diagram</a>.
    755755        </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>
    756 <a class="indexterm" name="id2630439"></a>
    757 <a class="indexterm" name="id2630446"></a>
    758 <a class="indexterm" name="id2630452"></a>
    759 <a class="indexterm" name="id2630459"></a>
     756<a class="indexterm" name="id2637408"></a>
     757<a class="indexterm" name="id2637415"></a>
     758<a class="indexterm" name="id2637422"></a>
     759<a class="indexterm" name="id2637429"></a>
    760760        CUPS raster is a generic raster format with powerful features. It is able to include per-page information,
    761761        color profiles, and more, to be used by the downstream raster drivers. Its MIME type is registered with IANA
     
    767767        Ghostscript illustration</a>.
    768768        </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>
    769 <a class="indexterm" name="id2630532"></a>
    770 <a class="indexterm" name="id2630539"></a>
    771 <a class="indexterm" name="id2630546"></a>
    772 <a class="indexterm" name="id2630552"></a>
     769<a class="indexterm" name="id2637501"></a>
     770<a class="indexterm" name="id2637508"></a>
     771<a class="indexterm" name="id2637515"></a>
     772<a class="indexterm" name="id2637522"></a>
    773773        CUPS versions before version 1.1.15 shipped a binary (or source code) standalone filter, named
    774774        <em class="parameter"><code>pstoraster</code></em>. <em class="parameter"><code>pstoraster</code></em>, which was derived from GNU Ghostscript
     
    781781        If your Ghostscript fails when this command is executed: <code class="literal">gs -h |grep cups</code>, you might not
    782782        be able to print, update your Ghostscript.
    783         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2630611"></a>imagetops and imagetoraster</h3></div></div></div><p>
    784 <a class="indexterm" name="id2630619"></a>
    785 <a class="indexterm" name="id2630626"></a>
     783        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2637580"></a>imagetops and imagetoraster</h3></div></div></div><p>
     784<a class="indexterm" name="id2637588"></a>
     785<a class="indexterm" name="id2637595"></a>
    786786        In the section about prefilters, we mentioned the prefilter
    787787        that generates PostScript from image formats. The <em class="parameter"><code>imagetoraster</code></em>
     
    790790        mentioned prefilters. We summarize in a flowchart the image file
    791791        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>.
    792         </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="id2630695"></a>rasterto [printers specific]</h3></div></div></div><p>
    793 <a class="indexterm" name="id2630704"></a>
    794 <a class="indexterm" name="id2630710"></a>
    795 <a class="indexterm" name="id2630717"></a>
    796 <a class="indexterm" name="id2630724"></a>
    797 <a class="indexterm" name="id2630731"></a>
    798 <a class="indexterm" name="id2630738"></a>
    799 <a class="indexterm" name="id2630745"></a>
    800 <a class="indexterm" name="id2630752"></a>
    801 <a class="indexterm" name="id2630759"></a>
    802 <a class="indexterm" name="id2630766"></a>
    803 <a class="indexterm" name="id2630772"></a>
     792        </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="id2637665"></a>rasterto [printers specific]</h3></div></div></div><p>
     793<a class="indexterm" name="id2637673"></a>
     794<a class="indexterm" name="id2637680"></a>
     795<a class="indexterm" name="id2637687"></a>
     796<a class="indexterm" name="id2637694"></a>
     797<a class="indexterm" name="id2637701"></a>
     798<a class="indexterm" name="id2637708"></a>
     799<a class="indexterm" name="id2637714"></a>
     800<a class="indexterm" name="id2637721"></a>
     801<a class="indexterm" name="id2637728"></a>
     802<a class="indexterm" name="id2637735"></a>
     803<a class="indexterm" name="id2637742"></a>
    804804        CUPS ships with quite a variety of raster drivers for processing CUPS raster. On my system, I find in
    805805        /usr/lib/cups/filter/ the following: <em class="parameter"><code>rastertoalps</code></em>, <em class="parameter"><code>rastertobj</code></em>,
     
    812812        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
    813813        Printer-Specific Formats illustration</a>.
    814         </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="id2630915"></a>CUPS Backends</h3></div></div></div><p>
    815 <a class="indexterm" name="id2630923"></a>
    816 <a class="indexterm" name="id2630930"></a>
     814        </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="id2637884"></a>CUPS Backends</h3></div></div></div><p>
     815<a class="indexterm" name="id2637892"></a>
     816<a class="indexterm" name="id2637899"></a>
    817817        The last part of any CUPS filtering chain is a backend. Backends
    818818        are special programs that send the print-ready file to the final
     
    888888        printer name.)
    889889        </p><p>
    890 <a class="indexterm" name="id2631210"></a>
    891 <a class="indexterm" name="id2631217"></a>
     890<a class="indexterm" name="id2638179"></a>
     891<a class="indexterm" name="id2638185"></a>
    892892        Not all of the mentioned backends may be present on your system or
    893893        usable (depending on your hardware configuration). One test for all
     
    897897        </p><pre class="screen">
    898898        <code class="prompt">$ </code><strong class="userinput"><code>lpinfo -v</code></strong>
    899         </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631254"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p>
    900         <a class="indexterm" name="id2631266"></a>
    901         <a class="indexterm" name="id2631273"></a>
    902 <a class="indexterm" name="id2631280"></a>
    903 <a class="indexterm" name="id2631287"></a>
    904 <a class="indexterm" name="id2631294"></a>
     899        </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638223"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p>
     900        <a class="indexterm" name="id2638235"></a>
     901        <a class="indexterm" name="id2638242"></a>
     902<a class="indexterm" name="id2638249"></a>
     903<a class="indexterm" name="id2638256"></a>
     904<a class="indexterm" name="id2638263"></a>
    905905        <em class="parameter"><code>cupsomatic</code></em> filters may be the most widely used on CUPS
    906906        installations. You must be clear that these were not
     
    926926        the print job.
    927927        </p><p>
    928         <a class="indexterm" name="id2631360"></a>
    929 <a class="indexterm" name="id2631367"></a>
    930 <a class="indexterm" name="id2631374"></a>
    931 <a class="indexterm" name="id2631381"></a>
    932 <a class="indexterm" name="id2631388"></a>
    933 <a class="indexterm" name="id2631395"></a>
    934 <a class="indexterm" name="id2631402"></a>
    935 <a class="indexterm" name="id2631408"></a>
    936 <a class="indexterm" name="id2631415"></a>
    937 <a class="indexterm" name="id2631422"></a>
    938 <a class="indexterm" name="id2631429"></a>
     928        <a class="indexterm" name="id2638329"></a>
     929<a class="indexterm" name="id2638336"></a>
     930<a class="indexterm" name="id2638343"></a>
     931<a class="indexterm" name="id2638350"></a>
     932<a class="indexterm" name="id2638357"></a>
     933<a class="indexterm" name="id2638364"></a>
     934<a class="indexterm" name="id2638370"></a>
     935<a class="indexterm" name="id2638377"></a>
     936<a class="indexterm" name="id2638384"></a>
     937<a class="indexterm" name="id2638391"></a>
     938<a class="indexterm" name="id2638398"></a>
    939939        However, <em class="parameter"><code>cupsomatic</code></em> is now deprecated. Its PPDs (especially the first
    940940        generation of them, still in heavy use out there) are not meeting the
     
    958958        legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR, and so on), providing
    959959        for them access to use PPDs for their printing.
    960         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631489"></a>The Complete Picture</h3></div></div></div><p>
     960        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638458"></a>The Complete Picture</h3></div></div></div><p>
    961961        If you want to see an overview of all the filters and how they
    962962        relate to each other, the complete picture of the puzzle is at the end
    963963        of this chapter.
    964         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631502"></a><code class="filename">mime.convs</code></h3></div></div></div><p>
     964        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638471"></a><code class="filename">mime.convs</code></h3></div></div></div><p>
    965965        CUPS autoconstructs all possible filtering chain paths for any given
    966966        MIME type and every printer installed. But how does it decide in
     
    972972        a total &#8220;<span class="quote">filter cost.</span>&#8221; CUPS decides for the most &#8220;<span class="quote">inexpensive</span>&#8221; route.
    973973        </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    974 <a class="indexterm" name="id2631534"></a>
    975 <a class="indexterm" name="id2631540"></a>
     974<a class="indexterm" name="id2638502"></a>
     975<a class="indexterm" name="id2638509"></a>
    976976        Setting <em class="parameter"><code>FilterLimit 1000</code></em> in
    977977        <code class="filename">cupsd.conf</code> will not allow more filters to
     
    981981        200 allows roughly one job at a time, while a FilterLimit of 1000 allows
    982982        approximately five jobs maximum at a time.
    983         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631571"></a>&#8220;<span class="quote">Raw</span>&#8221; Printing</h3></div></div></div><p>
    984 <a class="indexterm" name="id2631581"></a>
    985 <a class="indexterm" name="id2631587"></a>
    986 <a class="indexterm" name="id2631594"></a>
     983        </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638540"></a>&#8220;<span class="quote">Raw</span>&#8221; Printing</h3></div></div></div><p>
     984<a class="indexterm" name="id2638549"></a>
     985<a class="indexterm" name="id2638556"></a>
     986<a class="indexterm" name="id2638563"></a>
    987987        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
    988988        filtered. CUPS will send the file to the printer &#8220;<span class="quote">as is</span>&#8221; without bothering if the printer is able
     
    10021002        only send known MIME types (as defined in its own mime.types file) and
    10031003        refuse others.
    1004         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631679"></a>application/octet-stream Printing</h3></div></div></div><p>
    1005 <a class="indexterm" name="id2631687"></a>
    1006 <a class="indexterm" name="id2631694"></a>
     1004        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638648"></a>application/octet-stream Printing</h3></div></div></div><p>
     1005<a class="indexterm" name="id2638656"></a>
     1006<a class="indexterm" name="id2638663"></a>
    10071007        Any MIME type with no rule in the <code class="filename">/etc/cups/mime.types</code> file is regarded as unknown
    10081008        or <em class="parameter"><code>application/octet-stream</code></em> and will not be
     
    10171017        these two files:
    10181018        </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>
    1019 <a class="indexterm" name="id2631760"></a>
     1019<a class="indexterm" name="id2638728"></a>
    10201020        Both contain entries (at the end of the respective files) that must be uncommented to allow raw mode
    10211021        operation for <em class="parameter"><code>application/octet-stream</code></em>. In <code class="filename">/etc/cups/mime.types</code>
    10221022        make sure this line is present:
    1023         <a class="indexterm" name="id2631781"></a>
     1023        <a class="indexterm" name="id2638750"></a>
    10241024</p><pre class="programlisting">
    10251025application/octet-stream
     
    10321032application/octet-stream   application/vnd.cups-raw   0   -
    10331033</pre><p>
    1034         <a class="indexterm" name="id2631816"></a>
     1034        <a class="indexterm" name="id2638785"></a>
    10351035        This line tells CUPS to use the <span class="emphasis"><em>Null Filter</em></span>
    10361036        (denoted as &#8220;<span class="quote">-</span>&#8221;, doing nothing at all) on
     
    10431043        <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.
    10441044        </p></div><p><b>Background. </b>
    1045 <a class="indexterm" name="id2631883"></a>
    1046 <a class="indexterm" name="id2631890"></a>
    1047 <a class="indexterm" name="id2631897"></a>
    1048 <a class="indexterm" name="id2631904"></a>
     1045<a class="indexterm" name="id2638852"></a>
     1046<a class="indexterm" name="id2638859"></a>
     1047<a class="indexterm" name="id2638865"></a>
     1048<a class="indexterm" name="id2638872"></a>
    10491049        That CUPS is a more security-aware printing system than traditional ones
    10501050        does not by default allow one to send deliberate (possibly binary)
     
    10581058        recognizes MIME types. The file <code class="filename">/etc/cups/mime.convs</code> decides which file
    10591059        conversion filter(s) may be applied to which MIME types.
    1060         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2631958"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p>
    1061         <a class="indexterm" name="id2631966"></a>
    1062 <a class="indexterm" name="id2631973"></a>
    1063 <a class="indexterm" name="id2631980"></a>
    1064 <a class="indexterm" name="id2631987"></a>
    1065 <a class="indexterm" name="id2631993"></a>
    1066 <a class="indexterm" name="id2632000"></a>
     1060        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638927"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p>
     1061        <a class="indexterm" name="id2638935"></a>
     1062<a class="indexterm" name="id2638942"></a>
     1063<a class="indexterm" name="id2638949"></a>
     1064<a class="indexterm" name="id2638956"></a>
     1065<a class="indexterm" name="id2638962"></a>
     1066<a class="indexterm" name="id2638969"></a>
    10671067        Originally PPDs were meant to be used for PostScript printers
    10681068        only. Here, they help to send device-specific commands and settings
     
    10771077        PPDs for a non-PostScript printer have a few lines that are unique to
    10781078        CUPS. The most important one looks similar to this:
    1079         <a class="indexterm" name="id2632023"></a>
     1079        <a class="indexterm" name="id2638991"></a>
    10801080</p><pre class="programlisting">
    10811081*cupsFilter: application/vnd.cups-raster  66   rastertoprinter
     
    10951095        different paper trays, or you may get larger margins than your
    10961096        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.
    1097         </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="id2632241"></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>
    1098         <a class="indexterm" name="id2632255"></a>
    1099         <a class="indexterm" name="id2632262"></a>
     1097        </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="id2639210"></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>
     1098        <a class="indexterm" name="id2639224"></a>
     1099        <a class="indexterm" name="id2639231"></a>
    11001100        Native CUPS rasterization works in two steps:
    11011101        </p><div class="itemizedlist"><ul type="disc"><li><p>
    1102 <a class="indexterm" name="id2632276"></a>
     1102<a class="indexterm" name="id2639245"></a>
    11031103                First is the <em class="parameter"><code>pstoraster</code></em> step. It uses the special CUPS
    1104                 <a class="indexterm" name="id2632290"></a>
     1104                <a class="indexterm" name="id2639259"></a>
    11051105                device from ESP Ghostscript 7.05.x as its tool.
    11061106                </p></li><li><p>
     
    11171117        way. Note that <em class="parameter"><code>cupsomatic</code></em> is <span class="emphasis"><em>not</em></span> made by the CUPS
    11181118        developers. It is an independent contribution to printing development,
    1119         made by people from Linuxprinting.org.<sup>[<a name="id2632393" href="#ftn.id2632393" class="footnote">6</a>]</sup>
     1119        made by people from Linuxprinting.org.<sup>[<a name="id2639362" href="#ftn.id2639362" class="footnote">6</a>]</sup>
    11201120        <em class="parameter"><code>cupsomatic</code></em> is no longer developed, maintained, or supported. It now been
    11211121        replaced by <em class="parameter"><code>foomatic-rip</code></em>. <em class="parameter"><code>foomatic-rip</code></em> is a complete rewrite
     
    11251125        too.
    11261126        </p><p>
    1127         <a class="indexterm" name="id2632442"></a>
    1128         <a class="indexterm" name="id2632449"></a>
     1127        <a class="indexterm" name="id2639411"></a>
     1128        <a class="indexterm" name="id2639418"></a>
    11291129        Like the old <em class="parameter"><code>cupsomatic</code></em> method, the <em class="parameter"><code>foomatic-rip</code></em> (new) method
    11301130        from Linuxprinting.org uses the traditional Ghostscript print file processing, doing everything in a single
     
    11361136        different queues) and find out which works best for you.
    11371137        </p><p>
    1138 <a class="indexterm" name="id2632484"></a>
    1139 <a class="indexterm" name="id2632491"></a>
    1140 <a class="indexterm" name="id2632498"></a>
    1141 <a class="indexterm" name="id2632505"></a>
    1142 <a class="indexterm" name="id2632512"></a>
    1143 <a class="indexterm" name="id2632519"></a>
     1138<a class="indexterm" name="id2639453"></a>
     1139<a class="indexterm" name="id2639460"></a>
     1140<a class="indexterm" name="id2639467"></a>
     1141<a class="indexterm" name="id2639474"></a>
     1142<a class="indexterm" name="id2639481"></a>
     1143<a class="indexterm" name="id2639488"></a>
    11441144        <em class="parameter"><code>cupsomatic</code></em> kidnaps the print file after the
    11451145        <em class="parameter"><code>application/vnd.cups-postscript</code></em> stage and deviates it through the CUPS-external,
     
    11501150        CUPS</a>, illustrates the difference between native CUPS rendering and the
    11511151        <em class="parameter"><code>Foomatic/cupsomatic</code></em> method.
    1152         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2632578"></a>Examples for Filtering Chains</h3></div></div></div><p>
     1152        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2639547"></a>Examples for Filtering Chains</h3></div></div></div><p>
    11531153        Here are a few examples of commonly occurring filtering chains to
    11541154        illustrate the workings of CUPS.
    11551155        </p><p>
    1156 <a class="indexterm" name="id2632591"></a>
    1157 <a class="indexterm" name="id2632598"></a>
    1158 <a class="indexterm" name="id2632605"></a>
    1159 <a class="indexterm" name="id2632612"></a>
     1156<a class="indexterm" name="id2639560"></a>
     1157<a class="indexterm" name="id2639567"></a>
     1158<a class="indexterm" name="id2639574"></a>
     1159<a class="indexterm" name="id2639581"></a>
    11601160        Assume you want to print a PDF file to an HP JetDirect-connected
    11611161        PostScript printer, but you want to print pages 3-5, 7, and 11-13
     
    11761176        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
    11771177        illustration</a>.
    1178         </p><a class="indexterm" name="id2632722"></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>
    1179 <a class="indexterm" name="id2632772"></a>
    1180 <a class="indexterm" name="id2632779"></a>
    1181 <a class="indexterm" name="id2632786"></a>
     1178        </p><a class="indexterm" name="id2639692"></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>
     1179<a class="indexterm" name="id2639742"></a>
     1180<a class="indexterm" name="id2639749"></a>
     1181<a class="indexterm" name="id2639756"></a>
    11821182        Assume you want to print the same filter to an USB-connected Epson Stylus Photo Printer installed with the CUPS
    11831183        <code class="filename">stphoto2.ppd</code>. The first few filtering stages are nearly the same:
     
    11891189                <em class="parameter"><code>application/pdf</code></em>.
    11901190                </p></li><li><p>
    1191 <a class="indexterm" name="id2632826"></a>
    1192 <a class="indexterm" name="id2632833"></a>
     1191<a class="indexterm" name="id2639796"></a>
     1192<a class="indexterm" name="id2639802"></a>
    11931193                The file must first pass the <em class="parameter"><code>pdftops</code></em> prefilter, which produces PostScript
    11941194                MIME type <em class="parameter"><code>application/postscript</code></em> (a preview here would still show all
    11951195                pages of the original PDF).
    11961196                </p></li><li><p>
    1197 <a class="indexterm" name="id2632859"></a>
    1198 <a class="indexterm" name="id2632866"></a>
     1197<a class="indexterm" name="id2639828"></a>
     1198<a class="indexterm" name="id2639835"></a>
    11991199                The file then passes the &#8220;<span class="quote">pstops</span>&#8221; filter that applies
    12001200                the command line options: it selects the pages 2-5, 7, and 11-13,
     
    12081208                <em class="parameter"><code>application/cups-raster</code></em>.
    12091209                </p></li><li><p>
    1210 <a class="indexterm" name="id2632921"></a>
     1210<a class="indexterm" name="id2639890"></a>
    12111211                Finally, the <em class="parameter"><code>rastertoepson</code></em> filter
    12121212                does its work (as indicated in the printer's PPD), creating the
     
    12181218        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
    12191219        illustration</a>.
    1220         </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="id2633006"></a>Sources of CUPS Drivers/PPDs</h3></div></div></div><p>
     1220        </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="id2639975"></a>Sources of CUPS Drivers/PPDs</h3></div></div></div><p>
    12211221        On the Internet you can now find many thousands of CUPS-PPD files
    12221222        (with their companion filters), in many national languages
    12231223        supporting more than 1,000 non-PostScript models.
    1224         </p><div class="itemizedlist"><a class="indexterm" name="id2633021"></a><a class="indexterm" name="id2633030"></a><ul type="disc"><li><p>
     1224        </p><div class="itemizedlist"><a class="indexterm" name="id2639989"></a><a class="indexterm" name="id2639998"></a><ul type="disc"><li><p>
    12251225                <a class="ulink" href="http://www.easysw.com/printpro/" target="_top">ESP PrintPro</a>
    12261226                (commercial, non-free) is packaged with more than 3,000 PPDs, ready for
     
    12501250                (LPGL, free) from Linuxprinting.org provide PPDs for practically every Ghostscript
    12511251                filter known to the world (including Omni, Gutenprint, and HPIJS).
    1252                 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633129"></a>Printing with Interface Scripts</h3></div></div></div><p>
    1253 <a class="indexterm" name="id2633137"></a>
    1254 <a class="indexterm" name="id2633144"></a>
     1252                </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640098"></a>Printing with Interface Scripts</h3></div></div></div><p>
     1253<a class="indexterm" name="id2640106"></a>
     1254<a class="indexterm" name="id2640113"></a>
    12551255        CUPS also supports the use of &#8220;<span class="quote">interface scripts</span>&#8221; as known from
    12561256        System V AT&amp;T printing systems. These are often used for PCL
     
    12741274        <a class="ulink" href="http://playground.sun.com/printing/documentation/interface.html" target="_top">
    12751275        http://playground.sun.com/printing/documentation/interface.html</a>).
    1276         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633224"></a>Network Printing (Purely Windows)</h2></div></div></div><p>
     1276        </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2640193"></a>Network Printing (Purely Windows)</h2></div></div></div><p>
    12771277Network printing covers a lot of ground. To understand what exactly
    12781278goes on with Samba when it is printing on behalf of its Windows
    12791279clients, let's first look at a &#8220;<span class="quote">purely Windows</span>&#8221; setup: Windows clients
    12801280with a Windows NT print server.
    1281 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633241"></a>From Windows Clients to an NT Print Server</h3></div></div></div><p>
     1281</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640209"></a>From Windows Clients to an NT Print Server</h3></div></div></div><p>
    12821282Windows clients printing to an NT-based print server have two
    12831283options. They may:
    1284 <a class="indexterm" name="id2633250"></a>
    1285 <a class="indexterm" name="id2633257"></a>
     1284<a class="indexterm" name="id2640219"></a>
     1285<a class="indexterm" name="id2640226"></a>
    12861286</p><div class="itemizedlist"><ul type="disc"><li><p>Execute the driver locally and render the GDI output
    12871287                        (EMF) into the printer-specific format on their own.
     
    12921292Print Driver Execution on the Client</a>, and
    12931293<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>.
    1294 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633303"></a>Driver Execution on the Client</h3></div></div></div><p>
     1294</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640271"></a>Driver Execution on the Client</h3></div></div></div><p>
    12951295In the first case, the print server must spool the file as raw, meaning it shouldn't touch the job file and try
    12961296to convert it in any way. This is what a traditional UNIX-based print server can do too, and at a better
     
    13001300installed 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
    13011301Client diagram</a>.
    1302 </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="id2633375"></a>Driver Execution on the Server</h3></div></div></div><p>
    1303 <a class="indexterm" name="id2633383"></a>
    1304 <a class="indexterm" name="id2633390"></a>
    1305 <a class="indexterm" name="id2633396"></a>
    1306 <a class="indexterm" name="id2633403"></a>
    1307 <a class="indexterm" name="id2633409"></a>
     1302</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="id2640343"></a>Driver Execution on the Server</h3></div></div></div><p>
     1303<a class="indexterm" name="id2640351"></a>
     1304<a class="indexterm" name="id2640358"></a>
     1305<a class="indexterm" name="id2640364"></a>
     1306<a class="indexterm" name="id2640371"></a>
     1307<a class="indexterm" name="id2640377"></a>
    13081308The other path executes the printer driver on the server. The client transfers print files in EMF format to
    13091309the server. The server uses the PostScript, PCL, ESC/P, or other driver to convert the EMF file into the
     
    13131313</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>
    13141314However, something similar is possible with CUPS, so read on.
    1315 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633480"></a>Network Printing (Windows Clients and UNIX/Samba Print
     1315</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2640448"></a>Network Printing (Windows Clients and UNIX/Samba Print
    13161316Servers)</h2></div></div></div><p>
    13171317Since UNIX print servers <span class="emphasis"><em>cannot</em></span> execute the Win32
     
    13201320much. On the contrary, you may have a way here to implement printing
    13211321features that are not possible otherwise.
    1322 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633498"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div></div><p>
     1322</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640466"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div></div><p>
    13231323Here is a simple recipe showing how you can take advantage of CUPS's
    13241324powerful features for the benefit of your Windows network printing
     
    13321332First, to enable CUPS-based printing through Samba, the following options should be set in your <code class="filename">smb.conf</code>
    13331333file <em class="parameter"><code>[global]</code></em> section:
    1334 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2633552"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2633564"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p>
    1335 When 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
     1334</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2640520"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2640532"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p>
     1335When these parameters are specified, all manually set print directives (like <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a> or <a class="link" href="smb.conf.5.html#LPPAUSECOMMAND" target="_top">lppause command</a>) in <code class="filename">smb.conf</code> (as well as in Samba itself) will be
    13361336ignored. Instead, Samba will directly interface with CUPS through its application program interface (API), as
    13371337long as Samba has been compiled with CUPS library (libcups) support. If Samba has not been compiled with CUPS
    13381338support, and if no other print commands are set up, then printing will use the <span class="emphasis"><em>System V</em></span>
    13391339AT&amp;T command set, with the -oraw option automatically passing through (if you want your own defined print
    1340 commands 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
     1340commands to work with a Samba server that has CUPS support compiled in, simply use <a class="link" href="smb.conf.5.html#CLASSICALPRINTING" target="_top">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
    13411341CUPS/Samba Server diagram</a>.
    1342 </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="id2633689"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p>
    1343 Samba <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
     1342</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="id2640656"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p>
     1343Samba <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" target="_top">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
    13441344into the spool directory of CUPS (the CUPS spool directory is set by the <em class="parameter"><code>RequestRoot</code></em>
    13451345directive in a line that defaults to <em class="parameter"><code>RequestRoot /var/spool/cups</code></em>). CUPS checks the
     
    13521352allow &#8220;<span class="quote">localhost</span>&#8221; to print. If it runs on different machines, you
    13531353need to make sure the Samba host gets access to printing on CUPS.
    1354 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633768"></a>Network PostScript RIP</h2></div></div></div><p>
     1354</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2640735"></a>Network PostScript RIP</h2></div></div></div><p>
    13551355This section discusses the use of CUPS filters on the server  configuration where
    13561356clients make use of a PostScript driver with CUPS-PPDs.
    13571357</p><p>
    1358 <a class="indexterm" name="id2633785"></a>
    1359 <a class="indexterm" name="id2633791"></a>
    1360 <a class="indexterm" name="id2633798"></a>
     1358<a class="indexterm" name="id2640752"></a>
     1359<a class="indexterm" name="id2640759"></a>
     1360<a class="indexterm" name="id2640765"></a>
    13611361PPDs can control all print device options. They are usually provided by the manufacturer  if you own
    13621362a PostScript printer, that is. PPD files are always a component of PostScript printer drivers on MS Windows or
     
    13711371different GUI front-ends on Linux/UNIX, which can present PPD options to users. PPD options are normally meant
    13721372to be evaluated by the PostScript RIP on the real PostScript printer.
    1373 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633858"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p>
    1374 <a class="indexterm" name="id2633866"></a>
     1373</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640826"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p>
     1374<a class="indexterm" name="id2640834"></a>
    13751375CUPS does not limit itself to &#8220;<span class="quote">real</span>&#8221; PostScript printers in its use of PPDs. The CUPS developers
    13761376have extended the scope of the PPD concept to also describe available device and driver options for
     
    13841384devices to its clients, because it can act as a PostScript RIP for those printers, processing the received
    13851385PostScript code into a proper raster print format.
    1386 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633902"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p>
    1387 <a class="indexterm" name="id2633910"></a>
     1386</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640870"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p>
     1387<a class="indexterm" name="id2640878"></a>
    13881388CUPS-PPDs can also be used on Windows clients, on top of a &#8220;<span class="quote">core</span>&#8221; PostScript driver (now
    13891389recommended is the CUPS PostScript Driver for Windows NT/200x/XP; you can also use the Adobe one, with
     
    13991399        </p></li></ul></div><p>
    14001400Using CUPS PPDs on Windows clients enables them to control all print job settings just as a UNIX client can do.
    1401 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2633970"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div></div><p>
     1401</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2640938"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div></div><p>
    14021402This setup may be of special interest to people experiencing major problems in WTS environments. WTS often
    14031403need a multitude of non-PostScript drivers installed to run their clients' variety of different printer
    14041404models. This often imposes the price of much increased instability.
    1405 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2633985"></a>Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
     1405</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640953"></a>Printer Drivers Running in &#8220;<span class="quote">Kernel Mode</span>&#8221; Cause Many
    14061406Problems</h3></div></div></div><p>
    14071407Windows NT printer drivers, which run in &#8220;<span class="quote">kernel mode</span>&#8221;, introduce a high risk for the stability
     
    14151415one from Adobe and the one from Microsoft. Both are well-tested and are as stable as you can imagine on
    14161416Windows. The CUPS driver is derived from the Microsoft one.
    1417 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634023"></a>Workarounds Impose Heavy Limitations</h3></div></div></div><p>
     1417</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640991"></a>Workarounds Impose Heavy Limitations</h3></div></div></div><p>
    14181418In an attempt to work around problems, site administrators have resorted to restricting the
    14191419allowed drivers installed on their WTS to one generic PCL and one PostScript driver. This, however, restricts
    14201420the number of printer options available for clients to use. Often they can't get out more than simplex
    14211421prints from one standard paper tray, while their devices could do much better if driven by a different driver!
    1422 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634041"></a>CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</h3></div></div></div><p>
    1423 <a class="indexterm" name="id2634052"></a>
    1424 <a class="indexterm" name="id2634059"></a>
     1422</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641009"></a>CUPS: A &#8220;<span class="quote">Magical Stone</span>&#8221;?</h3></div></div></div><p>
     1423<a class="indexterm" name="id2641020"></a>
     1424<a class="indexterm" name="id2641027"></a>
    14251425Using a PostScript driver, enabled with a CUPS-PPD, seems to be a very elegant way to overcome all these
    14261426shortcomings. There are, depending on the version of Windows OS you use, up to three different PostScript
     
    14311431&#8220;<span class="quote">raw spooling</span>&#8221; device. Plus, this setup is not yet widely tested, although the first feedbacks
    14321432look very promising.
    1433 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634084"></a>PostScript Drivers with No Major Problems, Even in Kernel
     1433</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641052"></a>PostScript Drivers with No Major Problems, Even in Kernel
    14341434Mode</h3></div></div></div><p>
    1435 <a class="indexterm" name="id2634092"></a>
    1436 <a class="indexterm" name="id2634099"></a>
    1437 <a class="indexterm" name="id2634106"></a>
    1438 <a class="indexterm" name="id2634113"></a>
    1439 <a class="indexterm" name="id2634120"></a>
    1440 <a class="indexterm" name="id2634127"></a>
     1435<a class="indexterm" name="id2641060"></a>
     1436<a class="indexterm" name="id2641067"></a>
     1437<a class="indexterm" name="id2641074"></a>
     1438<a class="indexterm" name="id2641081"></a>
     1439<a class="indexterm" name="id2641088"></a>
     1440<a class="indexterm" name="id2641095"></a>
    14411441More recent printer drivers on W200x and XP no longer run in kernel mode (unlike Windows NT). However, both
    14421442operating systems can still use the NT drivers, running in kernel mode (you can roughly tell which is which as
     
    14501450the 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
    14511451yourself.
    1452 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2634171"></a>Configuring CUPS for Driver Download</h2></div></div></div><p>
     1452</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2641139"></a>Configuring CUPS for Driver Download</h2></div></div></div><p>
    14531453As we have said before, all previously known methods to prepare client printer drivers on the Samba server for
    14541454download and Point'n'Print convenience of Windows workstations are working with CUPS, too. These methods were
    14551455described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>. In reality, this is a pure Samba
    14561456business and relates only to the Samba-Windows client relationship.
    1457 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634194"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p>
    1458 <a class="indexterm" name="id2634204"></a>
     1457</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641162"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p>
     1458<a class="indexterm" name="id2641172"></a>
    14591459The <em class="parameter"><code>cupsaddsmb</code></em> utility (shipped with all current CUPS versions) is an alternative
    14601460method to transfer printer drivers into the Samba <em class="parameter"><code>[print$]</code></em> share. Remember, this
     
    14731473CUPS drivers. You will also need to get the respective part of the Adobe driver
    14741474if you need to support Windows 95, 98, and Me clients.
    1475 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634292"></a>Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></h3></div></div></div><p>
     1475</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641260"></a>Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></h3></div></div></div><p>
    14761476Prior to running <code class="literal">cupsaddsmb</code>, you need the settings in
    14771477<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>.
    1478 </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="id2634361"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2634373"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2634384"></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="id2634405"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2634417"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2634428"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><a class="indexterm" name="id2634444"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2634456"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2634467"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2634479"></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="id2634500"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2634511"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2634523"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2634535"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id2634546"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2634558"></a><em class="parameter"><code>write list = root, @smbprintadm</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="id2634572"></a>CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</h3></div></div></div><p>
    1479 <a class="indexterm" name="id2634583"></a>
     1478</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="id2641329"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2641341"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2641353"></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="id2641373"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2641385"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2641397"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><a class="indexterm" name="id2641412"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2641424"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id2641436"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2641447"></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="id2641468"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2641480"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id2641492"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2641504"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id2641515"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2641527"></a><em class="parameter"><code>write list = root, @smbprintadm</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="id2641541"></a>CUPS &#8220;<span class="quote">PostScript Driver for Windows NT/200x/XP</span>&#8221;</h3></div></div></div><p>
     1479<a class="indexterm" name="id2641551"></a>
    14801480CUPS 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
    14811481from the CUPS-based software files, tagged as CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba (tar.gz,
     
    14901490cups-samba.ss
    14911491</pre><p>
    1492 <a class="indexterm" name="id2634629"></a>
    1493 <a class="indexterm" name="id2634638"></a>
     1492<a class="indexterm" name="id2641598"></a>
     1493<a class="indexterm" name="id2641607"></a>
    14941494These have been packaged with the ESP meta-packager software EPM. The <code class="filename">*.install</code> and
    14951495<code class="filename">*.remove</code> files are simple shell scripts, which untar the <code class="filename">*.ss</code> (the
     
    15231523the correct place.
    15241524</p></div><p>
    1525 <a class="indexterm" name="id2634790"></a>
     1525<a class="indexterm" name="id2641759"></a>
    15261526This new CUPS PostScript driver is currently binary only, but free of charge. No complete source code is
    15271527provided (yet). The reason is that it has been developed with the help of the Microsoft DDK and compiled with
     
    15291529free software. However, CUPS developers released the &#8220;<span class="quote">diff</span>&#8221; in source code under the GPL, so
    15301530anybody with a license for Visual Studio and a DDK will be able to compile for himself or herself.
    1531 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634811"></a>Recognizing Different Driver Files</h3></div></div></div><p>
     1531</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641780"></a>Recognizing Different Driver Files</h3></div></div></div><p>
    15321532The CUPS drivers do not support the older Windows 95/98/Me, but only the Windows NT/2000/XP client.
    15331533</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>
     
    15361536different platforms.
    15371537</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>
    1538 <a class="indexterm" name="id2634908"></a>
     1538<a class="indexterm" name="id2641878"></a>
    15391539If both the Adobe driver files and the CUPS driver files for the support of Windows NT/200x/XP are presently
    15401540installed on the server, the Adobe files will be ignored and the CUPS files will be used. If you prefer
    15411541 for whatever reason  to use Adobe-only drivers, move away the three CUPS driver files.
    15421542The Windows 9x/Me clients use the Adobe drivers in any case.
    1543 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634930"></a>Acquiring the Adobe Driver Files</h3></div></div></div><p>
     1543</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641899"></a>Acquiring the Adobe Driver Files</h3></div></div></div><p>
    15441544Acquiring the Adobe driver files seems to be unexpectedly difficult for many users. They are not available on
    15451545the Adobe Web site as single files, and the self-extracting and/or self-installing Windows-.exe is not easy to
     
    15471547client once. This will install the drivers (and one generic PostScript printer) locally on the client. When
    15481548they 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.
    1549 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2634955"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p>
    1550 <a class="indexterm" name="id2634964"></a>
     1549</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641924"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p>
     1550<a class="indexterm" name="id2641933"></a>
    15511551Users of the ESP Print Pro software are able to install the ESP print drivers package as an alternative to the
    15521552Adobe PostScript drivers.  To do so, retrieve the driver files from the normal download area of the ESP Print
     
    15581558the <em class="parameter"><code>[print$]</code></em> share, and so on. The ESP Print Pro package includes the CUPS driver
    15591559files as well as a (licensed) set of Adobe drivers for the Windows 95/98/Me client family.
    1560 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635017"></a>Caveats to Be Considered</h3></div></div></div><p>
    1561 <a class="indexterm" name="id2635025"></a>
    1562 <a class="indexterm" name="id2635032"></a>
    1563 <a class="indexterm" name="id2635039"></a>
    1564 <a class="indexterm" name="id2635046"></a>
     1560</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641987"></a>Caveats to Be Considered</h3></div></div></div><p>
     1561<a class="indexterm" name="id2641995"></a>
     1562<a class="indexterm" name="id2642001"></a>
     1563<a class="indexterm" name="id2642008"></a>
     1564<a class="indexterm" name="id2642015"></a>
    15651565Once you have run the install script (and possibly manually moved the <code class="filename">cups.hlp</code> file to
    15661566<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
     
    156915691.1.16).
    15701570</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
    1571 <a class="indexterm" name="id2635105"></a>
    1572 <a class="indexterm" name="id2635112"></a>
     1571<a class="indexterm" name="id2642074"></a>
     1572<a class="indexterm" name="id2642081"></a>
    15731573You may need to put root into the smbpasswd file by running <code class="literal">smbpasswd</code>; this is especially
    15741574important if you should run this whole procedure for the first time and are not working in an environment
     
    158515851.1.16) will automatically prefer its own drivers if it finds both.
    15861586</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    1587 <a class="indexterm" name="id2635187"></a>
    1588 <a class="indexterm" name="id2635194"></a>
     1587<a class="indexterm" name="id2642156"></a>
     1588<a class="indexterm" name="id2642163"></a>
    15891589Should your Windows clients have had the old <code class="filename">ADOBE*.*</code> files for the Adobe PostScript
    15901590driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/200x/XP will
     
    16001600privileges to do this.
    16011601</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    1602 <a class="indexterm" name="id2635269"></a>
    1603 <a class="indexterm" name="id2635279"></a>
     1602<a class="indexterm" name="id2642239"></a>
     1603<a class="indexterm" name="id2642248"></a>
    16041604Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all
    16051605printers to this one by proceeding as described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing
     
    16071607Properties</span> dialog, or use <code class="literal">rpcclient</code> with the <code class="literal">setdriver</code>
    16081608subcommand.
    1609 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635317"></a>Windows CUPS PostScript Driver Versus Adobe Driver</h3></div></div></div><p>
     1609</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642286"></a>Windows CUPS PostScript Driver Versus Adobe Driver</h3></div></div></div><p>
    16101610Are you interested in a comparison between the CUPS and the Adobe PostScript drivers? For our purposes, these
    16111611are the most important items that weigh in favor of CUPS:
    16121612</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
    16131613        get the ADOBE*.* driver files?</span>&#8221;</p></li><li><p>
    1614         <a class="indexterm" name="id2635348"></a>
     1614        <a class="indexterm" name="id2642317"></a>
    16151615        The Adobe drivers (on request of the printer PPD associated with them) often put a PJL header in front of the
    16161616        main PostScript part of the print file. Thus, the print file starts with <em class="parameter"><code>&lt;1B
     
    16181618        <em class="parameter"><code>%!PS</code></em>. This leads to the CUPS daemon autotyping the incoming file as a print-ready file,
    16191619        not initiating a pass through the <em class="parameter"><code>pstops</code></em> filter (to speak more technically, it is not
    1620         regarded as the generic MIME-type <a class="indexterm" name="id2635386"></a>
     1620        regarded as the generic MIME-type <a class="indexterm" name="id2642355"></a>
    16211621        <em class="parameter"><code>application/postscript</code></em>, but as the more special MIME type
    1622         <a class="indexterm" name="id2635400"></a>
     1622        <a class="indexterm" name="id2642369"></a>
    16231623        <em class="parameter"><code>application/cups.vnd-postscript</code></em>), which therefore also leads to the page accounting in
    16241624        <em class="parameter"><code>/var/log/cups/page_log</code></em> not receiving the exact number of pages; instead the dummy page
    16251625        number of &#8220;<span class="quote">1</span>&#8221; is logged in a standard setup).
    16261626        </p></li><li><p>The Adobe driver has more options to misconfigure the
    1627 <a class="indexterm" name="id2635431"></a>
     1627<a class="indexterm" name="id2642400"></a>
    16281628        PostScript generated by it (like setting it inadvertently to
    16291629        <span class="guilabel">Optimize for Speed</span> instead of
    16301630        <span class="guilabel">Optimize for Portability</span>, which
    16311631        could lead to CUPS being unable to process it).</p></li><li><p>The CUPS PostScript driver output sent by Windows
    1632 <a class="indexterm" name="id2635458"></a>
     1632<a class="indexterm" name="id2642427"></a>
    16331633        clients to the CUPS server is guaranteed to autotype
    16341634        as the generic MIME type <em class="parameter"><code>application/postscript</code></em>,
     
    16361636        correct number of pages in the <code class="filename">page_log</code> for
    16371637        accounting and quota purposes.</p></li><li><p>
    1638         <a class="indexterm" name="id2635490"></a>
     1638        <a class="indexterm" name="id2642460"></a>
    16391639        The CUPS PostScript driver supports the sending of additional standard (IPP) print options by Windows
    16401640        NT/200x/XP clients. Such additional print options are naming the CUPS standard <span class="emphasis"><em>banner
     
    16491649        and simply ignore it).</p></li><li><p>The CUPS PostScript driver will be the heart of the
    16501650        fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon
    1651         (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="id2635535"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p>
    1652 <a class="indexterm" name="id2635543"></a>
    1653 <a class="indexterm" name="id2635550"></a>
     1651        (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="id2642504"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p>
     1652<a class="indexterm" name="id2642512"></a>
     1653<a class="indexterm" name="id2642519"></a>
    16541654The <code class="literal">cupsaddsmb</code> command copies the needed files into your <em class="parameter"><code>[print$]</code></em>
    16551655share. Additionally, the PPD associated with this printer is copied from <code class="filename">/etc/cups/ppd/</code>
    16561656to <em class="parameter"><code>[print$]</code></em>. There the files wait for convenient Windows client installations via
    16571657Point'n'Print. Before we can run the command successfully, we need to be sure that we can authenticate toward
    1658 Samba. 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>).
     1658Samba. If you have a small network, you are probably using user-level security (<a class="link" href="smb.conf.5.html#SECURITY" target="_top">security = user</a>).
    16591659</p><p>
    16601660Here is an example of a successfully run <code class="literal">cupsaddsmb</code> command:
    1661 <a class="indexterm" name="id2635608"></a>
    1662 <a class="indexterm" name="id2635615"></a>
     1661<a class="indexterm" name="id2642577"></a>
     1662<a class="indexterm" name="id2642584"></a>
    16631663</p><pre class="screen">
    16641664<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root infotec_IS2027</code></strong>
    16651665Password for root required to access localhost via Samba: <strong class="userinput"><code>['secret']</code></strong>
    16661666</pre><p>
    1667 <a class="indexterm" name="id2635647"></a>
     1667<a class="indexterm" name="id2642616"></a>
    16681668To share <span class="emphasis"><em>all</em></span> printers and drivers, use the
    16691669<code class="option">-a</code> parameter instead of a printer name. Since
    16701670<code class="literal">cupsaddsmb</code> &#8220;<span class="quote">exports</span>&#8221; the printer drivers to Samba, it should be
    16711671obvious that it only works for queues with a CUPS driver associated.
    1672 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635675"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p>
    1673 <a class="indexterm" name="id2635683"></a>
     1672</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642644"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p>
     1673<a class="indexterm" name="id2642653"></a>
    16741674Probably you want to see what's going on. Use the
    16751675<code class="option">-v</code> parameter to get a more verbose output. The
     
    16771677a line indicate that I inserted an artificial line break plus some
    16781678indentation here:
    1679 <a class="indexterm" name="id2635701"></a>
    1680 <a class="indexterm" name="id2635710"></a>
     1679<a class="indexterm" name="id2642670"></a>
     1680<a class="indexterm" name="id2642680"></a>
    16811681</p><pre class="screen">
    16821682<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root -v infotec_2105</code></strong>
     
    17471747This will occur when the directories WIN40 and W32X86 already existed in the <em class="parameter"><code>[print$]</code></em>
    17481748driver download share (from a previous driver installation). These are harmless warning messages.
    1749 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2635867"></a>Understanding cupsaddsmb</h3></div></div></div><p>
    1750 <a class="indexterm" name="id2635875"></a>
     1749</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642836"></a>Understanding cupsaddsmb</h3></div></div></div><p>
     1750<a class="indexterm" name="id2642844"></a>
    17511751What has happened? What did <code class="literal">cupsaddsmb</code> do? There are five stages of the procedure:
    17521752</p><div class="orderedlist"><ol type="1"><li><p>
    1753         <a class="indexterm" name="id2635900"></a>
     1753        <a class="indexterm" name="id2642869"></a>
    17541754        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
    17551755         share's WIN40 (for Windows 9x/Me) and W32X86 (for Windows NT/200x/XP) subdirectories.</p></li><li><p>
    1756         <a class="indexterm" name="id2635937"></a>
     1756        <a class="indexterm" name="id2642906"></a>
    17571757        Connect via rpcclient to the Samba server and execute the <code class="literal">adddriver</code> command with the correct parameters.
    17581758        </p></li><li><p>
    1759         <a class="indexterm" name="id2635958"></a>
     1759        <a class="indexterm" name="id2642927"></a>
    17601760        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>
    17611761You can run the <code class="literal">cupsaddsmb</code> utility with parameters to specify one remote host as Samba host
     
    17661766<code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -H sambaserver -h cupsserver -v printer</code></strong>
    17671767</pre><p>
    1768 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636011"></a>How to Recognize If cupsaddsmb Completed Successfully</h3></div></div></div><p>
     1768</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642980"></a>How to Recognize If cupsaddsmb Completed Successfully</h3></div></div></div><p>
    17691769You <span class="emphasis"><em>must</em></span> always check if the utility completed
    17701770successfully in all fields. You need at minimum these three messages
     
    17881788result was WERR_ACCESS_DENIED
    17891789</pre><p>
    1790 it means that you might have set <a class="link" href="smb.conf.5.html#USECLIENTDRIVER">use client driver = yes</a> for this printer.
     1790it means that you might have set <a class="link" href="smb.conf.5.html#USECLIENTDRIVER" target="_top">use client driver = yes</a> for this printer.
    17911791Setting 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
    17921792the <em class="parameter"><code>use client driver</code></em>.
     
    17951795Therefore, we strongly recommend against use of the default quiet mode. It will hide any problems from you that
    17961796might occur.
    1797 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636133"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p>
    1798 <a class="indexterm" name="id2636141"></a>
    1799 <a class="indexterm" name="id2636148"></a>
     1797</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643102"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p>
     1798<a class="indexterm" name="id2643110"></a>
     1799<a class="indexterm" name="id2643117"></a>
    18001800Can't get the standard <code class="literal">cupsaddsmb</code> command to run on a Samba PDC?  Are you asked for the
    18011801password credential again and again, and the command just will not take off at all? Try one of these
     
    18071807</pre><p>
    18081808(Note the two backslashes: the first one is required to &#8220;<span class="quote">escape</span>&#8221; the second one).
    1809 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636214"></a>cupsaddsmb Flowchart</h3></div></div></div><p>
    1810 <a class="indexterm" name="id2636222"></a>
    1811 <a class="indexterm" name="id2636229"></a>
     1809</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643183"></a>cupsaddsmb Flowchart</h3></div></div></div><p>
     1810<a class="indexterm" name="id2643191"></a>
     1811<a class="indexterm" name="id2643198"></a>
    18121812<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
    18131813data flows of the <code class="literal">cupaddsmb</code> command. Note again: cupsaddsmb is
    18141814not intended to, and does not work with, raw print queues!
    1815 </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="id2636295"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p>
    1816 <a class="indexterm" name="id2636303"></a>
    1817 <a class="indexterm" name="id2636310"></a>
     1815</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="id2643264"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p>
     1816<a class="indexterm" name="id2643273"></a>
     1817<a class="indexterm" name="id2643280"></a>
    18181818After <code class="literal">cupsaddsmb</code> is completed, your driver is prepared for the clients to use. Here are the
    18191819steps you must perform to download and install it via Point'n'Print. From a Windows client, browse to the
    18201820CUPS/Samba server:
    18211821</p><div class="itemizedlist"><ul type="disc"><li><p>
    1822         <a class="indexterm" name="id2636333"></a>
     1822        <a class="indexterm" name="id2643302"></a>
    18231823        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
    18241824        <span class="guimenuitem">Install...</span> or
     
    18311831<code class="filename">\\SambaServer\PrinterName</code> entry in the drop-down list of available printers.
    18321832</p><p>
    1833 <a class="indexterm" name="id2636403"></a>
    1834 <a class="indexterm" name="id2636409"></a>
    1835 <a class="indexterm" name="id2636416"></a>
     1833<a class="indexterm" name="id2643372"></a>
     1834<a class="indexterm" name="id2643378"></a>
     1835<a class="indexterm" name="id2643385"></a>
    18361836<code class="literal">cupsaddsmb</code> will only reliably work with CUPS version 1.1.15 or higher and with Samba
    18371837version 2.2.4, or later. If it does not work, or if the automatic printer driver download to the clients does
     
    18621862        instead of 3 (the latest ESP Ghostscript package handles Level 3 PostScript very well; Adobe).
    18631863        </p></li><li><p>
    1864         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="id2636530"></a>Installing PostScript Driver Files Manually Using rpcclient</h2></div></div></div><p>
     1864        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="id2643499"></a>Installing PostScript Driver Files Manually Using rpcclient</h2></div></div></div><p>
    18651865Of course, you can run all the commands that are embedded into the
    18661866cupsaddsmb convenience utility yourself, one by one, and upload
     
    18681868</p><div class="orderedlist"><ol type="1"><li><p>Prepare Samba (a CUPS print queue with the name of the
    18691869        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>
    1870         <a class="indexterm" name="id2636569"></a>
     1870        <a class="indexterm" name="id2643538"></a>
    18711871        Run <code class="literal">rpcclient adddriver</code>
    18721872        (for each client architecture you want to support).</p></li><li><p>
    1873         <a class="indexterm" name="id2636590"></a>
     1873        <a class="indexterm" name="id2643559"></a>
    18741874        Run <code class="literal">rpcclient setdriver.</code></p></li></ol></div><p>
    1875 <a class="indexterm" name="id2636608"></a>
    1876 <a class="indexterm" name="id2636618"></a>
    1877 <a class="indexterm" name="id2636627"></a>
    1878 <a class="indexterm" name="id2636636"></a>
    1879 <a class="indexterm" name="id2636645"></a>
     1875<a class="indexterm" name="id2643578"></a>
     1876<a class="indexterm" name="id2643587"></a>
     1877<a class="indexterm" name="id2643596"></a>
     1878<a class="indexterm" name="id2643605"></a>
     1879<a class="indexterm" name="id2643615"></a>
    18801880We are going to do this now. First, read the man page on <em class="parameter"><code>rpcclient</code></em> to get a first idea.
    18811881Look at all the printing-related subcommands: <code class="literal">enumprinters</code>, <code class="literal">enumdrivers</code>,
     
    18841884You can use it to query (and command) a Windows NT (or 200x/XP) PC, too. MS-RPC is used by Windows clients,
    18851885among other things, to benefit from the Point'n'Print features. Samba can now mimic this as well.
    1886 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636704"></a>A Check of the rpcclient man Page</h3></div></div></div><p>
     1886</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643673"></a>A Check of the rpcclient man Page</h3></div></div></div><p>
    18871887First let's check the <em class="parameter"><code>rpcclient</code></em> man page. Here are two relevant passages:
    18881888</p><p>
    1889 <a class="indexterm" name="id2636722"></a>
    1890 <a class="indexterm" name="id2636729"></a>
    1891 <a class="indexterm" name="id2636736"></a>
     1889<a class="indexterm" name="id2643692"></a>
     1890<a class="indexterm" name="id2643698"></a>
     1891<a class="indexterm" name="id2643705"></a>
    18921892<code class="literal">adddriver &lt;arch&gt; &lt;config&gt;</code> Execute an <code class="literal">AddPrinterDriver()</code> RPC
    18931893to install the printer driver information on the server. The driver files should already exist in the
     
    19121912RPC will fail.
    19131913</p><p>
    1914 <a class="indexterm" name="id2636814"></a>
    1915 <a class="indexterm" name="id2636821"></a>
     1914<a class="indexterm" name="id2643783"></a>
     1915<a class="indexterm" name="id2643790"></a>
    19161916<code class="literal">setdriver &lt;printername&gt; &lt;drivername&gt;</code> Execute a <code class="literal">SetPrinter()</code>
    19171917command to update the printer driver associated with an installed printer. The printer driver must already be
    19181918correctly installed on the print server.
    19191919</p><p>
    1920 <a class="indexterm" name="id2636846"></a>
    1921 <a class="indexterm" name="id2636853"></a>
     1920<a class="indexterm" name="id2643816"></a>
     1921<a class="indexterm" name="id2643822"></a>
    19221922See also the <code class="literal">enumprinters</code> and <code class="literal">enumdrivers</code> commands to
    19231923obtain a list of installed printers and drivers.
    1924 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636876"></a>Understanding the rpcclient man Page</h3></div></div></div><p>
    1925 <a class="indexterm" name="id2636884"></a>
     1924</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643845"></a>Understanding the rpcclient man Page</h3></div></div></div><p>
     1925<a class="indexterm" name="id2643853"></a>
    19261926The <span class="emphasis"><em>exact</em></span> format isn't made too clear by the man page, since you have to deal with some
    19271927parameters containing spaces. Here is a better description for it. We have line-broken the command and
     
    19471947access it from a UNIX workstation. We will query it with <code class="literal">rpcclient</code> to see what it tells us
    19481948and try to understand the man page more clearly.
    1949 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2636981"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p>
    1950 <a class="indexterm" name="id2636989"></a>
    1951 <a class="indexterm" name="id2636998"></a>
     1949</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643950"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p>
     1950<a class="indexterm" name="id2643958"></a>
     1951<a class="indexterm" name="id2643967"></a>
    19521952We could run <code class="literal">rpcclient</code> with a <code class="literal">getdriver</code> or a
    19531953<code class="literal">getprinter</code> subcommand (in level 3 verbosity) against it. Just sit down at a UNIX or Linux
     
    19571957</pre><p>
    19581958From the result it should become clear which is which. Here is an example from my installation:
    1959 <a class="indexterm" name="id2637049"></a>
     1959<a class="indexterm" name="id2644018"></a>
    19601960</p><pre class="screen">
    19611961<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -U'Danka%xxxx' W200xSERVER \
     
    19881988drivers, we do not need any (nor would we for the Adobe PostScript driver); therefore, the field will get a
    19891989&#8220;<span class="quote">NULL</span>&#8221; entry.
    1990 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2637113"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p>
    1991 <a class="indexterm" name="id2637121"></a>
    1992 <a class="indexterm" name="id2637130"></a>
    1993 <a class="indexterm" name="id2637137"></a>
     1990</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2644082"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p>
     1991<a class="indexterm" name="id2644090"></a>
     1992<a class="indexterm" name="id2644100"></a>
     1993<a class="indexterm" name="id2644106"></a>
    19941994From the man page (and from the quoted output of <code class="literal">cupsaddsmb</code> above) it becomes clear that
    19951995you need to have certain conditions in order to make the manual uploading and initializing of the driver files
    19961996succeed. The two <code class="literal">rpcclient</code> subcommands (<code class="literal">adddriver</code> and
    19971997<code class="literal">setdriver</code>) need to encounter the following preconditions to complete successfully:
    1998 </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
     1998</p><div class="itemizedlist"><ul type="disc"><li><p>You are connected as <a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a> or root (this is
    19991999        <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
    20002000        admin</em></span> group as defined in the <em class="parameter"><code>[global]</code></em> section of <code class="filename">smb.conf</code>).
     
    20082008        subdirectories.</p></li><li><p>The printer you are going to set up for the Windows
    20092009        clients needs to be installed in CUPS already.</p></li><li><p>
    2010         <a class="indexterm" name="id2637290"></a>
    2011         <a class="indexterm" name="id2637300"></a>
     2010        <a class="indexterm" name="id2644260"></a>
     2011        <a class="indexterm" name="id2644269"></a>
    20122012        The CUPS printer must be known to Samba; otherwise the <code class="literal">setdriver</code> subcommand fails with an
    20132013        NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by Samba, you may use the
     
    20152015        proper update of the printer list until every smbd process had received a SIGHUP or was restarted. Remember
    20162016        this in case you've created the CUPS printer just recently and encounter problems: try restarting Samba.
    2017         </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2637337"></a>Manual Driver Installation in 15 Steps</h3></div></div></div><p>
     2017        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2644307"></a>Manual Driver Installation in 15 Steps</h3></div></div></div><p>
    20182018We are going to install a printer driver now by manually executing all
    20192019required commands. Because this may seem a rather complicated process at
    20202020first, we go through the procedure step by step, explaining every
    20212021single action item as it comes up.
    2022 </p><div class="procedure"><a name="id2637351"></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">
     2022</p><div class="procedure"><a name="id2644320"></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">
    20232023        <code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E \
    20242024                                -P canonIR85.ppd</code></strong>
     
    20292029        for this step.
    20302030        </p></li><li><p class="title"><b>(Optional.) Check if the printer is recognized by Samba.</b></p><p>
    2031         <a class="indexterm" name="id2637408"></a>
     2031        <a class="indexterm" name="id2644377"></a>
    20322032</p><pre class="screen">
    20332033<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumprinters' localhost \
     
    20492049        list</span>&#8221; as defined in <code class="filename">smb.conf</code> for <em class="parameter"><code>[print$]</code></em>.
    20502050        </p></li><li><p class="title"><b>(Optional.) Check if Samba knows a driver for the printer.</b></p><p>
    2051         <a class="indexterm" name="id2637505"></a>
    2052         <a class="indexterm" name="id2637515"></a>
     2051        <a class="indexterm" name="id2644475"></a>
     2052        <a class="indexterm" name="id2644484"></a>
    20532053</p><pre class="screen">
    20542054<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2'\
     
    21062106<em class="parameter"><code>[print$]</code></em>.
    21072107</p></li><li><p class="title"><b>Tell Samba that these are driver files (<code class="literal">adddriver</code>).</b></p><p>
    2108 <a class="indexterm" name="id2637703"></a>
     2108<a class="indexterm" name="id2644672"></a>
    21092109</p><pre class="screen">
    21102110<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" \
     
    21372137subdirectory. Compare this with the situation after step 5.
    21382138</p></li><li><p class="title"><b>(Optional.) Verify if Samba now recognizes the driver.</b></p><p>
    2139 <a class="indexterm" name="id2637811"></a>
     2139<a class="indexterm" name="id2644780"></a>
    21402140</p><pre class="screen">
    21412141<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumdrivers 3' \
     
    21532153driver in step 6. This command must succeed before you can proceed.
    21542154</p></li><li><p class="title"><b>Tell Samba which printer should use these driver files (<code class="literal">setdriver</code>).</b></p><p>
    2155 <a class="indexterm" name="id2637866"></a>
     2155<a class="indexterm" name="id2644835"></a>
    21562156</p><pre class="screen">
    21572157<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' \
     
    21642164<code class="literal">enumprinters</code> must find the printer.
    21652165</p></li><li><p class="title"><b>(Optional) Verify if Samba has recognized this association.</b></p><p>
    2166 <a class="indexterm" name="id2637925"></a>
    2167 <a class="indexterm" name="id2637934"></a>
    2168 <a class="indexterm" name="id2637943"></a>
     2166<a class="indexterm" name="id2644894"></a>
     2167<a class="indexterm" name="id2644903"></a>
     2168<a class="indexterm" name="id2644913"></a>
    21692169</p><pre class="screen">
    21702170<code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \
     
    22062206
    22072207</pre><p>
    2208 <a class="indexterm" name="id2638021"></a>
     2208<a class="indexterm" name="id2644990"></a>
    22092209Compare these results with the ones from steps 2 and 3. Every one of these commands show the driver is installed. Even
    22102210the <code class="literal">enumprinters</code> command now lists the driver
     
    22122212</p></li><li><p class="title"><b>(Optional.) Tickle the driver into a correct
    22132213device mode.</b></p><p>
    2214 <a class="indexterm" name="id2638056"></a>
     2214<a class="indexterm" name="id2645025"></a>
    22152215You certainly know how to install the driver on the client. In case
    22162216you are not particularly familiar with Windows, here is a short
     
    22352235<span class="guilabel">landscape</span></em></span>), click on <span class="guibutton">Apply</span>, and change the setting back.
    22362236</p></li><li><p class="title"><b>Install the printer on a client (Point'n'Print).</b></p><p>
    2237 <a class="indexterm" name="id2638174"></a>
     2237<a class="indexterm" name="id2645144"></a>
    22382238</p><pre class="screen">
    22392239<code class="prompt">C:\&gt; </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /in /n "\\sambaserver\mysmbtstprn"</code></strong>
    22402240</pre><p>
    22412241If it does not work, it could be a permissions problem with the <em class="parameter"><code>[print$]</code></em> share.
    2242 </p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id2638216"></a><pre class="screen">
     2242</p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id2645185"></a><pre class="screen">
    22432243<code class="prompt">C:\&gt; </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /p /n "\\sambaserver\mysmbtstprn"</code></strong>
    22442244</pre><p>
     
    22502250</p></li><li><p class="title"><b>(Obligatory.) Enjoy. Jump. Celebrate your success.</b></p><pre class="screen">
    22512251<code class="prompt">root# </code><strong class="userinput"><code>echo "Cheeeeerioooooo! Success..." &gt;&gt; /var/log/samba/log.smbd</code></strong>
    2252 </pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638296"></a>Troubleshooting Revisited</h3></div></div></div><p>
    2253 <a class="indexterm" name="id2638304"></a>
     2252</pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2645265"></a>Troubleshooting Revisited</h3></div></div></div><p>
     2253<a class="indexterm" name="id2645273"></a>
    22542254The setdriver command will fail if in Samba's mind the queue is not
    22552255already there. A successful installation displys the promising message that the:
     
    22622262result was NT_STATUS_UNSUCCESSFUL
    22632263</code></p><p>
    2264 <a class="indexterm" name="id2638336"></a>
    2265 <a class="indexterm" name="id2638343"></a>
     2264<a class="indexterm" name="id2645305"></a>
     2265<a class="indexterm" name="id2645312"></a>
    22662266It is not good enough that you can see the queue in CUPS, using the <code class="literal">lpstat -p ir85wm</code>
    22672267command. A bug in most recent versions of Samba prevents the proper update of the queue list. The recognition
     
    22692269if this is the reason why Samba does not execute the <code class="literal">setdriver</code> command successfully, check
    22702270if Samba &#8220;<span class="quote">sees</span>&#8221; the printer:
    2271 <a class="indexterm" name="id2638372"></a>
     2271<a class="indexterm" name="id2645341"></a>
    22722272</p><pre class="screen">
    22732273<code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%xxxx' -c 'enumprinters 0'|grep ir85wm</code></strong>
     
    22752275</pre><p>
    22762276An alternate command could be this:
    2277 <a class="indexterm" name="id2638402"></a>
     2277<a class="indexterm" name="id2645371"></a>
    22782278</p><pre class="screen">
    22792279<code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' </code></strong>
     
    22852285</pre><p>
    22862286By the way, you can use these commands, plus a few more, of course, to install drivers on remote Windows NT print servers too!
    2287 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638439"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p>
    2288 <a class="indexterm" name="id2638453"></a>
    2289 <a class="indexterm" name="id2638460"></a>
    2290 <a class="indexterm" name="id2638469"></a>
    2291 <a class="indexterm" name="id2638478"></a>
    2292 <a class="indexterm" name="id2638487"></a>
    2293 <a class="indexterm" name="id2638496"></a>
    2294 <a class="indexterm" name="id2638505"></a>
    2295 <a class="indexterm" name="id2638514"></a>
    2296 <a class="indexterm" name="id2638523"></a>
    2297 <a class="indexterm" name="id2638532"></a>
    2298 <a class="indexterm" name="id2638541"></a>
    2299 <a class="indexterm" name="id2638550"></a>
    2300 <a class="indexterm" name="id2638559"></a>
     2287</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2645408"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p>
     2288<a class="indexterm" name="id2645422"></a>
     2289<a class="indexterm" name="id2645429"></a>
     2290<a class="indexterm" name="id2645438"></a>
     2291<a class="indexterm" name="id2645447"></a>
     2292<a class="indexterm" name="id2645456"></a>
     2293<a class="indexterm" name="id2645465"></a>
     2294<a class="indexterm" name="id2645474"></a>
     2295<a class="indexterm" name="id2645483"></a>
     2296<a class="indexterm" name="id2645492"></a>
     2297<a class="indexterm" name="id2645501"></a>
     2298<a class="indexterm" name="id2645510"></a>
     2299<a class="indexterm" name="id2645519"></a>
     2300<a class="indexterm" name="id2645528"></a>
    23012301Some mystery is associated with the series of files with a tdb suffix appearing in every Samba installation.
    23022302They are <code class="filename">connections.tdb</code>, <code class="filename">printing.tdb</code>,
     
    23052305<code class="filename">messages.tdb</code> , <code class="filename">ntprinters.tdb</code>, <code class="filename">sessionid.tdb</code>,
    23062306and <code class="filename">secrets.tdb</code>. What is their purpose?
    2307 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638642"></a>Trivial Database Files</h3></div></div></div><p>
    2308 <a class="indexterm" name="id2638650"></a>
     2307</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2645611"></a>Trivial Database Files</h3></div></div></div><p>
     2308<a class="indexterm" name="id2645619"></a>
    23092309A Windows NT (print) server keeps track of all information needed to serve its duty toward its clients by
    23102310storing entries in the Windows registry. Client queries are answered by reading from the registry,
     
    23152315<code class="filename">ntprinters.tdb</code>, <code class="filename">printing.tdb</code>,<code class="filename">ntforms.tdb</code>, and
    23162316<code class="filename">ntdrivers.tdb</code>.
    2317 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638709"></a>Binary Format</h3></div></div></div><p>
     2317</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2645679"></a>Binary Format</h3></div></div></div><p>
    23182318<code class="filename">*.tdb</code> files are not human readable. They are written in a binary format. &#8220;<span class="quote">Why not
    23192319ASCII?</span>&#8221;, you may ask. &#8220;<span class="quote">After all, ASCII configuration files are a good and proven tradition on
     
    23242324<code class="filename">*.tdb</code> files allows for this provision. Many smbd processes may write to the same
    23252325<code class="filename">*.tdb</code> file at the same time. This wouldn't be possible with pure ASCII files.
    2326 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638775"></a>Losing <code class="filename">*.tdb</code> Files</h3></div></div></div><p>
     2326</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2645745"></a>Losing <code class="filename">*.tdb</code> Files</h3></div></div></div><p>
    23272327It is very important that all <code class="filename">*.tdb</code> files remain consistent over all write and read
    23282328accesses. However, it may happen that these files <span class="emphasis"><em>do</em></span> get corrupted. (A <code class="literal">kill -9
     
    23312331only option. After that, you need to re-create all print-related setups unless you have made a backup of the
    23322332<code class="filename">*.tdb</code> files in time.
    2333 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2638826"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p>
    2334 <a class="indexterm" name="id2638838"></a>
    2335 <a class="indexterm" name="id2638850"></a>
     2333</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2645796"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p>
     2334<a class="indexterm" name="id2645808"></a>
     2335<a class="indexterm" name="id2645819"></a>
    23362336Samba ships with a little utility that helps the root user of your system to backup your
    23372337<code class="filename">*.tdb</code> files. If you run it with no argument, it prints a usage message:
     
    23602360 -rw-------    1 root     root        40960 May  2 03:44 printing.tdb.bak
    23612361
    2362 </pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2638946"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p>
    2363 <a class="indexterm" name="id2638954"></a>
     2362</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2645915"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p>
     2363<a class="indexterm" name="id2645924"></a>
    23642364CUPS ships with good support for HP LaserJet-type printers. You can install the generic driver as follows:
    2365 <a class="indexterm" name="id2638963"></a>
     2365<a class="indexterm" name="id2645933"></a>
    23662366</p><pre class="screen">
    23672367<code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd</code></strong>
     
    23792379<code class="literal">foomatic-rip</code> utility.
    23802380</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    2381 <a class="indexterm" name="id2639052"></a>
    2382 <a class="indexterm" name="id2639059"></a>
    2383 <a class="indexterm" name="id2639066"></a>
     2381<a class="indexterm" name="id2646022"></a>
     2382<a class="indexterm" name="id2646029"></a>
     2383<a class="indexterm" name="id2646036"></a>
    23842384The former <code class="literal">cupsomatic</code> concept is now being replaced by the new successor, a much more
    23852385powerful <code class="literal">foomatic-rip</code>.  <code class="literal">cupsomatic</code> is no longer maintained. Here is the
     
    23902390are also intended to be used by Samba and the cupsaddsmb utility, to provide the driver files for the Windows
    23912391clients!
    2392 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2639121"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p>
    2393 <a class="indexterm" name="id2639129"></a>
    2394 <a class="indexterm" name="id2639136"></a>
     2392</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2646091"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p>
     2393<a class="indexterm" name="id2646099"></a>
     2394<a class="indexterm" name="id2646106"></a>
    23952395Nowadays, 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
    23962396(which, by the way, works on all UNIXes and on Mac OS X and Darwin, too).  The utilities from this sire have a
     
    24032403available 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
    24042404various models, and many models may be driven by different drivers  its your choice!
    2405 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639190"></a>690 &#8220;<span class="quote">Perfect</span>&#8221; Printers</h4></div></div></div><p>
    2406 <a class="indexterm" name="id2639202"></a>
     2405</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646160"></a>690 &#8220;<span class="quote">Perfect</span>&#8221; Printers</h4></div></div></div><p>
     2406<a class="indexterm" name="id2646172"></a>
    24072407At present, there are 690 devices dubbed as working perfectly: 181 are <span class="emphasis"><em>mostly</em></span> perfect, 96
    24082408are <span class="emphasis"><em>partially</em></span> perfect, and 46 are paperweights. Keeping in mind that most of these are
     
    24122412achievement! Three years ago the number was not more than 500, and Linux or UNIX printing at the time wasn't
    24132413anywhere near the quality it is today.
    2414 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639231"></a>How the Printing HOWTO Started It All</h4></div></div></div><p>
     2414</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646201"></a>How the Printing HOWTO Started It All</h4></div></div></div><p>
    24152415A few years ago <a class="ulink" href="http://www2.picante.com/" target="_top">Grant Taylor</a> started it all. The
    24162416roots 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
     
    24212421This database became the core component of today's Foomatic collection of tools and data. In the meantime, it
    24222422has moved to an XML representation of the data.
    2423 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639269"></a>Foomatic's Strange Name</h4></div></div></div><p>
    2424 <a class="indexterm" name="id2639277"></a>
     2423</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646239"></a>Foomatic's Strange Name</h4></div></div></div><p>
     2424<a class="indexterm" name="id2646247"></a>
    24252425&#8220;<span class="quote">Why the funny name?</span>&#8221; you ask. When it really took off, around spring 2000, CUPS was far less
    24262426popular than today, and most systems used LPD, LPRng, or even PDQ to print. CUPS shipped with a few generic
     
    24402440        printing was the only one available).</p></li><li><p>It gave all the advanced CUPS options (Web interface,
    24412441        GUI driver configurations) to users wanting (or needing) to use
    2442         Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639350"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p>
    2443 <a class="indexterm" name="id2639358"></a>
    2444 <a class="indexterm" name="id2639365"></a>
    2445 <a class="indexterm" name="id2639372"></a>
     2442        Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646320"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p>
     2443<a class="indexterm" name="id2646328"></a>
     2444<a class="indexterm" name="id2646335"></a>
     2445<a class="indexterm" name="id2646342"></a>
    24462446CUPS 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
    24472447ran the printfile through Ghostscript, constructing automatically the rather complicated command line needed.
     
    24642464structures attached to Linuxprinting.org PPDs for CUPS. It had a different &#8220;<span class="quote">*omatic</span>&#8221; script for
    24652465every spooler, as well as different printer configuration files.
    2466 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639506"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p>
    2467 <a class="indexterm" name="id2639517"></a>
     2466</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646476"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p>
     2467<a class="indexterm" name="id2646487"></a>
    24682468This has all changed in Foomatic versions 2.9 (beta) and released as &#8220;<span class="quote">stable</span>&#8221; 3.0. It has now
    24692469achieved 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>.
     
    24742474there is improved media type and source support  paper sizes and trays are easier to configure.
    24752475</p><p>
    2476 <a class="indexterm" name="id2639553"></a>
    2477 <a class="indexterm" name="id2639559"></a>
    2478 <a class="indexterm" name="id2639566"></a>
     2476<a class="indexterm" name="id2646523"></a>
     2477<a class="indexterm" name="id2646529"></a>
     2478<a class="indexterm" name="id2646536"></a>
    24792479Also, the new generation of Linuxprinting.org PPDs no longer contains Perl data structures. If you are a
    24802480distro maintainer and have used the previous version of Foomatic, you may want to give the new one a spin, but
     
    24832483the steps</a> outlined in the Foomatic tutorial or in this chapter. This new development is truly amazing.
    24842484</p><p>
    2485 <a class="indexterm" name="id2639599"></a>
    2486 <a class="indexterm" name="id2639606"></a>
    2487 <a class="indexterm" name="id2639613"></a>
     2485<a class="indexterm" name="id2646569"></a>
     2486<a class="indexterm" name="id2646576"></a>
     2487<a class="indexterm" name="id2646583"></a>
    24882488foomatic-rip is a very clever wrapper around the need to run Ghostscript with a different syntax, options,
    24892489device selections, and/or filters for each different printer or spooler. At the same time, it can read the PPD
     
    24932493printing on media drawn from different paper trays within the same job (in both cases, even where there is no
    24942494support for this from Windows-based vendor printer drivers).
    2495 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639634"></a>Driver Development Outside</h4></div></div></div><p>
    2496 <a class="indexterm" name="id2639642"></a>
     2495</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646604"></a>Driver Development Outside</h4></div></div></div><p>
     2496<a class="indexterm" name="id2646612"></a>
    24972497Most driver development itself does not happen within Linuxprinting.org. Drivers are written by independent
    24982498maintainers.  Linuxprinting.org just pools all the information and stores it in its database. In addition, it
     
    25022502Speaking of the different driver development groups, most of the work is currently done in three projects:
    25032503</p><div class="itemizedlist"><ul type="disc"><li><p>
    2504 <a class="indexterm" name="id2639666"></a>
     2504<a class="indexterm" name="id2646636"></a>
    25052505        <a class="ulink" href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">Omni</a>
    25062506         a free software project by IBM that tries to convert its printer
     
    25082508        universal driver architecture for Linux/UNIX (still beta). This
    25092509        currently supports 437 models.</p></li><li><p>
    2510 <a class="indexterm" name="id2639691"></a>
     2510<a class="indexterm" name="id2646661"></a>
    25112511        <a class="ulink" href="http://hpinkjet.sf.net/" target="_top">HPIJS</a>
    25122512        a free software project by HP to provide the support for its own
     
    25142514        provides true photo quality). This currently supports 369
    25152515        models.</p></li><li><p>
    2516 <a class="indexterm" name="id2639714"></a>
     2516<a class="indexterm" name="id2646684"></a>
    25172517        <a class="ulink" href="http://gimp-print.sourceforge.net/" target="_top">Gutenprint</a>  a free software
    25182518        effort, started by Michael Sweet (also lead developer for CUPS), now
     
    25202520        photo print quality (many Epson users swear that its quality is
    25212521        better than the vendor drivers provided by Epson for the Microsoft
    2522         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="id2639738"></a>Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX)</h4></div></div></div><p>
     2522        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="id2646708"></a>Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX)</h4></div></div></div><p>
    25232523Linuxprinting.org today is the one-stop shop to download printer drivers. Look for printer information and
    25242524<a class="ulink" href="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/" target="_top">tutorials</a> or solve
     
    25292529forum</a> has turned out to be one of the most frequented forums after only a few weeks.
    25302530</p><p>
    2531 <a class="indexterm" name="id2639783"></a>
    2532 <a class="indexterm" name="id2639790"></a>
    2533 <a class="indexterm" name="id2639797"></a>
     2531<a class="indexterm" name="id2646753"></a>
     2532<a class="indexterm" name="id2646760"></a>
     2533<a class="indexterm" name="id2646767"></a>
    25342534Linuxprinting.org and the Foomatic driver wrappers around Ghostscript are now a standard tool-chain for
    25352535printing on all the important distros. Most of them also have CUPS underneath. While in recent years most
     
    25402540Till Kamppeter from Mandrakesoft is doing an excellent job in his spare time to maintain Linuxprinting.org and
    25412541Foomatic. So if you use it often, please send him a note showing your appreciation.
    2542 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2639821"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p>
    2543 <a class="indexterm" name="id2639830"></a>
    2544 <a class="indexterm" name="id2639836"></a>
    2545 <a class="indexterm" name="id2639843"></a>
    2546 <a class="indexterm" name="id2639850"></a>
    2547 <a class="indexterm" name="id2639857"></a>
    2548 <a class="indexterm" name="id2639864"></a>
    2549 <a class="indexterm" name="id2639871"></a>
    2550 <a class="indexterm" name="id2639878"></a>
    2551 <a class="indexterm" name="id2639885"></a>
     2542</p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2646791"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p>
     2543<a class="indexterm" name="id2646800"></a>
     2544<a class="indexterm" name="id2646806"></a>
     2545<a class="indexterm" name="id2646813"></a>
     2546<a class="indexterm" name="id2646820"></a>
     2547<a class="indexterm" name="id2646827"></a>
     2548<a class="indexterm" name="id2646834"></a>
     2549<a class="indexterm" name="id2646840"></a>
     2550<a class="indexterm" name="id2646847"></a>
     2551<a class="indexterm" name="id2646854"></a>
    25522552The Foomatic database is an amazing piece of ingenuity in itself. Not only does it keep the printer and driver
    25532553information, but it is organized in a way that it can generate PPD files on the fly from its internal
     
    25642564developers. 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
    25652565this information to present the available settings to the user as an intuitive menu selection.
    2566 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2639948"></a>foomatic-rip and Foomatic PPD Download and Installation</h3></div></div></div><p>
     2566</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2646918"></a>foomatic-rip and Foomatic PPD Download and Installation</h3></div></div></div><p>
    25672567Here are the steps to install a foomatic-rip-driven LaserJet 4 Plus-compatible
    25682568printer in CUPS (note that recent distributions of SuSE, UnitedLinux and
     
    26572657        the driver/model) contain support for a certain device representing
    26582658        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
    2659         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="id2640421"></a>Page Accounting with CUPS</h2></div></div></div><p>
    2660 <a class="indexterm" name="id2640429"></a>
     2659        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="id2647391"></a>Page Accounting with CUPS</h2></div></div></div><p>
     2660<a class="indexterm" name="id2647399"></a>
    26612661Often there are questions regarding print quotas where Samba users (that is, Windows clients) should not be
    26622662able to print beyond a certain number of pages or data volume per day, week, or month. This feature is
     
    26662666Of course one could hack things with one's own scripts. But then there is CUPS. CUPS supports quotas that can
    26672667be based on the size of jobs or on the number of pages or both, and can span any time period you want.
    2668 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640456"></a>Setting Up Quotas</h3></div></div></div><p>
    2669 <a class="indexterm" name="id2640464"></a>
     2668</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647427"></a>Setting Up Quotas</h3></div></div></div><p>
     2669<a class="indexterm" name="id2647434"></a>
    26702670This is an example command of how root would set a print quota in CUPS, assuming an existing printer named
    26712671&#8220;<span class="quote">quotaprinter</span>&#8221;:
    2672 <a class="indexterm" name="id2640479"></a>
     2672<a class="indexterm" name="id2647449"></a>
    26732673</p><pre class="screen">
    26742674<code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p quotaprinter -o job-quota-period=604800 \
     
    26772677This would limit every single user to print no more than 100 pages or 1024 KB of
    26782678data (whichever comes first) within the last 604,800 seconds ( = 1 week).
    2679 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640510"></a>Correct and Incorrect Accounting</h3></div></div></div><p>
     2679</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647481"></a>Correct and Incorrect Accounting</h3></div></div></div><p>
    26802680For CUPS to count correctly, the printfile needs to pass the CUPS pstops filter; otherwise it uses a dummy
    26812681count of &#8220;<span class="quote">one</span>&#8221;. Some print files do not pass it (e.g., image files), but then those are mostly
     
    26882688to a print-ready format for the target printer. This is currently working for about a thousand different
    26892689printer models.  Linuxprinting.org has a driver <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi" target="_top">list</a>.
    2690 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640551"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p>
    2691 <a class="indexterm" name="id2640560"></a>
    2692 <a class="indexterm" name="id2640566"></a>
    2693 <a class="indexterm" name="id2640573"></a>
    2694 <a class="indexterm" name="id2640580"></a>
    2695 <a class="indexterm" name="id2640587"></a>
     2690</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647521"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p>
     2691<a class="indexterm" name="id2647530"></a>
     2692<a class="indexterm" name="id2647537"></a>
     2693<a class="indexterm" name="id2647544"></a>
     2694<a class="indexterm" name="id2647550"></a>
     2695<a class="indexterm" name="id2647557"></a>
    26962696Before CUPS 1.1.16, your only option was to use the Adobe PostScript driver on the Windows clients. The output
    26972697of this driver was not always passed through the <code class="literal">pstops</code> filter on the CUPS/Samba side, and
     
    27042704<code class="filename">cups-samba-1.1.16.tar.gz</code> package). It does <span class="emphasis"><em>not</em></span> work for Windows
    270527059x/Me clients, but it guarantees:
    2706 </p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id2640647"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the
     2706</p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id2647617"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the
    27072707        driver PPD with its own means.</p></li><li><p>That the file will pass through the <code class="literal">pstops</code> filter
    27082708        on the CUPS/Samba server.</p></li><li><p>To page-count correctly the print file.</p></li></ul></div><p>
    27092709You can read more about the setup of this combination in the man page for <code class="literal">cupsaddsmb</code> (which
    27102710is only present with CUPS installed, and only current from CUPS 1.1.16).
    2711 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640692"></a>The page_log File Syntax</h3></div></div></div><p>
    2712 <a class="indexterm" name="id2640700"></a>
     2711</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647662"></a>The page_log File Syntax</h3></div></div></div><p>
     2712<a class="indexterm" name="id2647670"></a>
    27132713These are the items CUPS logs in the <code class="filename">page_log</code> for every page of a job:
    27142714</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>
     
    27282728from IP address <code class="constant">10.160.51.33</code>, printed from one page 440 copies, and
    27292729is set to be billed to <em class="parameter"><code>finance-dep</code></em>.
    2730 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640836"></a>Possible Shortcomings</h3></div></div></div><p>
     2730</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647807"></a>Possible Shortcomings</h3></div></div></div><p>
    27312731What flaws or shortcomings are there with this quota system?
    27322732</p><div class="itemizedlist"><ul type="disc"><li><p>The ones named above (wrongly logged job in case of
     
    27422742        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
    27432743        does not get a meaningful error message from CUPS other than
    2744         &#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="id2640902"></a>Future Developments</h3></div></div></div><p>
     2744        &#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="id2647873"></a>Future Developments</h3></div></div></div><p>
    27452745This is the best system currently available, and there are huge
    27462746improvements under development for CUPS 1.2:
     
    27502750        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
    27512751        about their accounts in advance.</p></li><li><p>Probably there will be support for some other tools
    2752         around this topic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2640942"></a>Other Accounting Tools</h3></div></div></div><p>
     2752        around this topic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2647913"></a>Other Accounting Tools</h3></div></div></div><p>
    27532753Other accounting tools that can be used includes: PrintAnalyzer, pyKota, printbill, LogReport.
    27542754For more information regarding these tools you can try a Google search.
    2755 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2640956"></a>Additional Material</h2></div></div></div><p>
     2755</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2647927"></a>Additional Material</h2></div></div></div><p>
    27562756A printer queue with <span class="emphasis"><em>no</em></span> PPD associated to it is a
    27572757&#8220;<span class="quote">raw</span>&#8221; printer, and all files will go directly there as received by the
     
    28322832to load the proper paper type before running the 10,000 page job
    28332833requested by marketing for the mailing, and so on).
    2834 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2641173"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p>
    2835 <a class="indexterm" name="id2641181"></a>
    2836 <a class="indexterm" name="id2641188"></a>
    2837 <a class="indexterm" name="id2641195"></a>
     2834</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2648144"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p>
     2835<a class="indexterm" name="id2648152"></a>
     2836<a class="indexterm" name="id2648159"></a>
     2837<a class="indexterm" name="id2648166"></a>
    28382838Samba print files pass through two spool directories. One is the incoming directory managed by Samba (set in
    2839 the <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
     2839the <a class="link" href="smb.conf.5.html#PATH" target="_top">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
    28402840CUPS it is normally <code class="filename">/var/spool/cups/</code>, as set by the <code class="filename">cupsd.conf</code>
    28412841directive <code class="filename">RequestRoot /var/spool/cups</code>.
    2842 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641249"></a>CUPS Configuration Settings Explained</h3></div></div></div><p>
     2842</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2648220"></a>CUPS Configuration Settings Explained</h3></div></div></div><p>
    28432843Some important parameter settings in the CUPS configuration file
    28442844<code class="filename">cupsd.conf</code> are:
     
    28642864(There are also additional settings for <em class="parameter"><code>MaxJobsPerUser</code></em> and
    28652865<em class="parameter"><code>MaxJobsPerPrinter</code></em>.)
    2866 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641334"></a>Preconditions</h3></div></div></div><p>
     2866</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2648305"></a>Preconditions</h3></div></div></div><p>
    28672867For everything to work as it should, you need to have three things:
    28682868</p><div class="itemizedlist"><ul type="disc"><li><p>A Samba smbd that is compiled against <code class="filename">libcups</code> (check
    28692869        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
    2870                         <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
    2871                         <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>
     2870                        <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = cups</a>.</p></li><li><p>Another Samba <code class="filename">smb.conf</code> setting of
     2871                        <a class="link" href="smb.conf.5.html#PRINTCAP" target="_top">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>
    28722872In this case, all other manually set printing-related commands (like
    2873 <a class="link" href="smb.conf.5.html#PRINTCOMMAND">print command</a>,
    2874 <a class="link" href="smb.conf.5.html#LPQCOMMAND">lpq command</a>,
    2875 <a class="link" href="smb.conf.5.html#LPRMCOMMAND">lprm command</a>,
    2876 <a class="link" href="smb.conf.5.html#LPPAUSECOMMAND">lppause command</a>, and
    2877 <a class="link" href="smb.conf.5.html#LPRESUMECOMMAND">lpresume command</a>) are ignored, and they should normally have no
     2873<a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command</a>,
     2874<a class="link" href="smb.conf.5.html#LPQCOMMAND" target="_top">lpq command</a>,
     2875<a class="link" href="smb.conf.5.html#LPRMCOMMAND" target="_top">lprm command</a>,
     2876<a class="link" href="smb.conf.5.html#LPPAUSECOMMAND" target="_top">lppause command</a>, and
     2877<a class="link" href="smb.conf.5.html#LPRESUMECOMMAND" target="_top">lpresume command</a>) are ignored, and they should normally have no
    28782878influence whatsoever on your printing.
    2879 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641472"></a>Manual Configuration</h3></div></div></div><p>
    2880 If you want to do things manually, replace the <a class="link" href="smb.conf.5.html#PRINTING">printing = cups</a>
    2881 by <a class="link" href="smb.conf.5.html#PRINTING">printing = bsd</a>. Then your manually set commands may work
    2882 (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>
     2879</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2648444"></a>Manual Configuration</h3></div></div></div><p>
     2880If you want to do things manually, replace the <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = cups</a>
     2881by <a class="link" href="smb.conf.5.html#PRINTING" target="_top">printing = bsd</a>. Then your manually set commands may work
     2882(I haven't tested this), and a <a class="link" href="smb.conf.5.html#PRINTCOMMAND" target="_top">print command = lp -d %P %s; rm %s</a>
    28832883may do what you need.
    2884 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2641520"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p>
    2885 <a class="indexterm" name="id2641529"></a>
    2886 <a class="indexterm" name="id2641535"></a>
     2884</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2648491"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p>
     2885<a class="indexterm" name="id2648500"></a>
     2886<a class="indexterm" name="id2648506"></a>
    28872887From time to time the question arises, how can you print <span class="emphasis"><em>to</em></span> a Windows-attached printer
    28882888<span class="emphasis"><em>from</em></span> Samba? Normally the local connection from Windows host to printer would be done by
     
    29192919<code class="prompt">root# </code><strong class="userinput"><code>ln -s `which smbspool` /usr/lib/cups/backend/smb</code></strong>
    29202920</pre><p>
    2921 <a class="indexterm" name="id2641665"></a>
    2922 <a class="indexterm" name="id2641671"></a>
     2921<a class="indexterm" name="id2648636"></a>
     2922<a class="indexterm" name="id2648643"></a>
    29232923<code class="literal">smbspool</code> was written by Mike Sweet from the CUPS folks. It is included and ships with
    29242924Samba. It may also be used with print subsystems other than CUPS, to spool jobs to Windows printer shares. To
     
    29352935  -P /path/to/PPD</code></strong>
    29362936</pre><p>
    2937 <a class="indexterm" name="id2641732"></a>
    2938 <a class="indexterm" name="id2641739"></a>
    2939 <a class="indexterm" name="id2641745"></a>
     2937<a class="indexterm" name="id2648703"></a>
     2938<a class="indexterm" name="id2648710"></a>
     2939<a class="indexterm" name="id2648717"></a>
    29402940The PPD must be able to direct CUPS to generate the print data for the target model. For PostScript printers,
    29412941just use the PPD that would be used with the Windows NT PostScript driver. But what can you do if the printer
     
    29502950feature of CUPS and you do not necessarily need to have smbd running.
    29512951
    2952 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2641816"></a>More CUPS Filtering Chains</h2></div></div></div><p>
     2952</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2648787"></a>More CUPS Filtering Chains</h2></div></div></div><p>
    29532953The 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
    29542954cupsomatic</a> show how CUPS handles print jobs.
    2955 </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="id2641927"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2641933"></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
     2955</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="id2648899"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2648904"></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
    29562956        characters (or &#8220;<span class="quote">8 plus 3 chars suffix</span>&#8221;) max; otherwise, the driver files
    2957         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
     2957        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" target="_top">security = user</a>? Have
    29582958        you used <code class="literal">smbpasswd</code> to give root a Samba account?
    29592959        You can do two things: open another terminal and execute
     
    29642964        If the error is &#8220;<span class="quote">Tree connect failed: NT_STATUS_BAD_NETWORK_NAME</span>&#8221;,
    29652965        you may have forgotten to create the <code class="filename">/etc/samba/drivers</code> directory.
    2966         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642010"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</h3></div></div></div><p>
     2966        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2648981"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; or &#8220;<span class="quote">rpcclient addriver</span>&#8221; Emit Error</h3></div></div></div><p>
    29672967        If <code class="literal">cupsaddsmb</code>, or <code class="literal">rpcclient addriver</code> emit the error message
    2968         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>.
    2969         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642048"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</h3></div></div></div><p>
     2968        WERR_BAD_PASSWORD, refer to <a class="link" href="CUPS-printing.html#root-ask-loop" title="cupsaddsmb Keeps Asking for Root Password in Never-ending Loop">the previous common error</a>.
     2969        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649019"></a>&#8220;<span class="quote">cupsaddsmb</span>&#8221; Errors</h3></div></div></div><p>
    29702970        The use of &#8220;<span class="quote">cupsaddsmb</span>&#8221; gives &#8220;<span class="quote">No PPD file for printer...</span>&#8221;
    29712971        message while PPD file is present.  What might the problem be?
     
    29782978        </p><p>Is your <em class="parameter"><code>TempDir</code></em> directive in
    29792979        <code class="filename">cupsd.conf</code> set to a valid value, and is it writable?
    2980         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642122"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user
     2980        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649093"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user
    29812981        you are from Samba's point of view. Do you have the privileges to
    29822982        write into the <em class="parameter"><code>[print$]</code></em>
    2983         share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642146"></a>New Account Reconnection from Windows 200x/XP Troubles</h3></div></div></div><p>
     2983        share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649118"></a>New Account Reconnection from Windows 200x/XP Troubles</h3></div></div></div><p>
    29842984Once you are connected as the wrong user (for example, as <code class="constant">nobody</code>, which often occurs if
    2985 you have <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>), Windows Explorer will not accept an
     2985you have <a class="link" href="smb.conf.5.html#MAPTOGUEST" target="_top">map to guest = bad user</a>), Windows Explorer will not accept an
    29862986attempt to connect again as a different user. There will not be any bytes transferred on the wire to Samba,
    29872987but still you'll see a stupid error message that makes you think Samba has denied access. Use
     
    29962996the <span class="guilabel">Network Neighborhood</span>), right-click on the printer in question, and select
    29972997<span class="guibutton">Connect....</span>.
    2998 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642237"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p>
    2999 <a class="indexterm" name="id2642246"></a>
     2998</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649209"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p>
     2999<a class="indexterm" name="id2649217"></a>
    30003000You see per <code class="literal">smbstatus</code> that you are connected as user nobody, but you want to be root or
    3001 printer admin. This is probably due to <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>, which
     3001printer admin. This is probably due to <a class="link" href="smb.conf.5.html#MAPTOGUEST" target="_top">map to guest = bad user</a>, which
    30023002silently connected you under the guest account when you gave (maybe by accident) an incorrect username. Remove
    3003 <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest</a> if you want to prevent this.
    3004 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642289"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p>
     3003<a class="link" href="smb.conf.5.html#MAPTOGUEST" target="_top">map to guest</a> if you want to prevent this.
     3004</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649260"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p>
    30053005This information came from a mailing list posting regarding problems experienced when
    30063006upgrading from Adobe drivers to CUPS drivers on Microsoft Windows NT/200x/XP clients.
    30073007</p><p>First delete all old Adobe-using printers. Then delete all old Adobe drivers. (On Windows 200x/XP, right-click in
    30083008the background of <span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties...</span>, select
    3009 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="id2642326"></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
     3009tab <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="id2649298"></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
    30103010this way: <strong class="userinput"><code>cupsaddsmb -U <em class="replaceable"><code>DOMAINNAME</code></em>\\root -v
    30113011<em class="replaceable"><code>printername</code></em></code></strong>&gt; (note the two backslashes: the first one is
    3012 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="id2642362"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the
     3012required 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="id2649333"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the
    30133013driver too (to verify, right-click on the white background of the
    30143014<span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties</span> and click on the
     
    30163016install a printer with the same name. If you want to update to a new
    30173017driver, delete the old ones first. Deletion is only possible if no
    3018 other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642397"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id2642403"></a><a class="indexterm" name="id2642410"></a><p>Local security policies may not allow the installation of unsigned drivers  &#8220;<span class="quote">local
    3019 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="id2642430"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p>
    3020 <a class="indexterm" name="id2642438"></a>
    3021 <a class="indexterm" name="id2642445"></a>
     3018other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649368"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id2649374"></a><a class="indexterm" name="id2649381"></a><p>Local security policies may not allow the installation of unsigned drivers  &#8220;<span class="quote">local
     3019security 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="id2649401"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p>
     3020<a class="indexterm" name="id2649410"></a>
     3021<a class="indexterm" name="id2649417"></a>
    30223022Windows XP handles SMB printers on a &#8220;<span class="quote">per-user</span>&#8221; basis.
    30233023This means every user needs to install the printer himself or herself. To have a printer available for
     
    30253025path of <em class="parameter"><code>http://cupsserver:631/printers/printername</code></em>.  We're still looking into this one.
    30263026Maybe a logon script could automatically install printers for all users.
    3027 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642471"></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>
    3028 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="id2642496"></a>Windows XP SP1</h3></div></div></div><p>Windows XP SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to
     3027</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649442"></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>
     3028service 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="id2649468"></a>Windows XP SP1</h3></div></div></div><p>Windows XP SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to
    30293029&#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
    30303030to <span class="guimenu">User Configuration -&gt; Administrative Templates -&gt; Control Panel -&gt; Printers</span>. The policy
     
    30333033<code class="constant">Users can only Point and Print to these servers</code> to make driver downloads from Samba
    30343034possible.
    3035 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642543"></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
     3035</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649514"></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
    30363036different ways to bring you to a dialog that <span class="emphasis"><em>seems</em></span> to set everything. All three dialogs
    30373037<span class="emphasis"><em>look</em></span> the same, yet only one of them does what you intend. You need to be Administrator or
     
    30633063&#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
    30643064all clients to get the same defaults, you need to conduct these steps <span class="emphasis"><em>as Administrator</em></span>
    3065 (<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
     3065(<a class="link" href="smb.conf.5.html#PRINTERADMIN" target="_top">printer admin</a> in <code class="filename">smb.conf</code>) <span class="emphasis"><em>before</em></span> a client downloads the
    30663066driver (the clients can later set their own <span class="emphasis"><em>per-user defaults</em></span> by following the procedures
    30673067<span class="emphasis"><em>A</em></span> or <span class="emphasis"><em>B</em></span>).
    3068 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642826"></a>Most Common Blunders in Driver Settings on Windows Clients</h3></div></div></div><p>
     3068</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649797"></a>Most Common Blunders in Driver Settings on Windows Clients</h3></div></div></div><p>
    30693069Don't use <em class="parameter"><code>Optimize for Speed</code></em>, but use <em class="parameter"><code>Optimize for Portability</code></em>
    30703070instead (Adobe PS Driver). Don't use <em class="parameter"><code>Page Independence: No</code></em>. Always settle with
     
    30733073Driver). For <span class="guilabel">TrueType Download Options</span> choose <code class="constant">Outline</code>. Use
    30743074PostScript Level 2 if you are having trouble with a non-PS printer and if there is a choice.
    3075 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642881"></a><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</h3></div></div></div><p>
     3075</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649853"></a><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</h3></div></div></div><p>
    30763076Symptom: The last command of <code class="literal">cupsaddsmb</code> does not complete successfully. If the <code class="literal">cmd
    30773077= setdriver printername printername</code> result was NT_STATUS_UNSUCCESSFUL, then possibly the printer was
     
    30793079hostname -c `enumprinters'</code>? Restart smbd (or send a <code class="literal">kill -HUP</code> to all processes
    30803080listed by <code class="literal">smbstatus</code>, and try again.
    3081 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2642931"></a>Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</h3></div></div></div><p>
     3081</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2649902"></a>Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</h3></div></div></div><p>
    30823082Have you ever by accident set the CUPS spool directory to the same location (<em class="parameter"><code>RequestRoot
    30833083/var/spool/samba/</code></em> in <code class="filename">cupsd.conf</code> or the other way round:
    3084 <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
    3085 /var/spool/cups/</code></em> in <code class="filename">cupsd.conf</code> and <a class="link" href="smb.conf.5.html#PATH">path =
     3084<code class="filename">/var/spool/cups/</code> is set as <a class="link" href="smb.conf.5.html#PATH" target="_top">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
     3085/var/spool/cups/</code></em> in <code class="filename">cupsd.conf</code> and <a class="link" href="smb.conf.5.html#PATH" target="_top">path =
    30863086/var/spool/samba</a> in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>. Otherwise,
    30873087cupsd will sanitize permissions to its spool directory with each restart and printing will not work reliably.
    3088 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643029"></a>Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</h3></div></div></div><p>
     3088</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650001"></a>Print Queue Called &#8220;<span class="quote">lp</span>&#8221; Mishandles Print Jobs</h3></div></div></div><p>
    30893089In this case a print queue called &#8220;<span class="quote">lp</span>&#8221; intermittently swallows jobs and
    30903090spits out completely different ones from what was sent.
    30913091</p><p>
    3092 <a class="indexterm" name="id2643049"></a>
    3093 <a class="indexterm" name="id2643056"></a>
    3094 <a class="indexterm" name="id2643063"></a>
     3092<a class="indexterm" name="id2650021"></a>
     3093<a class="indexterm" name="id2650028"></a>
     3094<a class="indexterm" name="id2650035"></a>
    30953095It is a bad idea to name any printer &#8220;<span class="quote">lp</span>&#8221;. This is the traditional UNIX name for the default
    30963096printer. CUPS may be set up to do an automatic creation of Implicit Classes. This means, to group all printers
     
    31013101<em class="replaceable"><code>printername@cupshost</code></em>, which gives you better control over what may happen in a
    31023102large networked environment.
    3103 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2643098"></a>Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</h3></div></div></div><p>
     3103</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650070"></a>Location of Adobe PostScript Driver Files for &#8220;<span class="quote">cupsaddsmb</span>&#8221;</h3></div></div></div><p>
    31043104Use <code class="literal">smbclient</code> to connect to any Windows box with a shared PostScript printer:
    31053105<code class="literal">smbclient //windowsbox/print\$ -U guest</code>. You can navigate to the
     
    31073107<code class="filename">WIN40/0</code> to do the same.  Another option is to download the <code class="filename">*.exe</code>
    31083108packaged files from the Adobe Web site.
    3109 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2643152"></a>Overview of the CUPS Printing Processes</h2></div></div></div><p>
     3109</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2650124"></a>Overview of the CUPS Printing Processes</h2></div></div></div><p>
    31103110A 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
    31113111Printing Overview diagram</a>.
    3112 </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.id2632393" href="#id2632393" 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>
     3112</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.id2639362" href="#id2639362" 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.