- Timestamp:
- Sep 30, 2008, 7:14:08 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/docs/htmldocs/Samba3-HOWTO/CUPS-printing.html
r134 r158 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 22. CUPS Printing Support</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="The Official Samba 3.2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="classicalprinting.html" title="Chapter 21. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 23. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. CUPS Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 22. CUPS Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH <br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></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"><<a class="email" href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>></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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></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#id 416419">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id416425">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id416476">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id416588">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id416695">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id416919">Simple <code class="filename">smb.conf</code> Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417155">More Complex CUPS <code class="filename">smb.conf</code> Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id417537">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id417551">Central Spooling vs. “<span class="quote">Peer-to-Peer</span>” Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417596">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id417810">Installation of Windows Client Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-raw">Explicitly Enable “<span class="quote">raw</span>” Printing for <span class="emphasis"><em>application/octet-stream</em></span></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418073">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id418184">Advanced Intelligent Printing with PostScript Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#gdipost">GDI on Windows, PostScript on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418358">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418524">UNIX Printfile Conversion and GUI Basics</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#post-and-ghost">PostScript and Ghostscript</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418848">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id418988">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419056">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419165">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id419200">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id419416">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id419826">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420021">Filtering Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420169">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420346">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420506">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420757">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id420837">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421049">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421357">The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421572">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421583"><code class="filename">mime.convs</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421644">“<span class="quote">Raw</span>” Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id421744">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422005">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422269"><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422583">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id422984">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423093">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423172">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423186">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423245">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423310">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423409">Network Printing (Windows Clients and UNIX/Samba Print2 Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id 423425">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423600">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423671">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423751">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423788">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id423848">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id423860">Printer Drivers Running in “<span class="quote">Kernel Mode</span>” Cause Many3 Problems</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id 423891">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423905">CUPS: A “<span class="quote">Magical Stone</span>”?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id423941">PostScript Drivers with No Major Problems, Even in Kernel4 Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id 424020">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id424038"><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424126">Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424414">CUPS “<span class="quote">PostScript Driver for Windows NT/200x/XP</span>”</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424635">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424746">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424766">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id424821">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425100">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425295">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425429">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425560">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425696">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425806">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425884">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id425962">Installing the PostScript Driver on a Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-avoidps1">Avoiding Critical PostScript Driver Settings on the Client</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id426171">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id426337">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426497">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426589">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426709">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id426920">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id427799">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id427930">The Printing <code class="filename">*.tdb</code> Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id428129">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428191">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428252">Losing <code class="filename">*.tdb</code> Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id428299">Using <code class="literal">tdbbackup</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id428409">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id428570">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429283">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id429705">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id429735">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429785">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429818">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id429949">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430085">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430143">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430178">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id430191">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id430379">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id430451">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430528">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id430657">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id430701">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id430957">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id431066">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id431072">Windows 9x/Me Client Can't Install Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#root-ask-loop">“<span class="quote">cupsaddsmb</span>” Keeps Asking for Root Password in Never-ending Loop</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431141">“<span class="quote">cupsaddsmb</span>” or “<span class="quote">rpcclient addriver</span>” Emit Error</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431178">“<span class="quote">cupsaddsmb</span>” Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431248">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431271">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431352">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431398">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431432">Can't Use “<span class="quote">cupsaddsmb</span>” on Samba Server, Which Is a PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431467">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431498">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431529">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431566">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431589">Win XP-SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431631">Print Options for All Users Can't Be Set on Windows 200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431898">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431951"><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id431997">Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id432090">Print Queue Called “<span class="quote">lp</span>” Mishandles Print Jobs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id432153">Location of Adobe PostScript Driver Files for “<span class="quote">cupsaddsmb</span>”</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id432204">Overview of the CUPS Printing Processes</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id416419"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id416425"></a>Features and Benefits</h3></div></div></div><p>5 <a class="indexterm" name="id 416433"></a>1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 22. CUPS Printing Support</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="The Official Samba 3.2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="classicalprinting.html" title="Chapter 21. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 23. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. CUPS Printing Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 22. CUPS Printing Support</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH <br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></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"><<a class="email" href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>></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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></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#id390719">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id390724">Features and Benefits</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id390775">Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id390884">Basic CUPS Support Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id390991">Linking smbd with libcups.so</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id391215">Simple <code class="filename">smb.conf</code> Settings for CUPS</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id391445">More Complex CUPS <code class="filename">smb.conf</code> Settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id391804">Advanced Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id391818">Central Spooling vs. “<span class="quote">Peer-to-Peer</span>” Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id391863">Raw Print Serving: Vendor Drivers on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id392077">Installation of Windows Client Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#cups-raw">Explicitly Enable “<span class="quote">raw</span>” Printing for <span class="emphasis"><em>application/octet-stream</em></span></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id392341">Driver Upload Methods</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id392452">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#id392626">Windows Drivers, GDI, and EMF</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id392792">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#id393116">Ghostscript: The Software RIP for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id393256">PostScript Printer Description (PPD) Specification</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id393324">Using Windows-Formatted Vendor PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id393433">CUPS Also Uses PPDs for Non-PostScript Printers</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id393468">The CUPS Filtering Architecture</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id393684">MIME Types and CUPS Filters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394094">MIME Type Conversion Rules</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394289">Filtering Overview</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394437">Prefilters</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394614">pstops</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id394774">pstoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395025">imagetops and imagetoraster</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395105">rasterto [printers specific]</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395317">CUPS Backends</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395625">The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395840">The Complete Picture</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395851"><code class="filename">mime.convs</code></a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id395912">“<span class="quote">Raw</span>” Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396012">application/octet-stream Printing</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396273">PostScript Printer Descriptions for Non-PostScript Printers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id396537"><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#id396851">Examples for Filtering Chains</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397252">Sources of CUPS Drivers/PPDs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397361">Printing with Interface Scripts</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id397440">Network Printing (Purely Windows)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id397454">From Windows Clients to an NT Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397513">Driver Execution on the Client</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397578">Driver Execution on the Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id397677">Network Printing (Windows Clients and UNIX/Samba Print 2 Servers)</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id397693">From Windows Clients to a CUPS/Samba Print Server</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id397868">Samba Receiving Job-Files and Passing Them to CUPS</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id397939">Network PostScript RIP</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id398019">PPDs for Non-PS Printers on UNIX</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398056">PPDs for Non-PS Printers on Windows</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id398116">Windows Terminal Servers (WTS) as CUPS Clients</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id398128">Printer Drivers Running in “<span class="quote">Kernel Mode</span>” Cause Many 3 Problems</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398159">Workarounds Impose Heavy Limitations</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398173">CUPS: A “<span class="quote">Magical Stone</span>”?</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398209">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#id398288">Configuring CUPS for Driver Download</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id398306"><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398394">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#id398670">CUPS “<span class="quote">PostScript Driver for Windows NT/200x/XP</span>”</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id398892">Recognizing Different Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399003">Acquiring the Adobe Driver Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399023">ESP Print Pro PostScript Driver for Windows NT/200x/XP</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399077">Caveats to Be Considered</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399357">Windows CUPS PostScript Driver Versus Adobe Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399552">Run cupsaddsmb (Quiet Mode)</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399686">Run cupsaddsmb with Verbose Output</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399816">Understanding cupsaddsmb</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id399952">How to Recognize If cupsaddsmb Completed Successfully</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400063">cupsaddsmb with a Samba PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400140">cupsaddsmb Flowchart</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400218">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#id400428">Installing PostScript Driver Files Manually Using rpcclient</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id400594">A Check of the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400754">Understanding the rpcclient man Page</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400846">Producing an Example by Querying a Windows Box</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id400965">Requirements for adddriver and setdriver to Succeed</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id401176">Manual Driver Installation in 15 Steps</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402054">Troubleshooting Revisited</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id402186">The Printing <code class="filename">*.tdb</code> Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id402385">Trivial Database Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402447">Binary Format</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402508">Losing <code class="filename">*.tdb</code> Files</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id402554">Using <code class="literal">tdbbackup</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id402665">CUPS Print Drivers from Linuxprinting.org</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id402825">foomatic-rip and Foomatic Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id403538">foomatic-rip and Foomatic PPD Download and Installation</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id403960">Page Accounting with CUPS</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id403990">Setting Up Quotas</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404041">Correct and Incorrect Accounting</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404074">Adobe and CUPS PostScript Drivers for Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404205">The page_log File Syntax</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404341">Possible Shortcomings</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404399">Future Developments</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404434">Other Accounting Tools</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id404447">Additional Material</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id404635">Autodeletion or Preservation of CUPS Spool Files</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id404706">CUPS Configuration Settings Explained</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404783">Preconditions</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id404913">Manual Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id404956">Printing from CUPS to Windows-Attached Printers</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id405213">More CUPS Filtering Chains</a></span></dt><dt><span class="sect1"><a href="CUPS-printing.html#id405322">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="CUPS-printing.html#id405327">Windows 9x/Me Client Can't Install Driver</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#root-ask-loop">“<span class="quote">cupsaddsmb</span>” Keeps Asking for Root Password in Never-ending Loop</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405397">“<span class="quote">cupsaddsmb</span>” or “<span class="quote">rpcclient addriver</span>” Emit Error</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405434">“<span class="quote">cupsaddsmb</span>” Errors</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405504">Client Can't Connect to Samba Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405527">New Account Reconnection from Windows 200x/XP Troubles</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405607">Avoid Being Connected to the Samba Server as the Wrong User</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405654">Upgrading to CUPS Drivers from Adobe Drivers</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405688">Can't Use “<span class="quote">cupsaddsmb</span>” on Samba Server, Which Is a PDC</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405722">Deleted Windows 200x Printer Driver Is Still Shown</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405753">Windows 200x/XP Local Security Policies</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405784">Administrator Cannot Install Printers for All Local Users</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405821">Print Change, Notify Functions on NT Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405845">Windows XP SP1</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id405887">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#id406154">Most Common Blunders in Driver Settings on Windows Clients</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406206"><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406252">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#id406346">Print Queue Called “<span class="quote">lp</span>” Mishandles Print Jobs</a></span></dt><dt><span class="sect2"><a href="CUPS-printing.html#id406408">Location of Adobe PostScript Driver Files for “<span class="quote">cupsaddsmb</span>”</a></span></dt></dl></dd><dt><span class="sect1"><a href="CUPS-printing.html#id406459">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="id390719"></a>Introduction</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id390724"></a>Features and Benefits</h3></div></div></div><p> 5 <a class="indexterm" name="id390732"></a> 6 6 The Common UNIX Print System (<a class="ulink" href="http://www.cups.org/" target="_top">CUPS</a>) 7 7 has become quite popular. All major Linux distributions now ship it as their default printing … … 12 12 that is also relevant to CUPS. 13 13 </p><p> 14 <a class="indexterm" name="id 416463"></a>14 <a class="indexterm" name="id390762"></a> 15 15 CUPS sports quite a few unique and powerful features. While its basic functions may be grasped quite 16 16 easily, they are also new. Because it is different from other, more traditional printing systems, it is best … … 18 18 the beginning. This documentation will lead you to a complete understanding of CUPS. Let's start with the most 19 19 basic things first. 20 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 416476"></a>Overview</h3></div></div></div><p>21 <a class="indexterm" name="id 416484"></a>22 <a class="indexterm" name="id 416490"></a>23 <a class="indexterm" name="id 416497"></a>24 <a class="indexterm" name="id 416504"></a>25 <a class="indexterm" name="id 416511"></a>26 <a class="indexterm" name="id 416520"></a>27 <a class="indexterm" name="id 416530"></a>28 <a class="indexterm" name="id 416536"></a>20 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id390775"></a>Overview</h3></div></div></div><p> 21 <a class="indexterm" name="id390783"></a> 22 <a class="indexterm" name="id390790"></a> 23 <a class="indexterm" name="id390796"></a> 24 <a class="indexterm" name="id390803"></a> 25 <a class="indexterm" name="id390810"></a> 26 <a class="indexterm" name="id390820"></a> 27 <a class="indexterm" name="id390829"></a> 28 <a class="indexterm" name="id390835"></a> 29 29 CUPS is more than just a print spooling system. It is a complete printer management system that 30 30 complies with the new Internet Printing Protocol (IPP). IPP is an industry and Internet Engineering Task Force … … 34 34 like KDE's overwhelming <a class="ulink" href="http://printing.kde.org/" target="_top">KDEPrint</a>). 35 35 </p><p> 36 <a class="indexterm" name="id 416557"></a>37 <a class="indexterm" name="id 416564"></a>36 <a class="indexterm" name="id390856"></a> 37 <a class="indexterm" name="id390863"></a> 38 38 CUPS allows creation of <span class="emphasis"><em>raw</em></span> printers (i.e., no print file format translation) as 39 39 well as <span class="emphasis"><em>smart</em></span> printers (i.e., CUPS does file format conversion as required for the … … 41 41 course, if you are a CUPS advocate, you would argue that CUPS is better! In any case, let us now explore how 42 42 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="id 416588"></a>Basic CUPS Support Configuration</h2></div></div></div><p>44 <a class="indexterm" name="id 416596"></a>45 <a class="indexterm" name="id 416603"></a>46 <a class="indexterm" name="id 416609"></a>47 <a class="indexterm" name="id 416616"></a>48 <a class="indexterm" name="id 416623"></a>43 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id390884"></a>Basic CUPS Support Configuration</h2></div></div></div><p> 44 <a class="indexterm" name="id390892"></a> 45 <a class="indexterm" name="id390899"></a> 46 <a class="indexterm" name="id390906"></a> 47 <a class="indexterm" name="id390912"></a> 48 <a class="indexterm" name="id390919"></a> 49 49 Printing 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 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 … … 56 56 cupsd.conf</code> and other CUPS-related documentation, like the wealth of documents regarding the CUPS 57 57 server 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="id 416695"></a>Linking smbd with libcups.so</h3></div></div></div><p>59 <a class="indexterm" name="id 416703"></a>58 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id390991"></a>Linking smbd with libcups.so</h3></div></div></div><p> 59 <a class="indexterm" name="id390999"></a> 60 60 Samba has a special relationship to CUPS. Samba can be compiled with CUPS library support. 61 61 Most recent installations have this support enabled. By default, CUPS linking is compiled … … 64 64 there are some differences in required or supported configuration. 65 65 </p><p> 66 <a class="indexterm" name="id 416725"></a>67 <a class="indexterm" name="id 416732"></a>66 <a class="indexterm" name="id391021"></a> 67 <a class="indexterm" name="id391028"></a> 68 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> 69 69 uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V … … 80 80 </pre><p> 81 81 </p><p> 82 <a class="indexterm" name="id 416796"></a>82 <a class="indexterm" name="id391092"></a> 83 83 The line <code class="computeroutput">libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000)</code> shows 84 84 there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups … … 96 96 <a class="link" href="smb.conf.5.html#QUEUEPAUSECOMMAND">queuepause command</a> and 97 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="id 416919"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p>98 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id391215"></a>Simple <code class="filename">smb.conf</code> Settings for CUPS</h3></div></div></div><p> 99 99 To summarize, <a class="link" href="CUPS-printing.html#cups-exam-simple" title="Example 22.1. Simplest Printing-Related smb.conf">the Simplest Printing-Related 100 100 <code class="filename">smb.conf</code> file</a> shows the simplest printing-related setup for <code class="filename">smb.conf</code> to 101 101 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="id 416979"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id416990"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417002"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id417022"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id417034"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id417045"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417057"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417068"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417080"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417091"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417102"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr></table></div></div><br class="example-break"><p>103 <a class="indexterm" name="id 417117"></a>104 <a class="indexterm" name="id 417124"></a>105 <a class="indexterm" name="id 417131"></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="id391275"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391286"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id391298"></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="id391318"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id391330"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id391341"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id391353"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391364"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id391376"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391387"></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="id391402"></a> 104 <a class="indexterm" name="id391409"></a> 105 <a class="indexterm" name="id391416"></a> 106 106 This is all you need for basic printing setup for CUPS. It will print all graphic, text, PDF, and PostScript 107 107 files submitted from Windows clients. However, most of your Windows users would not know how to send these … … 113 113 PostScript device, the print data stream is “<span class="quote">binary,</span>” sensible only for the target printer. Read 114 114 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="id 417155"></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="id391445"></a>More Complex CUPS <code class="filename">smb.conf</code> Settings</h3></div></div></div><p> 116 116 <a class="link" href="CUPS-printing.html#overridesettings" title="Example 22.2. Overriding Global CUPS Settings for One Printer">The Overriding Global CUPS Settings for One Printer example</a> 117 117 is a slightly more complex printing-related setup for <code class="filename">smb.conf</code>. It enables general CUPS printing 118 118 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="id 417208"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417220"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id417231"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id417252"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id417263"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id417274"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417286"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417297"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417309"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417320"></a><em class="parameter"><code>printer admin = root, @ntadmins</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[special_printer]</code></em></td></tr><tr><td><a class="indexterm" name="id417341"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id417353"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id417364"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id417376"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id417387"></a><em class="parameter"><code>print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ; echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ; echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log ; rm %f </code></em></td></tr><tr><td><a class="indexterm" name="id417401"></a><em class="parameter"><code>public = no</code></em></td></tr><tr><td><a class="indexterm" name="id417412"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id417424"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id417435"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id417447"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id417458"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id417470"></a><em class="parameter"><code>hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60</code></em></td></tr></table></div></div><br class="example-break"><p>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="id391498"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id391510"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id391521"></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="id391542"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id391553"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id391564"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391576"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id391587"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391599"></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="id391620"></a><em class="parameter"><code>comment = A special printer with his own settings</code></em></td></tr><tr><td><a class="indexterm" name="id391631"></a><em class="parameter"><code>path = /var/spool/samba-special</code></em></td></tr><tr><td><a class="indexterm" name="id391643"></a><em class="parameter"><code>printing = sysv</code></em></td></tr><tr><td><a class="indexterm" name="id391654"></a><em class="parameter"><code>printcap = lpstat</code></em></td></tr><tr><td><a class="indexterm" name="id391666"></a><em class="parameter"><code>print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ; echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ; echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log ; rm %f </code></em></td></tr><tr><td><a class="indexterm" name="id391680"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id391691"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id391703"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id391714"></a><em class="parameter"><code>printer admin = kurt</code></em></td></tr><tr><td><a class="indexterm" name="id391726"></a><em class="parameter"><code>hosts deny = 0.0.0.0</code></em></td></tr><tr><td><a class="indexterm" name="id391737"></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> 120 120 This special share is only for testing purposes. It does not write the print job to a file. It just logs the job parameters 121 121 known to Samba into the <code class="filename">/tmp/smbprn.log</code> file and deletes the job-file. Moreover, the … … 124 124 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 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="id 417537"></a>Advanced Configuration</h2></div></div></div><p>126 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id391804"></a>Advanced Configuration</h2></div></div></div><p> 127 127 Before we delve into all the configuration options, let us clarify a few points. <span class="emphasis"><em>Network printing 128 128 needs to be organized and set up correctly</em></span>. This frequently doesn't happen. Legacy systems or small 129 129 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="id 417551"></a>Central Spooling vs. “<span class="quote">Peer-to-Peer</span>” Printing</h3></div></div></div><p>131 <a class="indexterm" name="id 417563"></a>132 <a class="indexterm" name="id 417569"></a>133 <a class="indexterm" name="id 417579"></a>130 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id391818"></a>Central Spooling vs. “<span class="quote">Peer-to-Peer</span>” Printing</h3></div></div></div><p> 131 <a class="indexterm" name="id391830"></a> 132 <a class="indexterm" name="id391837"></a> 133 <a class="indexterm" name="id391846"></a> 134 134 Many small office or home networks, as well as badly organized larger environments, allow each client a direct 135 135 access to available network printers. This is generally a bad idea. It often blocks one client's access to the … … 139 139 central system, which responds immediately, takes jobs from multiple concurrent clients, and transfers them to 140 140 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="id 417596"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p>142 <a class="indexterm" name="id 417604"></a>143 <a class="indexterm" name="id 417611"></a>141 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id391863"></a>Raw Print Serving: Vendor Drivers on Windows Clients</h3></div></div></div><p> 142 <a class="indexterm" name="id391871"></a> 143 <a class="indexterm" name="id391878"></a> 144 144 Most traditionally configured UNIX print servers acting on behalf of 145 145 Samba's Windows clients represented a really simple setup. Their only … … 150 150 be installed on each and every client for the target device. 151 151 </p><p> 152 <a class="indexterm" name="id 417628"></a>153 <a class="indexterm" name="id 417635"></a>152 <a class="indexterm" name="id391895"></a> 153 <a class="indexterm" name="id391902"></a> 154 154 It is possible to configure CUPS, Samba, and your Windows clients in the 155 155 same traditional and simple way. When CUPS printers are configured … … 165 165 attached to the Windows client. You then redirect output to a raw network 166 166 print queue. This procedure may be followed to achieve this: 167 </p><div class="procedure"><a name="id 417653"></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="id 417664"></a>167 </p><div class="procedure"><a name="id391920"></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="id391931"></a> 169 169 Edit <code class="filename">/etc/cups/mime.types</code> to uncomment the line 170 170 near the end of the file that has: … … 173 173 </pre><p> 174 174 </p></li><li><p> 175 <a class="indexterm" name="id 417690"></a>175 <a class="indexterm" name="id391957"></a> 176 176 Do the same for the file <code class="filename">/etc/cups/mime.convs</code>. 177 177 </p></li><li><p> … … 194 194 Here, the name <code class="constant">raw_q</code> is the name you gave the print 195 195 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="id 417810"></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="id392077"></a>Installation of Windows Client Drivers</h3></div></div></div><p> 197 197 The printer drivers on the Windows clients may be installed 198 198 in two functionally different ways: … … 201 201 printing and uses a <code class="filename">\\sambaserver\printershare</code> 202 202 type of connection.</p></li><li><p> 203 <a class="indexterm" name="id 417837"></a>203 <a class="indexterm" name="id392104"></a> 204 204 Deposit and prepare the drivers (for later download) on 205 205 the print server (Samba); this enables the clients to use … … 208 208 clients use the <span class="emphasis"><em>SPOOLSS/MS-RPC</em></span> 209 209 type printing calls.</p></li></ul></div><p> 210 The second method is recommended for use over the first. 210 The second method is recommended for use over the first as it reduces the 211 administrative efforts and prevents that different versions of the drivers 212 are used accidentally. 211 213 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cups-raw"></a>Explicitly Enable “<span class="quote">raw</span>” Printing for <span class="emphasis"><em>application/octet-stream</em></span></h3></div></div></div><p> 212 <a class="indexterm" name="id 417877"></a>213 <a class="indexterm" name="id 417884"></a>214 <a class="indexterm" name="id 417891"></a>214 <a class="indexterm" name="id392145"></a> 215 <a class="indexterm" name="id392152"></a> 216 <a class="indexterm" name="id392159"></a> 215 217 If you use the first option (drivers are installed on the client 216 218 side), there is one setting to take care of: CUPS needs to be told … … 224 226 application/octet-stream 225 227 </pre><p> 226 <a class="indexterm" name="id 417941"></a>227 <a class="indexterm" name="id 417948"></a>228 <a class="indexterm" name="id392209"></a> 229 <a class="indexterm" name="id392216"></a> 228 230 In <code class="filename">/etc/cups/mime.convs</code>, have this line: 229 <a class="indexterm" name="id 417961"></a>231 <a class="indexterm" name="id392229"></a> 230 232 </p><pre class="programlisting"> 231 233 application/octet-stream application/vnd.cups-raw 0 - … … 238 240 not <span class="emphasis"><em>enforce</em></span> “<span class="quote">raw</span>” printing, it only <span class="emphasis"><em>allows</em></span> it. 239 241 </p></div><p><b>Background. </b> 240 <a class="indexterm" name="id 418022"></a>241 <a class="indexterm" name="id 418029"></a>242 <a class="indexterm" name="id392290"></a> 243 <a class="indexterm" name="id392297"></a> 242 244 That CUPS is a more security-aware printing system than traditional ones does not by default allow a user to 243 245 send deliberate (possibly binary) data to printing devices. This could be easily abused to launch a … … 253 255 more advanced CUPS/Samba printing, simply skip the remaining sections 254 256 of this chapter. 255 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 418073"></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="id392341"></a>Driver Upload Methods</h3></div></div></div><p> 256 258 This section describes three familiar methods, plus one new one, by which 257 259 printer drivers may be uploaded. 258 260 </p><p> 259 <a class="indexterm" name="id 418085"></a>261 <a class="indexterm" name="id392353"></a> 260 262 If you want to use the MS-RPC-type printing, you must upload the 261 263 drivers onto the Samba server first (<em class="parameter"><code>[print$]</code></em> … … 266 268 three methods of preparing the client drivers on the Samba server: 267 269 </p><div class="itemizedlist"><ul type="disc"><li><p> 268 <a class="indexterm" name="id 418118"></a>270 <a class="indexterm" name="id392386"></a> 269 271 The GUI, “<span class="quote">Add Printer Wizard</span>” <span class="emphasis"><em>upload-from-a-Windows-client</em></span> method. 270 272 </p></li><li><p> 271 273 The command line, “<span class="quote">smbclient/rpcclient</span>” upload-from-a-UNIX-workstation method. 272 274 </p></li><li><p> 273 <a class="indexterm" name="id 418145"></a>275 <a class="indexterm" name="id392413"></a> 274 276 The Imprints tool set method. 275 277 </p></li></ul></div><p> 276 <a class="indexterm" name="id 418156"></a>278 <a class="indexterm" name="id392424"></a> 277 279 These three methods apply to CUPS all the same. The <code class="literal">cupsaddsmb</code> utility is a new and more 278 280 convenient way to load the Windows drivers into Samba and is provided if you use CUPS. … … 280 282 <code class="literal">cupsaddsmb</code> is discussed in much detail later in this chapter. But we first 281 283 explore the CUPS filtering system and compare the Windows and UNIX printing architectures. 282 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 418184"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p>283 <a class="indexterm" name="id 418192"></a>284 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id392452"></a>Advanced Intelligent Printing with PostScript Driver Download</h2></div></div></div><p> 285 <a class="indexterm" name="id392460"></a> 284 286 We now know how to set up a “<span class="quote">dump</span>” print server, that is, a server that spools 285 287 print jobs “<span class="quote">raw</span>”, leaving the print data untouched. 286 288 </p><p> 287 289 You might need to set up CUPS in a smarter way. The reasons could be manifold: 288 </p><a class="indexterm" name="id 418215"></a><a class="indexterm" name="id418221"></a><a class="indexterm" name="id418228"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which290 </p><a class="indexterm" name="id392483"></a><a class="indexterm" name="id392490"></a><a class="indexterm" name="id392496"></a><div class="itemizedlist"><ul type="disc"><li><p>Maybe your boss wants to get monthly statistics: Which 289 291 printer did how many pages? What was the average data size of a job? 290 292 What was the average print run per day? What are the typical hourly … … 302 304 CUPS filtering system, how it works, and how you can tweak it. 303 305 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gdipost"></a>GDI on Windows, PostScript on UNIX</h3></div></div></div><p> 304 <a class="indexterm" name="id 418289"></a>305 <a class="indexterm" name="id 418296"></a>306 <a class="indexterm" name="id392557"></a> 307 <a class="indexterm" name="id392564"></a> 306 308 Network printing is one of the most complicated and error-prone 307 309 day-to-day tasks any user or administrator may encounter. This is 308 310 true for all OS platforms, and there are reasons it is so. 309 311 </p><p> 310 <a class="indexterm" name="id 418307"></a>311 <a class="indexterm" name="id 418314"></a>312 <a class="indexterm" name="id 418320"></a>313 <a class="indexterm" name="id 418327"></a>314 <a class="indexterm" name="id 418334"></a>312 <a class="indexterm" name="id392575"></a> 313 <a class="indexterm" name="id392582"></a> 314 <a class="indexterm" name="id392588"></a> 315 <a class="indexterm" name="id392595"></a> 316 <a class="indexterm" name="id392602"></a> 315 317 You can't expect to throw just any file format at a printer and have it get printed. A file format conversion 316 318 must take place. The problem is that there is no common standard for print file formats across all … … 319 321 used page description languages (PDLs), there are still many manufacturers who “<span class="quote">roll their own</span>” 320 322 (their reasons may be unacceptable license fees for using printer-embedded PostScript interpreters, and so on). 321 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 418358"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p>322 <a class="indexterm" name="id 418365"></a>323 <a class="indexterm" name="id 418372"></a>324 <a class="indexterm" name="id 418378"></a>325 <a class="indexterm" name="id 418385"></a>323 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id392626"></a>Windows Drivers, GDI, and EMF</h3></div></div></div><p> 324 <a class="indexterm" name="id392634"></a> 325 <a class="indexterm" name="id392640"></a> 326 <a class="indexterm" name="id392647"></a> 327 <a class="indexterm" name="id392653"></a> 326 328 In Windows OS, the format conversion job is done by the printer drivers. On MS Windows OS platforms all 327 329 application programmers have at their disposal a built-in API, the graphical device interface (GDI), as part … … 334 336 driver and converted to the printer-specific file format. 335 337 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 336 <a class="indexterm" name="id 418413"></a>337 <a class="indexterm" name="id 418420"></a>338 <a class="indexterm" name="id 418426"></a>338 <a class="indexterm" name="id392681"></a> 339 <a class="indexterm" name="id392688"></a> 340 <a class="indexterm" name="id392695"></a> 339 341 To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation 340 for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id 418435"></a> <a class="indexterm" name="id418442"></a>341 <a class="indexterm" name="id 418448"></a> <a class="indexterm" name="id418455"></a> systems.342 for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating <a class="indexterm" name="id392703"></a> <a class="indexterm" name="id392710"></a> 343 <a class="indexterm" name="id392717"></a> <a class="indexterm" name="id392723"></a> systems. 342 344 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. 343 345 </p></div><p> 344 346 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 345 347 printing. 346 </p><div class="figure"><a name="1small"></a><p class="title"><b>Figure 22.1. Windows Printing to a Local Printer.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/1small.png" alt="Windows Printing to a Local Printer."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 418524"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p>347 <a class="indexterm" name="id 418532"></a>348 <a class="indexterm" name="id 418538"></a>349 <a class="indexterm" name="id 418545"></a>350 <a class="indexterm" name="id 418552"></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="id392792"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div></div><p> 349 <a class="indexterm" name="id392800"></a> 350 <a class="indexterm" name="id392807"></a> 351 <a class="indexterm" name="id392813"></a> 352 <a class="indexterm" name="id392820"></a> 351 353 In UNIX and Linux, there is no comparable layer built into the OS kernel(s) or the X (screen display) server. 352 354 Every application is responsible for itself to create its print output. Fortunately, most use PostScript and … … 362 364 your system; there are separate ones for fonts used for X display and fonts to be used on paper. 363 365 </p><p><b>Background. </b> 364 <a class="indexterm" name="id 418592"></a>365 <a class="indexterm" name="id 418599"></a>366 <a class="indexterm" name="id 418606"></a>367 <a class="indexterm" name="id 418612"></a>368 <a class="indexterm" name="id 418619"></a>369 <a class="indexterm" name="id 418626"></a>370 <a class="indexterm" name="id 418633"></a>371 <a class="indexterm" name="id 418640"></a>372 <a class="indexterm" name="id 418646"></a>373 <a class="indexterm" name="id 418653"></a>366 <a class="indexterm" name="id392860"></a> 367 <a class="indexterm" name="id392867"></a> 368 <a class="indexterm" name="id392874"></a> 369 <a class="indexterm" name="id392880"></a> 370 <a class="indexterm" name="id392887"></a> 371 <a class="indexterm" name="id392894"></a> 372 <a class="indexterm" name="id392901"></a> 373 <a class="indexterm" name="id392908"></a> 374 <a class="indexterm" name="id392914"></a> 375 <a class="indexterm" name="id392921"></a> 374 376 The PostScript programming language is an “<span class="quote">invention</span>” by Adobe, but its specifications have been 375 377 published extensively. Its strength lies in its powerful abilities to describe graphical objects (fonts, … … 383 385 program or on paper by a printer. 384 386 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="post-and-ghost"></a>PostScript and Ghostscript</h3></div></div></div><p> 385 <a class="indexterm" name="id 418694"></a>386 <a class="indexterm" name="id 418700"></a>387 <a class="indexterm" name="id 418709"></a>388 <a class="indexterm" name="id 418718"></a>389 <a class="indexterm" name="id 418725"></a>387 <a class="indexterm" name="id392962"></a> 388 <a class="indexterm" name="id392968"></a> 389 <a class="indexterm" name="id392977"></a> 390 <a class="indexterm" name="id392987"></a> 391 <a class="indexterm" name="id392993"></a> 390 392 So UNIX is lacking a common ground for printing on paper and displaying on screen. Despite this unfavorable 391 393 legacy for UNIX, basic printing is fairly easy if you have PostScript printers at your disposal. The reason is … … 396 398 different than PostScript printing a file from a Windows origin. 397 399 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 398 <a class="indexterm" name="id 418748"></a>399 <a class="indexterm" name="id 418755"></a>400 <a class="indexterm" name="id 418761"></a>400 <a class="indexterm" name="id393016"></a> 401 <a class="indexterm" name="id393023"></a> 402 <a class="indexterm" name="id393030"></a> 401 403 Traditional UNIX programs and printing systems while using PostScript are largely not 402 404 PPD-aware. PPDs are “<span class="quote">PostScript Printer Description</span>” files. They enable you to specify and … … 405 407 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>. 406 408 </p></div><div class="figure"><a name="2small"></a><p class="title"><b>Figure 22.2. Printing to a PostScript Printer.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/2small.png" alt="Printing to a PostScript Printer."></div></div></div><br class="figure-break"><p> 407 <a class="indexterm" name="id 418835"></a>409 <a class="indexterm" name="id393104"></a> 408 410 However, there are other types of printers out there. These do not know how to print PostScript. They use 409 411 their own PDL, often proprietary. To print to them is much more demanding. Since your UNIX applications mostly 410 412 produce PostScript, and since these devices do not understand PostScript, you need to convert the print files 411 413 to a format suitable for your printer on the host before you can send it away. 412 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 418848"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p>413 <a class="indexterm" name="id 418856"></a>414 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393116"></a>Ghostscript: The Software RIP for Non-PostScript Printers</h3></div></div></div><p> 415 <a class="indexterm" name="id393124"></a> 414 416 Here is where Ghostscript kicks in. Ghostscript is the traditional (and quite powerful) PostScript interpreter 415 417 used on UNIX platforms. It is a RIP in software, capable of doing a <span class="emphasis"><em>lot</em></span> of file format … … 418 420 <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>. 419 421 </p><div class="figure"><a name="3small"></a><p class="title"><b>Figure 22.3. Ghostscript as a RIP for Non-PostScript Printers.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/3small.png" alt="Ghostscript as a RIP for Non-PostScript Printers."></div></div></div><br class="figure-break"><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> 420 <a class="indexterm" name="id 418922"></a>421 <a class="indexterm" name="id 418928"></a>422 <a class="indexterm" name="id 418935"></a>422 <a class="indexterm" name="id393190"></a> 423 <a class="indexterm" name="id393196"></a> 424 <a class="indexterm" name="id393203"></a> 423 425 Use the “<span class="quote">gs -h</span>” command to check for all built-in “<span class="quote">devices</span>” on your Ghostscript 424 426 version. If you specify a parameter of <em class="parameter"><code>-sDEVICE=png256</code></em> on your Ghostscript command … … 428 430 initially put under the “<span class="quote">AFPL</span>” license, but re-released under the GNU GPL as soon as the next 429 431 AFPL version appears. GNU Ghostscript is probably the version installed on most Samba systems. But it has some 430 deficiencies. <a class="indexterm" name="id 418968"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript,432 deficiencies. <a class="indexterm" name="id393236"></a> Therefore, ESP Ghostscript was developed as an enhancement over GNU Ghostscript, 431 433 with lots of bug-fixes, additional devices, and improvements. It is jointly maintained by developers from 432 CUPS, G imp-Print, MandrakeSoft, SuSE, Red Hat, and Debian. It includes the “<span class="quote">cups</span>” device434 CUPS, Gutenprint, MandrakeSoft, SuSE, Red Hat, and Debian. It includes the “<span class="quote">cups</span>” device 433 435 (essential to print to non-PS printers from CUPS). 434 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 418988"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p>435 <a class="indexterm" name="id 418996"></a>436 <a class="indexterm" name="id 419002"></a>437 <a class="indexterm" name="id 419009"></a>436 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393256"></a>PostScript Printer Description (PPD) Specification</h3></div></div></div><p> 437 <a class="indexterm" name="id393264"></a> 438 <a class="indexterm" name="id393270"></a> 439 <a class="indexterm" name="id393277"></a> 438 440 While PostScript in essence is a PDL to represent the page layout in a device-independent way, real-world 439 441 print jobs are always ending up being output on hardware with device-specific features. To take care of all … … 457 459 file created by the driver. 458 460 </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> 459 <a class="indexterm" name="id 419038"></a>460 <a class="indexterm" name="id 419044"></a>461 <a class="indexterm" name="id393306"></a> 462 <a class="indexterm" name="id393312"></a> 461 463 A PostScript file that was created to contain device-specific commands 462 464 for achieving a certain print job output (e.g., duplexed, stapled, and … … 464 466 may not be printable at all on other models; it also may not be fit 465 467 for further processing by software (e.g., by a PDF distilling program). 466 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 419056"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p>467 <a class="indexterm" name="id 419064"></a>468 <a class="indexterm" name="id 419071"></a>469 <a class="indexterm" name="id 419078"></a>468 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393324"></a>Using Windows-Formatted Vendor PPDs</h3></div></div></div><p> 469 <a class="indexterm" name="id393332"></a> 470 <a class="indexterm" name="id393339"></a> 471 <a class="indexterm" name="id393346"></a> 470 472 CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if 471 473 a vendor does not mention our favorite OS in his or her manuals and brochures, you can safely trust this: … … 478 480 first pit stops. 479 481 </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> 480 <a class="indexterm" name="id 419111"></a>481 <a class="indexterm" name="id 419118"></a>482 <a class="indexterm" name="id393379"></a> 483 <a class="indexterm" name="id393386"></a> 482 484 For real PostScript printers, <span class="emphasis"><em>do not</em></span> use the <span class="emphasis"><em>Foomatic</em></span> or 483 485 <span class="emphasis"><em>cupsomatic</em></span> PPDs from Linuxprinting.org. With these devices, the original vendor-provided 484 486 PPDs are always the first choice. 485 487 </p></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> 486 <a class="indexterm" name="id 419141"></a>488 <a class="indexterm" name="id393409"></a> 487 489 If you are looking for an original vendor-provided PPD of a specific device, and you know that an NT4 box (or 488 490 any other Windows box) on your LAN has the PostScript driver installed, just use <code class="literal">smbclient 489 491 //NT4-box/print\$ -U username</code> to access the Windows directory where all printer driver files are 490 492 stored. First look in the <code class="filename">W32X86/2</code> subdirectory for the PPD you are seeking. 491 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 419165"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p>492 <a class="indexterm" name="id 419173"></a>493 <a class="indexterm" name="id 419180"></a>494 <a class="indexterm" name="id 419186"></a>493 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393433"></a>CUPS Also Uses PPDs for Non-PostScript Printers</h3></div></div></div><p> 494 <a class="indexterm" name="id393441"></a> 495 <a class="indexterm" name="id393448"></a> 496 <a class="indexterm" name="id393455"></a> 495 497 CUPS also uses specially crafted PPDs to handle non-PostScript printers. These PPDs are usually not available 496 498 from the vendors (and no, you can't just take the PPD of a PostScript printer with the same model name and 497 499 hope it works for the non-PostScript version too). To understand how these PPDs work for non-PS printers, we 498 500 first need to dive deeply into the CUPS filtering and file format conversion architecture. Stay tuned. 499 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 419200"></a>The CUPS Filtering Architecture</h2></div></div></div><p>500 <a class="indexterm" name="id 419208"></a>501 <a class="indexterm" name="id 419215"></a>502 <a class="indexterm" name="id 419222"></a>503 <a class="indexterm" name="id 419228"></a>504 <a class="indexterm" name="id 419235"></a>501 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id393468"></a>The CUPS Filtering Architecture</h2></div></div></div><p> 502 <a class="indexterm" name="id393476"></a> 503 <a class="indexterm" name="id393483"></a> 504 <a class="indexterm" name="id393490"></a> 505 <a class="indexterm" name="id393497"></a> 506 <a class="indexterm" name="id393503"></a> 505 507 The core of the CUPS filtering system is based on Ghostscript. In addition to Ghostscript, CUPS uses some 506 508 other filters of its own. You (or your OS vendor) may have plugged in even more filters. CUPS handles all data … … 513 515 If CUPS rasterizes a PostScript file natively to a bitmap, this is done in two stages: 514 516 </p><div class="itemizedlist"><ul type="disc"><li><p> 515 <a class="indexterm" name="id 419258"></a>516 <a class="indexterm" name="id 419265"></a>517 <a class="indexterm" name="id393526"></a> 518 <a class="indexterm" name="id393533"></a> 517 519 The first stage uses a Ghostscript device named “<span class="quote">cups</span>” 518 520 (this is since version 1.1.15) and produces a generic raster format 519 521 called “<span class="quote">CUPS raster</span>”. 520 522 </p></li><li><p> 521 <a class="indexterm" name="id 419284"></a>523 <a class="indexterm" name="id393553"></a> 522 524 The second stage uses a “<span class="quote">raster driver</span>” that converts 523 525 the generic CUPS raster to a device-specific raster. 524 526 </p></li></ul></div><p> 525 <a class="indexterm" name="id 419300"></a>526 <a class="indexterm" name="id 419307"></a>527 <a class="indexterm" name="id 419314"></a>527 <a class="indexterm" name="id393568"></a> 528 <a class="indexterm" name="id393575"></a> 529 <a class="indexterm" name="id393582"></a> 528 530 Make sure your Ghostscript version has the “<span class="quote">cups</span>” device compiled in (check with <code class="literal">gs -h | 529 531 grep cups</code>). Otherwise you may encounter the dreaded <code class="computeroutput">Unable to convert file 530 532 0</code> in your CUPS error_log file. To have “<span class="quote">cups</span>” as a device in your Ghostscript, 531 533 you either need to patch GNU Ghostscript and recompile or use 532 <a class="indexterm" name="id 419342"></a><a class="ulink" href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP534 <a class="indexterm" name="id393610"></a><a class="ulink" href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP 533 535 Ghostscript. It supports not just CUPS, but 300 other devices (while GNU Ghostscript supports only about 180). 534 536 Because of this broad output device support, ESP Ghostscript is the first choice for non-CUPS spoolers, too. 535 537 It is now recommended by Linuxprinting.org for all spoolers. 536 538 </p><p> 537 <a class="indexterm" name="id 419362"></a>538 <a class="indexterm" name="id 419368"></a>539 <a class="indexterm" name="id 419375"></a>540 <a class="indexterm" name="id 419382"></a>539 <a class="indexterm" name="id393630"></a> 540 <a class="indexterm" name="id393636"></a> 541 <a class="indexterm" name="id393643"></a> 542 <a class="indexterm" name="id393650"></a> 541 543 CUPS printers may be set up to use external rendering paths. One of the most common is provided by the 542 544 Foomatic/cupsomatic concept from <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a>. This 543 545 uses the classical Ghostscript approach, doing everything in one step. It does not use the 544 546 “<span class="quote">cups</span>” device, but one of the many others. However, even for Foomatic/cupsomatic usage, best 545 results and <a class="indexterm" name="id 419401"></a> broadest printer547 results and <a class="indexterm" name="id393669"></a> broadest printer 546 548 model support is provided by ESP Ghostscript (more about Foomatic/cupsomatic, particularly the new version 547 549 called now <span class="emphasis"><em>foomatic-rip</em></span>, follows). 548 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 419416"></a>MIME Types and CUPS Filters</h3></div></div></div><p>549 <a class="indexterm" name="id 419424"></a>550 <a class="indexterm" name="id 419433"></a>551 <a class="indexterm" name="id 419440"></a>552 <a class="indexterm" name="id 419447"></a>553 <a class="indexterm" name="id 419454"></a>550 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id393684"></a>MIME Types and CUPS Filters</h3></div></div></div><p> 551 <a class="indexterm" name="id393692"></a> 552 <a class="indexterm" name="id393702"></a> 553 <a class="indexterm" name="id393708"></a> 554 <a class="indexterm" name="id393715"></a> 555 <a class="indexterm" name="id393722"></a> 554 556 CUPS reads the file <code class="filename">/etc/cups/mime.types</code> (and all other files carrying a 555 557 <code class="filename">*.types</code> suffix in the same directory) upon startup. These files contain the MIME type … … 557 559 man page for <code class="filename">mime.types</code> and in the comments section of the 558 560 <code class="filename">mime.types</code> file itself. A simple rule reads like this: 559 <a class="indexterm" name="id 419487"></a>561 <a class="indexterm" name="id393755"></a> 560 562 </p><pre class="programlisting"> 561 563 application/pdf pdf string(0,%PDF) 562 564 </pre><p> 563 <a class="indexterm" name="id 419500"></a>564 <a class="indexterm" name="id 419507"></a>565 <a class="indexterm" name="id393768"></a> 566 <a class="indexterm" name="id393775"></a> 565 567 This means if a filename has a <code class="filename">.pdf</code> suffix or if the magic string 566 568 <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 … … 569 571 application/postscript ai eps ps string(0,%!) string(0,<04>%!) 570 572 </pre><p> 571 <a class="indexterm" name="id 419537"></a>572 <a class="indexterm" name="id 419544"></a>573 <a class="indexterm" name="id 419551"></a>574 <a class="indexterm" name="id 419557"></a>575 <a class="indexterm" name="id 419564"></a>576 <a class="indexterm" name="id 419571"></a>573 <a class="indexterm" name="id393805"></a> 574 <a class="indexterm" name="id393812"></a> 575 <a class="indexterm" name="id393819"></a> 576 <a class="indexterm" name="id393826"></a> 577 <a class="indexterm" name="id393832"></a> 578 <a class="indexterm" name="id393839"></a> 577 579 If the filename has one of the suffixes <code class="filename">.ai</code>, <code class="filename">.eps</code>, 578 580 <code class="filename">.ps</code>, or if the file itself starts with one of the strings <span class="emphasis"><em>%!</em></span> or … … 580 582 (<em class="parameter"><code>application/postscript</code></em>). 581 583 </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> 582 <a class="indexterm" name="id 419613"></a>584 <a class="indexterm" name="id393881"></a> 583 585 Don't confuse the other mime.types files your system might be using 584 586 with the one in the <code class="filename">/etc/cups/</code> directory. 585 587 </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 586 <a class="indexterm" name="id 419631"></a>587 <a class="indexterm" name="id 419638"></a>588 <a class="indexterm" name="id 419644"></a>589 <a class="indexterm" name="id 419651"></a>590 <a class="indexterm" name="id 419658"></a>588 <a class="indexterm" name="id393899"></a> 589 <a class="indexterm" name="id393906"></a> 590 <a class="indexterm" name="id393913"></a> 591 <a class="indexterm" name="id393919"></a> 592 <a class="indexterm" name="id393926"></a> 591 593 There is an important difference between two similar MIME types in CUPS: one is 592 594 <em class="parameter"><code>application/postscript</code></em>, the other is 593 595 <em class="parameter"><code>application/vnd.cups-postscript</code></em>. While <em class="parameter"><code>application/postscript</code></em> is 594 596 meant to be device-independent, job options for the file are still outside the PS file content, embedded in 595 command -line or environment variables by CUPS, <em class="parameter"><code>application/vnd.cups-postscript</code></em> may have597 command line or environment variables by CUPS, <em class="parameter"><code>application/vnd.cups-postscript</code></em> may have 596 598 the job options inserted into the PostScript data itself (where applicable). The transformation of the generic 597 599 PostScript (<em class="parameter"><code>application/postscript</code></em>) to the device-specific version … … 599 601 <em class="parameter"><code>pstops</code></em> filter. pstops uses information contained in the PPD to do the transformation. 600 602 </p></div><p> 601 <a class="indexterm" name="id 419714"></a>602 <a class="indexterm" name="id 419721"></a>603 <a class="indexterm" name="id 419728"></a>604 <a class="indexterm" name="id 419734"></a>605 <a class="indexterm" name="id 419741"></a>606 <a class="indexterm" name="id 419747"></a>607 <a class="indexterm" name="id 419754"></a>608 <a class="indexterm" name="id 419760"></a>609 <a class="indexterm" name="id 419767"></a>610 <a class="indexterm" name="id 419774"></a>611 <a class="indexterm" name="id 419781"></a>612 <a class="indexterm" name="id 419788"></a>613 <a class="indexterm" name="id 419794"></a>614 <a class="indexterm" name="id 419801"></a>615 <a class="indexterm" name="id 419808"></a>616 <a class="indexterm" name="id 419815"></a>603 <a class="indexterm" name="id393982"></a> 604 <a class="indexterm" name="id393989"></a> 605 <a class="indexterm" name="id393996"></a> 606 <a class="indexterm" name="id394002"></a> 607 <a class="indexterm" name="id394009"></a> 608 <a class="indexterm" name="id394016"></a> 609 <a class="indexterm" name="id394022"></a> 610 <a class="indexterm" name="id394029"></a> 611 <a class="indexterm" name="id394035"></a> 612 <a class="indexterm" name="id394042"></a> 613 <a class="indexterm" name="id394049"></a> 614 <a class="indexterm" name="id394056"></a> 615 <a class="indexterm" name="id394063"></a> 616 <a class="indexterm" name="id394069"></a> 617 <a class="indexterm" name="id394076"></a> 618 <a class="indexterm" name="id394083"></a> 617 619 CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and 618 620 many image formats (GIF, PNG, TIFF, JPEG, Photo-CD, SUN-Raster, 619 621 PNM, PBM, SGI-RGB, and more) and their associated MIME types 620 622 with its filters. 621 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 419826"></a>MIME Type Conversion Rules</h3></div></div></div><p>622 <a class="indexterm" name="id 419834"></a>623 <a class="indexterm" name="id 419840"></a>624 <a class="indexterm" name="id 419847"></a>625 <a class="indexterm" name="id 419854"></a>626 <a class="indexterm" name="id 419861"></a>623 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394094"></a>MIME Type Conversion Rules</h3></div></div></div><p> 624 <a class="indexterm" name="id394102"></a> 625 <a class="indexterm" name="id394108"></a> 626 <a class="indexterm" name="id394115"></a> 627 <a class="indexterm" name="id394122"></a> 628 <a class="indexterm" name="id394129"></a> 627 629 CUPS reads the file <code class="filename">/etc/cups/mime.convs</code> 628 630 (and all other files named with a <code class="filename">*.convs</code> … … 635 637 application/pdf application/postscript 33 pdftops 636 638 </pre><p> 637 <a class="indexterm" name="id 419888"></a>639 <a class="indexterm" name="id394156"></a> 638 640 This means that the <em class="parameter"><code>pdftops</code></em> filter will take 639 641 <em class="parameter"><code>application/pdf</code></em> as input and produce … … 641 643 cost of this operation is 33 CUPS-$. The next filter is more 642 644 expensive, costing 66 CUPS-$: 643 <a class="indexterm" name="id 419914"></a>645 <a class="indexterm" name="id394182"></a> 644 646 </p><pre class="programlisting"> 645 647 application/vnd.hp-HPGL application/postscript 66 hpgltops 646 648 </pre><p> 647 <a class="indexterm" name="id 419927"></a>649 <a class="indexterm" name="id394195"></a> 648 650 This is the <em class="parameter"><code>hpgltops</code></em>, which processes HP-GL 649 651 plotter files to PostScript. 650 <a class="indexterm" name="id 419940"></a>652 <a class="indexterm" name="id394208"></a> 651 653 </p><pre class="programlisting"> 652 654 application/octet-stream 653 655 </pre><p> 654 656 Here are two more examples: 655 <a class="indexterm" name="id 419953"></a>656 <a class="indexterm" name="id 419960"></a>657 <a class="indexterm" name="id 419967"></a>658 <a class="indexterm" name="id 419974"></a>657 <a class="indexterm" name="id394222"></a> 658 <a class="indexterm" name="id394228"></a> 659 <a class="indexterm" name="id394235"></a> 660 <a class="indexterm" name="id394242"></a> 659 661 </p><pre class="programlisting"> 660 662 application/x-shell application/postscript 33 texttops 661 663 text/plain application/postscript 33 texttops 662 664 </pre><p> 663 <a class="indexterm" name="id 419987"></a>665 <a class="indexterm" name="id394255"></a> 664 666 The last two examples name the <em class="parameter"><code>texttops</code></em> filter to work on 665 667 <em class="parameter"><code>text/plain</code></em> as well as on <em class="parameter"><code>application/x-shell</code></em>. (Hint: This 666 668 differentiation is needed for the syntax highlighting feature of <em class="parameter"><code>texttops</code></em>). 667 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420021"></a>Filtering Overview</h3></div></div></div><p>668 <a class="indexterm" name="id 420029"></a>669 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394289"></a>Filtering Overview</h3></div></div></div><p> 670 <a class="indexterm" name="id394297"></a> 669 671 There are many more combinations named in <code class="filename">mime.convs</code>. However, you are not limited to use 670 672 the ones predefined there. You can plug in any filter you like to the CUPS framework. It must meet, or must be … … 672 674 sure it complies with what CUPS needs and put in the right lines in <code class="filename">mime.types</code> and 673 675 <code class="filename">mime.convs</code>; then it will work seamlessly inside CUPS. 674 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 420058"></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="id394326"></a>Filter Requirements</h4></div></div></div><p> 675 677 The “<span class="quote">CUPS requirements</span>” for filters are simple. Take filenames or <code class="filename">stdin</code> as 676 678 input and write to <code class="filename">stdout</code>. They should take these arguments: … … 688 690 The job options. 689 691 </p></dd><dt><span class="term">filename</span></dt><dd><p> 690 (optionally) The print request file (if missing, filters expect eddata692 (optionally) The print request file (if missing, filters expect data 691 693 fed through <code class="filename">stdin</code>). In most cases, it is easy to 692 694 write a simple wrapper script around existing filters to make them work with CUPS. 693 </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420169"></a>Prefilters</h3></div></div></div><p>694 <a class="indexterm" name="id 420177"></a>695 <a class="indexterm" name="id 420184"></a>696 <a class="indexterm" name="id 420191"></a>695 </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394437"></a>Prefilters</h3></div></div></div><p> 696 <a class="indexterm" name="id394445"></a> 697 <a class="indexterm" name="id394452"></a> 698 <a class="indexterm" name="id394459"></a> 697 699 As previously stated, PostScript is the central file format to any UNIX-based 698 700 printing system. From PostScript, CUPS generates raster data to feed 699 701 non-PostScript printers. 700 702 </p><p> 701 <a class="indexterm" name="id 420202"></a>702 <a class="indexterm" name="id 420209"></a>703 <a class="indexterm" name="id 420216"></a>704 <a class="indexterm" name="id 420223"></a>705 <a class="indexterm" name="id 420229"></a>706 <a class="indexterm" name="id 420236"></a>707 <a class="indexterm" name="id 420242"></a>708 <a class="indexterm" name="id 420249"></a>709 <a class="indexterm" name="id 420256"></a>710 <a class="indexterm" name="id 420263"></a>703 <a class="indexterm" name="id394470"></a> 704 <a class="indexterm" name="id394477"></a> 705 <a class="indexterm" name="id394484"></a> 706 <a class="indexterm" name="id394491"></a> 707 <a class="indexterm" name="id394497"></a> 708 <a class="indexterm" name="id394504"></a> 709 <a class="indexterm" name="id394511"></a> 710 <a class="indexterm" name="id394517"></a> 711 <a class="indexterm" name="id394524"></a> 712 <a class="indexterm" name="id394531"></a> 711 713 But what happens if you send one of the supported non-PS formats to print? Then CUPS runs 712 714 “<span class="quote">prefilters</span>” on these input formats to generate PostScript first. There are prefilters to create … … 718 720 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 719 721 CUPS to Form PostScript</a>. 720 </p><div class="figure"><a name="4small"></a><p class="title"><b>Figure 22.4. Prefiltering in CUPS to Form PostScript.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/4small.png" width="135" alt="Prefiltering in CUPS to Form PostScript."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420346"></a>pstops</h3></div></div></div><p>721 <a class="indexterm" name="id 420354"></a>722 <a class="indexterm" name="id 420361"></a>723 <a class="indexterm" name="id 420368"></a>724 <a class="indexterm" name="id 420375"></a>725 <a class="indexterm" name="id 420381"></a>726 <a class="indexterm" name="id 420388"></a>727 <a class="indexterm" name="id 420395"></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="id394614"></a>pstops</h3></div></div></div><p> 723 <a class="indexterm" name="id394622"></a> 724 <a class="indexterm" name="id394629"></a> 725 <a class="indexterm" name="id394636"></a> 726 <a class="indexterm" name="id394643"></a> 727 <a class="indexterm" name="id394650"></a> 728 <a class="indexterm" name="id394656"></a> 729 <a class="indexterm" name="id394663"></a> 728 730 <span class="emphasis"><em>pstops</em></span> is a filter that is used to convert <em class="parameter"><code>application/postscript</code></em> to 729 731 <em class="parameter"><code>application/vnd.cups-postscript</code></em>. As stated earlier, this filter inserts all … … 741 743 </p></li><li><p>Counting the pages of the job to insert the accounting 742 744 information into the <code class="filename">/var/log/cups/page_log</code>. 743 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420506"></a>pstoraster</h3></div></div></div><p>744 <a class="indexterm" name="id 420514"></a>745 <a class="indexterm" name="id 420520"></a>746 <a class="indexterm" name="id 420527"></a>745 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id394774"></a>pstoraster</h3></div></div></div><p> 746 <a class="indexterm" name="id394782"></a> 747 <a class="indexterm" name="id394788"></a> 748 <a class="indexterm" name="id394795"></a> 747 749 <em class="parameter"><code>pstoraster</code></em> is at the core of the CUPS filtering system. It is responsible for the first 748 750 stage of the rasterization process. Its input is of MIME type application/vnd.cups-postscript; its output is … … 752 754 Intermediate Raster Format diagram</a>. 753 755 </p><div class="figure"><a name="cups-raster"></a><p class="title"><b>Figure 22.6. PostScript to Intermediate Raster Format.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/6small.png" width="135" alt="PostScript to Intermediate Raster Format."></div></div></div><br class="figure-break"><p> 754 <a class="indexterm" name="id 420598"></a>755 <a class="indexterm" name="id 420605"></a>756 <a class="indexterm" name="id 420612"></a>757 <a class="indexterm" name="id 420619"></a>756 <a class="indexterm" name="id394867"></a> 757 <a class="indexterm" name="id394873"></a> 758 <a class="indexterm" name="id394880"></a> 759 <a class="indexterm" name="id394887"></a> 758 760 CUPS raster is a generic raster format with powerful features. It is able to include per-page information, 759 761 color profiles, and more, to be used by the downstream raster drivers. Its MIME type is registered with IANA … … 765 767 Ghostscript illustration</a>. 766 768 </p><div class="figure"><a name="cups-raster2"></a><p class="title"><b>Figure 22.7. CUPS-Raster Production Using Ghostscript.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/7small.png" alt="CUPS-Raster Production Using Ghostscript."></div></div></div><br class="figure-break"><p> 767 <a class="indexterm" name="id 420684"></a>768 <a class="indexterm" name="id 420691"></a>769 <a class="indexterm" name="id 420697"></a>770 <a class="indexterm" name="id 420704"></a>769 <a class="indexterm" name="id394952"></a> 770 <a class="indexterm" name="id394959"></a> 771 <a class="indexterm" name="id394966"></a> 772 <a class="indexterm" name="id394972"></a> 771 773 CUPS versions before version 1.1.15 shipped a binary (or source code) standalone filter, named 772 774 <em class="parameter"><code>pstoraster</code></em>. <em class="parameter"><code>pstoraster</code></em>, which was derived from GNU Ghostscript … … 779 781 If your Ghostscript fails when this command is executed: <code class="literal">gs -h |grep cups</code>, you might not 780 782 be able to print, update your Ghostscript. 781 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420757"></a>imagetops and imagetoraster</h3></div></div></div><p>782 <a class="indexterm" name="id 420765"></a>783 <a class="indexterm" name="id 420772"></a>783 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395025"></a>imagetops and imagetoraster</h3></div></div></div><p> 784 <a class="indexterm" name="id395033"></a> 785 <a class="indexterm" name="id395040"></a> 784 786 In the section about prefilters, we mentioned the prefilter 785 787 that generates PostScript from image formats. The <em class="parameter"><code>imagetoraster</code></em> … … 788 790 mentioned prefilters. We summarize in a flowchart the image file 789 791 filtering in <a class="link" href="CUPS-printing.html#small8" title="Figure 22.8. Image Format to CUPS-Raster Format Conversion.">the Image Format to CUPS-Raster Format Conversion illustration</a>. 790 </p><div class="figure"><a name="small8"></a><p class="title"><b>Figure 22.8. Image Format to CUPS-Raster Format Conversion.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/8small.png" alt="Image Format to CUPS-Raster Format Conversion."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 420837"></a>rasterto [printers specific]</h3></div></div></div><p>791 <a class="indexterm" name="id 420845"></a>792 <a class="indexterm" name="id 420852"></a>793 <a class="indexterm" name="id 420858"></a>794 <a class="indexterm" name="id 420865"></a>795 <a class="indexterm" name="id 420872"></a>796 <a class="indexterm" name="id 420879"></a>797 <a class="indexterm" name="id 420886"></a>798 <a class="indexterm" name="id 420892"></a>799 <a class="indexterm" name="id 420899"></a>800 <a class="indexterm" name="id 420906"></a>801 <a class="indexterm" name="id 420913"></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="id395105"></a>rasterto [printers specific]</h3></div></div></div><p> 793 <a class="indexterm" name="id395113"></a> 794 <a class="indexterm" name="id395120"></a> 795 <a class="indexterm" name="id395126"></a> 796 <a class="indexterm" name="id395133"></a> 797 <a class="indexterm" name="id395140"></a> 798 <a class="indexterm" name="id395147"></a> 799 <a class="indexterm" name="id395154"></a> 800 <a class="indexterm" name="id395160"></a> 801 <a class="indexterm" name="id395167"></a> 802 <a class="indexterm" name="id395174"></a> 803 <a class="indexterm" name="id395181"></a> 802 804 CUPS ships with quite a variety of raster drivers for processing CUPS raster. On my system, I find in 803 805 /usr/lib/cups/filter/ the following: <em class="parameter"><code>rastertoalps</code></em>, <em class="parameter"><code>rastertobj</code></em>, … … 807 809 and <em class="parameter"><code>rastertoprinter</code></em>. Don't worry if you have fewer drivers than this; some of these are 808 810 installed by commercial add-ons to CUPS (like <em class="parameter"><code>rastertoturboprint</code></em>), and others (like 809 <em class="parameter"><code>rastertoprinter</code></em>) by third-party driver development projects (such as G imp-Print)811 <em class="parameter"><code>rastertoprinter</code></em>) by third-party driver development projects (such as Gutenprint) 810 812 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 811 813 Printer-Specific Formats illustration</a>. 812 </p><div class="figure"><a name="small9"></a><p class="title"><b>Figure 22.9. Raster to Printer-Specific Formats.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/9small.png" alt="Raster to Printer-Specific Formats."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421049"></a>CUPS Backends</h3></div></div></div><p>813 <a class="indexterm" name="id 421057"></a>814 <a class="indexterm" name="id 421064"></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="id395317"></a>CUPS Backends</h3></div></div></div><p> 815 <a class="indexterm" name="id395325"></a> 816 <a class="indexterm" name="id395332"></a> 815 817 The last part of any CUPS filtering chain is a backend. Backends 816 818 are special programs that send the print-ready file to the final … … 886 888 printer name.) 887 889 </p><p> 888 <a class="indexterm" name="id 421315"></a>889 <a class="indexterm" name="id 421322"></a>890 <a class="indexterm" name="id395583"></a> 891 <a class="indexterm" name="id395590"></a> 890 892 Not all of the mentioned backends may be present on your system or 891 893 usable (depending on your hardware configuration). One test for all … … 895 897 </p><pre class="screen"> 896 898 <code class="prompt">$ </code><strong class="userinput"><code>lpinfo -v</code></strong> 897 </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421357"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p>898 <a class="indexterm" name="id 421369"></a>899 <a class="indexterm" name="id 421376"></a>900 <a class="indexterm" name="id 421383"></a>901 <a class="indexterm" name="id 421390"></a>902 <a class="indexterm" name="id 421396"></a>899 </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395625"></a>The Role of <em class="parameter"><code>cupsomatic/foomatic</code></em></h3></div></div></div><p> 900 <a class="indexterm" name="id395637"></a> 901 <a class="indexterm" name="id395644"></a> 902 <a class="indexterm" name="id395651"></a> 903 <a class="indexterm" name="id395658"></a> 904 <a class="indexterm" name="id395665"></a> 903 905 <em class="parameter"><code>cupsomatic</code></em> filters may be the most widely used on CUPS 904 906 installations. You must be clear that these were not … … 920 922 CUPS Web interface with a <em class="parameter"><code>foomatic</code></em> namepart for 921 923 the driver description. <em class="parameter"><code>cupsomatic</code></em> is a Perl script that runs 922 Ghostscript with all the complicated command -line options923 autoconstructed from the selected PPD and command line options give to924 Ghostscript with all the complicated command line options 925 autoconstructed from the selected PPD and command line options given to 924 926 the print job. 925 927 </p><p> 926 <a class="indexterm" name="id 421454"></a>927 <a class="indexterm" name="id 421460"></a>928 <a class="indexterm" name="id 421467"></a>929 <a class="indexterm" name="id 421474"></a>930 <a class="indexterm" name="id 421481"></a>931 <a class="indexterm" name="id 421488"></a>932 <a class="indexterm" name="id 421494"></a>933 <a class="indexterm" name="id 421501"></a>934 <a class="indexterm" name="id 421508"></a>935 <a class="indexterm" name="id 421515"></a>936 <a class="indexterm" name="id 421522"></a>928 <a class="indexterm" name="id395722"></a> 929 <a class="indexterm" name="id395729"></a> 930 <a class="indexterm" name="id395735"></a> 931 <a class="indexterm" name="id395742"></a> 932 <a class="indexterm" name="id395749"></a> 933 <a class="indexterm" name="id395756"></a> 934 <a class="indexterm" name="id395763"></a> 935 <a class="indexterm" name="id395769"></a> 936 <a class="indexterm" name="id395776"></a> 937 <a class="indexterm" name="id395783"></a> 938 <a class="indexterm" name="id395790"></a> 937 939 However, <em class="parameter"><code>cupsomatic</code></em> is now deprecated. Its PPDs (especially the first 938 940 generation of them, still in heavy use out there) are not meeting the 939 941 Adobe specifications. You might also suffer difficulties when you try 940 942 to download them with “<span class="quote">Point'n'Print</span>” to Windows clients. A better 941 and more powerful successor is now in a stable beta-version: it is called <em class="parameter"><code>foomatic-rip</code></em>. To use943 and more powerful successor is now available: it is called <em class="parameter"><code>foomatic-rip</code></em>. To use 942 944 <em class="parameter"><code>foomatic-rip</code></em> as a filter with CUPS, you need the new type of PPDs, which 943 945 have a similar but different line: … … 956 958 legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR, and so on), providing 957 959 for them access to use PPDs for their printing. 958 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421572"></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="id395840"></a>The Complete Picture</h3></div></div></div><p> 959 961 If you want to see an overview of all the filters and how they 960 962 relate to each other, the complete picture of the puzzle is at the end 961 963 of this chapter. 962 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421583"></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="id395851"></a><code class="filename">mime.convs</code></h3></div></div></div><p> 963 965 CUPS autoconstructs all possible filtering chain paths for any given 964 966 MIME type and every printer installed. But how does it decide in … … 970 972 a total “<span class="quote">filter cost.</span>” CUPS decides for the most “<span class="quote">inexpensive</span>” route. 971 973 </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> 972 <a class="indexterm" name="id 421610"></a>973 <a class="indexterm" name="id 421617"></a>974 <a class="indexterm" name="id395878"></a> 975 <a class="indexterm" name="id395885"></a> 974 976 Setting <em class="parameter"><code>FilterLimit 1000</code></em> in 975 977 <code class="filename">cupsd.conf</code> will not allow more filters to … … 979 981 200 allows roughly one job at a time, while a FilterLimit of 1000 allows 980 982 approximately five jobs maximum at a time. 981 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421644"></a>“<span class="quote">Raw</span>” Printing</h3></div></div></div><p>982 <a class="indexterm" name="id 421654"></a>983 <a class="indexterm" name="id 421661"></a>984 <a class="indexterm" name="id 421668"></a>983 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id395912"></a>“<span class="quote">Raw</span>” Printing</h3></div></div></div><p> 984 <a class="indexterm" name="id395922"></a> 985 <a class="indexterm" name="id395929"></a> 986 <a class="indexterm" name="id395936"></a> 985 987 You can tell CUPS to print (nearly) any file “<span class="quote">raw</span>”. “<span class="quote">Raw</span>” means it will not be 986 988 filtered. CUPS will send the file to the printer “<span class="quote">as is</span>” without bothering if the printer is able … … 1000 1002 only send known MIME types (as defined in its own mime.types file) and 1001 1003 refuse others. 1002 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 421744"></a>application/octet-stream Printing</h3></div></div></div><p>1003 <a class="indexterm" name="id 421752"></a>1004 <a class="indexterm" name="id 421759"></a>1004 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396012"></a>application/octet-stream Printing</h3></div></div></div><p> 1005 <a class="indexterm" name="id396020"></a> 1006 <a class="indexterm" name="id396027"></a> 1005 1007 Any MIME type with no rule in the <code class="filename">/etc/cups/mime.types</code> file is regarded as unknown 1006 1008 or <em class="parameter"><code>application/octet-stream</code></em> and will not be … … 1015 1017 these two files: 1016 1018 </p><div class="itemizedlist"><ul type="disc"><li><p><code class="filename">/etc/cups/mime.convs</code></p></li><li><p><code class="filename">/etc/cups/mime.types</code></p></li></ul></div><p> 1017 <a class="indexterm" name="id 421820"></a>1019 <a class="indexterm" name="id396088"></a> 1018 1020 Both contain entries (at the end of the respective files) that must be uncommented to allow raw mode 1019 1021 operation for <em class="parameter"><code>application/octet-stream</code></em>. In <code class="filename">/etc/cups/mime.types</code> 1020 1022 make sure this line is present: 1021 <a class="indexterm" name="id 421840"></a>1023 <a class="indexterm" name="id396108"></a> 1022 1024 </p><pre class="programlisting"> 1023 1025 application/octet-stream … … 1030 1032 application/octet-stream application/vnd.cups-raw 0 - 1031 1033 </pre><p> 1032 <a class="indexterm" name="id 421872"></a>1034 <a class="indexterm" name="id396140"></a> 1033 1035 This line tells CUPS to use the <span class="emphasis"><em>Null Filter</em></span> 1034 1036 (denoted as “<span class="quote">-</span>”, doing nothing at all) on … … 1041 1043 <span class="emphasis"><em>enforce</em></span> “<span class="quote">raw</span>” printing, it only <span class="emphasis"><em>allows</em></span> it. 1042 1044 </p></div><p><b>Background. </b> 1043 <a class="indexterm" name="id 421936"></a>1044 <a class="indexterm" name="id 421943"></a>1045 <a class="indexterm" name="id 421950"></a>1046 <a class="indexterm" name="id 421956"></a>1045 <a class="indexterm" name="id396204"></a> 1046 <a class="indexterm" name="id396211"></a> 1047 <a class="indexterm" name="id396218"></a> 1048 <a class="indexterm" name="id396224"></a> 1047 1049 That CUPS is a more security-aware printing system than traditional ones 1048 1050 does not by default allow one to send deliberate (possibly binary) … … 1056 1058 recognizes MIME types. The file <code class="filename">/etc/cups/mime.convs</code> decides which file 1057 1059 conversion filter(s) may be applied to which MIME types. 1058 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 422005"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p>1059 <a class="indexterm" name="id 422013"></a>1060 <a class="indexterm" name="id 422020"></a>1061 <a class="indexterm" name="id 422026"></a>1062 <a class="indexterm" name="id 422033"></a>1063 <a class="indexterm" name="id 422040"></a>1064 <a class="indexterm" name="id 422046"></a>1060 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id396273"></a>PostScript Printer Descriptions for Non-PostScript Printers</h3></div></div></div><p> 1061 <a class="indexterm" name="id396281"></a> 1062 <a class="indexterm" name="id396288"></a> 1063 <a class="indexterm" name="id396294"></a> 1064 <a class="indexterm" name="id396301"></a> 1065 <a class="indexterm" name="id396308"></a> 1066 <a class="indexterm" name="id396314"></a> 1065 1067 Originally PPDs were meant to be used for PostScript printers 1066 1068 only. Here, they help to send device-specific commands and settings … … 1075 1077 PPDs for a non-PostScript printer have a few lines that are unique to 1076 1078 CUPS. The most important one looks similar to this: 1077 <a class="indexterm" name="id 422063"></a>1079 <a class="indexterm" name="id396331"></a> 1078 1080 </p><pre class="programlisting"> 1079 1081 *cupsFilter: application/vnd.cups-raster 66 rastertoprinter … … 1085 1087 delivers as its last output the specified MIME type. This is then 1086 1088 taken as input to the specified <em class="parameter"><code>rastertoprinter</code></em> filter. After 1087 the last filter has done its work (<em class="parameter"><code>rastertoprinter</code></em> is a G imp-Print1089 the last filter has done its work (<em class="parameter"><code>rastertoprinter</code></em> is a Gutenprint 1088 1090 filter), the file should go to the backend, which sends it to the 1089 1091 output device. … … 1093 1095 different paper trays, or you may get larger margins than your 1094 1096 specific model supports. See Table 21.1<a class="link" href="CUPS-printing.html#cups-ppds" title="Table 22.1. PPDs Shipped with CUPS">“PPDs Shipped with CUPS”</a> for summary information. 1095 </p><div class="table"><a name="cups-ppds"></a><p class="title"><b>Table 22.1. PPDs Shipped with CUPS</b></p><div class="table-contents"><table summary="PPDs Shipped with CUPS" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="left">PPD file</th><th align="justify">Printer type</th></tr></thead><tbody><tr><td align="left">deskjet.ppd</td><td align="justify">older HP inkjet printers and compatible</td></tr><tr><td align="left">deskjet2.ppd</td><td align="justify">newer HP inkjet printers and compatible </td></tr><tr><td align="left">dymo.ppd</td><td align="justify">label printers </td></tr><tr><td align="left">epson9.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">epson24.ppd</td><td align="justify">Epson 24-pin impact printers and compatible </td></tr><tr><td align="left">okidata9.ppd</td><td align="justify">Okidata 9-pin impact printers and compatible </td></tr><tr><td align="left">okidat24.ppd</td><td align="justify">Okidata 24-pin impact printers and compatible </td></tr><tr><td align="left">stcolor.ppd</td><td align="justify">older Epson Stylus Color printers </td></tr><tr><td align="left">stcolor2.ppd</td><td align="justify">newer Epson Stylus Color printers </td></tr><tr><td align="left">stphoto.ppd</td><td align="justify">older Epson Stylus Photo printers </td></tr><tr><td align="left">stphoto2.ppd</td><td align="justify">newer Epson Stylus Photo printers </td></tr><tr><td align="left">laserjet.ppd</td><td align="justify">all PCL printers </td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 422269"></a><span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> Versus <span class="emphasis"><em>Native CUPS</em></span> Printing</h3></div></div></div><p>1096 <a class="indexterm" name="id 422282"></a>1097 <a class="indexterm" name="id 422289"></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="id396537"></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="id396550"></a> 1099 <a class="indexterm" name="id396557"></a> 1098 1100 Native CUPS rasterization works in two steps: 1099 1101 </p><div class="itemizedlist"><ul type="disc"><li><p> 1100 <a class="indexterm" name="id 422303"></a>1102 <a class="indexterm" name="id396571"></a> 1101 1103 First is the <em class="parameter"><code>pstoraster</code></em> step. It uses the special CUPS 1102 <a class="indexterm" name="id 422316"></a>1104 <a class="indexterm" name="id396584"></a> 1103 1105 device from ESP Ghostscript 7.05.x as its tool. 1104 1106 </p></li><li><p> … … 1115 1117 way. Note that <em class="parameter"><code>cupsomatic</code></em> is <span class="emphasis"><em>not</em></span> made by the CUPS 1116 1118 developers. It is an independent contribution to printing development, 1117 made by people from Linuxprinting.org.<sup>[<a name="id 422411" href="#ftn.id422411" class="footnote">6</a>]</sup>1119 made by people from Linuxprinting.org.<sup>[<a name="id396679" href="#ftn.id396679" class="footnote">6</a>]</sup> 1118 1120 <em class="parameter"><code>cupsomatic</code></em> is no longer developed, maintained, or supported. It now been 1119 1121 replaced by <em class="parameter"><code>foomatic-rip</code></em>. <em class="parameter"><code>foomatic-rip</code></em> is a complete rewrite … … 1123 1125 too. 1124 1126 </p><p> 1125 <a class="indexterm" name="id 422457"></a>1126 <a class="indexterm" name="id 422464"></a>1127 <a class="indexterm" name="id396725"></a> 1128 <a class="indexterm" name="id396732"></a> 1127 1129 Like the old <em class="parameter"><code>cupsomatic</code></em> method, the <em class="parameter"><code>foomatic-rip</code></em> (new) method 1128 1130 from Linuxprinting.org uses the traditional Ghostscript print file processing, doing everything in a single … … 1134 1136 different queues) and find out which works best for you. 1135 1137 </p><p> 1136 <a class="indexterm" name="id 422494"></a>1137 <a class="indexterm" name="id 422501"></a>1138 <a class="indexterm" name="id 422508"></a>1139 <a class="indexterm" name="id 422515"></a>1140 <a class="indexterm" name="id 422522"></a>1141 <a class="indexterm" name="id 422528"></a>1138 <a class="indexterm" name="id396762"></a> 1139 <a class="indexterm" name="id396769"></a> 1140 <a class="indexterm" name="id396776"></a> 1141 <a class="indexterm" name="id396783"></a> 1142 <a class="indexterm" name="id396790"></a> 1143 <a class="indexterm" name="id396796"></a> 1142 1144 <em class="parameter"><code>cupsomatic</code></em> kidnaps the print file after the 1143 1145 <em class="parameter"><code>application/vnd.cups-postscript</code></em> stage and deviates it through the CUPS-external, … … 1148 1150 CUPS</a>, illustrates the difference between native CUPS rendering and the 1149 1151 <em class="parameter"><code>Foomatic/cupsomatic</code></em> method. 1150 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 422583"></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="id396851"></a>Examples for Filtering Chains</h3></div></div></div><p> 1151 1153 Here are a few examples of commonly occurring filtering chains to 1152 1154 illustrate the workings of CUPS. 1153 1155 </p><p> 1154 <a class="indexterm" name="id 422595"></a>1155 <a class="indexterm" name="id 422602"></a>1156 <a class="indexterm" name="id 422609"></a>1157 <a class="indexterm" name="id 422615"></a>1156 <a class="indexterm" name="id396863"></a> 1157 <a class="indexterm" name="id396870"></a> 1158 <a class="indexterm" name="id396877"></a> 1159 <a class="indexterm" name="id396883"></a> 1158 1160 Assume you want to print a PDF file to an HP JetDirect-connected 1159 1161 PostScript printer, but you want to print pages 3-5, 7, and 11-13 … … 1165 1167 MIME type <em class="parameter"><code>application/postscript</code></em> (a preview here 1166 1168 would still show all pages of the original PDF).</p></li><li><p>The file then passes the <em class="parameter"><code>pstops</code></em> 1167 filter that applies the command -line options: it selects pages1169 filter that applies the command line options: it selects pages 1168 1170 2-5, 7, and 11-13, creates the imposed layout “<span class="quote">two pages on one sheet</span>”, and 1169 1171 inserts the correct “<span class="quote">duplex</span>” command (as defined in the printer's … … 1174 1176 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 1175 1177 illustration</a>. 1176 </p><a class="indexterm" name="id 422717"></a><div class="figure"><a name="pdftosocket"></a><p class="title"><b>Figure 22.11. PDF to Socket Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftosocket.png" alt="PDF to Socket Chain."></div></div></div><br class="figure-break"><p>1177 <a class="indexterm" name="id 422765"></a>1178 <a class="indexterm" name="id 422772"></a>1179 <a class="indexterm" name="id 422779"></a>1178 </p><a class="indexterm" name="id396985"></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="id397033"></a> 1180 <a class="indexterm" name="id397040"></a> 1181 <a class="indexterm" name="id397047"></a> 1180 1182 Assume you want to print the same filter to an USB-connected Epson Stylus Photo Printer installed with the CUPS 1181 1183 <code class="filename">stphoto2.ppd</code>. The first few filtering stages are nearly the same: … … 1187 1189 <em class="parameter"><code>application/pdf</code></em>. 1188 1190 </p></li><li><p> 1189 <a class="indexterm" name="id 422816"></a>1190 <a class="indexterm" name="id 422823"></a>1191 <a class="indexterm" name="id397084"></a> 1192 <a class="indexterm" name="id397091"></a> 1191 1193 The file must first pass the <em class="parameter"><code>pdftops</code></em> prefilter, which produces PostScript 1192 1194 MIME type <em class="parameter"><code>application/postscript</code></em> (a preview here would still show all 1193 1195 pages of the original PDF). 1194 1196 </p></li><li><p> 1195 <a class="indexterm" name="id 422846"></a>1196 <a class="indexterm" name="id 422853"></a>1197 <a class="indexterm" name="id397114"></a> 1198 <a class="indexterm" name="id397121"></a> 1197 1199 The file then passes the “<span class="quote">pstops</span>” filter that applies 1198 the command -line options: it selects the pages 2-5, 7, and 11-13,1200 the command line options: it selects the pages 2-5, 7, and 11-13, 1199 1201 creates the imposed layout “<span class="quote">two pages on one sheet,</span>” and inserts the 1200 1202 correct “<span class="quote">duplex</span>” command (oops this printer and PPD … … 1206 1208 <em class="parameter"><code>application/cups-raster</code></em>. 1207 1209 </p></li><li><p> 1208 <a class="indexterm" name="id 422904"></a>1210 <a class="indexterm" name="id397172"></a> 1209 1211 Finally, the <em class="parameter"><code>rastertoepson</code></em> filter 1210 1212 does its work (as indicated in the printer's PPD), creating the … … 1216 1218 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 1217 1219 illustration</a>. 1218 </p><div class="figure"><a name="pdftoepsonusb"></a><p class="title"><b>Figure 22.12. PDF to USB Chain.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/pdftoepsonusb.png" alt="PDF to USB Chain."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 422984"></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="id397252"></a>Sources of CUPS Drivers/PPDs</h3></div></div></div><p> 1219 1221 On the Internet you can now find many thousands of CUPS-PPD files 1220 1222 (with their companion filters), in many national languages 1221 1223 supporting more than 1,000 non-PostScript models. 1222 </p><div class="itemizedlist"><a class="indexterm" name="id 422997"></a><a class="indexterm" name="id423006"></a><ul type="disc"><li><p>1224 </p><div class="itemizedlist"><a class="indexterm" name="id397265"></a><a class="indexterm" name="id397274"></a><ul type="disc"><li><p> 1223 1225 <a class="ulink" href="http://www.easysw.com/printpro/" target="_top">ESP PrintPro</a> 1224 1226 (commercial, non-free) is packaged with more than 3,000 PPDs, ready for … … 1229 1231 CUPS, as they feed their creators). 1230 1232 </p></li><li><p> 1231 The <a class="ulink" href="http://gimp-print.sourceforge.net/" target="_top">G imp-Print Project</a>1233 The <a class="ulink" href="http://gimp-print.sourceforge.net/" target="_top">Gutenprint Project</a> 1232 1234 (GPL, free software) provides around 140 PPDs (supporting nearly 400 printers, many driven 1233 to photo quality output), to be used alongside the G imp-Print CUPS filters.1235 to photo quality output), to be used alongside the Gutenprint CUPS filters. 1234 1236 </p></li><li><p> 1235 1237 <a class="ulink" href="http://www.turboprint.de/english.html/" target="_top">TurboPrint </a> (shareware, non-free) supports … … 1247 1249 <a class="ulink" href="http://www.linuxprinting.org/" target="_top">Foomatic/cupsomatic </a> 1248 1250 (LPGL, free) from Linuxprinting.org provide PPDs for practically every Ghostscript 1249 filter known to the world (including Omni, G imp-Print, and HPIJS).1250 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423093"></a>Printing with Interface Scripts</h3></div></div></div><p>1251 <a class="indexterm" name="id 423101"></a>1252 <a class="indexterm" name="id 423108"></a>1251 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="id397361"></a>Printing with Interface Scripts</h3></div></div></div><p> 1253 <a class="indexterm" name="id397369"></a> 1254 <a class="indexterm" name="id397376"></a> 1253 1255 CUPS also supports the use of “<span class="quote">interface scripts</span>” as known from 1254 1256 System V AT&T printing systems. These are often used for PCL … … 1272 1274 <a class="ulink" href="http://playground.sun.com/printing/documentation/interface.html" target="_top"> 1273 1275 http://playground.sun.com/printing/documentation/interface.html</a>). 1274 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 423172"></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="id397440"></a>Network Printing (Purely Windows)</h2></div></div></div><p> 1275 1277 Network printing covers a lot of ground. To understand what exactly 1276 1278 goes on with Samba when it is printing on behalf of its Windows 1277 1279 clients, let's first look at a “<span class="quote">purely Windows</span>” setup: Windows clients 1278 1280 with a Windows NT print server. 1279 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423186"></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="id397454"></a>From Windows Clients to an NT Print Server</h3></div></div></div><p> 1280 1282 Windows clients printing to an NT-based print server have two 1281 1283 options. They may: 1282 <a class="indexterm" name="id 423195"></a>1283 <a class="indexterm" name="id 423202"></a>1284 <a class="indexterm" name="id397463"></a> 1285 <a class="indexterm" name="id397470"></a> 1284 1286 </p><div class="itemizedlist"><ul type="disc"><li><p>Execute the driver locally and render the GDI output 1285 1287 (EMF) into the printer-specific format on their own. … … 1290 1292 Print Driver Execution on the Client</a>, and 1291 1293 <a class="link" href="CUPS-printing.html#small12" title="Figure 22.14. Print Driver Execution on the Server.">Print Driver Execution on the Server</a>. 1292 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423245"></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="id397513"></a>Driver Execution on the Client</h3></div></div></div><p> 1293 1295 In the first case, the print server must spool the file as raw, meaning it shouldn't touch the job file and try 1294 1296 to convert it in any way. This is what a traditional UNIX-based print server can do too, and at a better … … 1298 1300 installed 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 1299 1301 Client diagram</a>. 1300 </p><div class="figure"><a name="small11"></a><p class="title"><b>Figure 22.13. Print Driver Execution on the Client.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/11small.png" alt="Print Driver Execution on the Client."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423310"></a>Driver Execution on the Server</h3></div></div></div><p>1301 <a class="indexterm" name="id 423318"></a>1302 <a class="indexterm" name="id 423325"></a>1303 <a class="indexterm" name="id 423331"></a>1304 <a class="indexterm" name="id 423338"></a>1305 <a class="indexterm" name="id 423344"></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="id397578"></a>Driver Execution on the Server</h3></div></div></div><p> 1303 <a class="indexterm" name="id397586"></a> 1304 <a class="indexterm" name="id397593"></a> 1305 <a class="indexterm" name="id397599"></a> 1306 <a class="indexterm" name="id397606"></a> 1307 <a class="indexterm" name="id397612"></a> 1306 1308 The other path executes the printer driver on the server. The client transfers print files in EMF format to 1307 1309 the server. The server uses the PostScript, PCL, ESC/P, or other driver to convert the EMF file into the … … 1311 1313 </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> 1312 1314 However, something similar is possible with CUPS, so read on. 1313 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 423409"></a>Network Printing (Windows Clients and UNIX/Samba Print1315 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id397677"></a>Network Printing (Windows Clients and UNIX/Samba Print 1314 1316 Servers)</h2></div></div></div><p> 1315 1317 Since UNIX print servers <span class="emphasis"><em>cannot</em></span> execute the Win32 … … 1318 1320 much. On the contrary, you may have a way here to implement printing 1319 1321 features that are not possible otherwise. 1320 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423425"></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="id397693"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div></div><p> 1321 1323 Here is a simple recipe showing how you can take advantage of CUPS's 1322 1324 powerful features for the benefit of your Windows network printing … … 1330 1332 First, to enable CUPS-based printing through Samba, the following options should be set in your <code class="filename">smb.conf</code> 1331 1333 file <em class="parameter"><code>[global]</code></em> section: 1332 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 423474"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id423486"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p>1334 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id397742"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id397754"></a><em class="parameter"><code>printcap = cups</code></em></td></tr></table><p> 1333 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 1336 ignored. Instead, Samba will directly interface with CUPS through its application program interface (API), as … … 1338 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 1339 1341 CUPS/Samba Server diagram</a>. 1340 </p><div class="figure"><a name="13small"></a><p class="title"><b>Figure 22.15. Printing via CUPS/Samba Server.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/13small.png" alt="Printing via CUPS/Samba Server."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423600"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p>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="id397868"></a>Samba Receiving Job-Files and Passing Them to CUPS</h3></div></div></div><p> 1341 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 1344 into the spool directory of CUPS (the CUPS spool directory is set by the <em class="parameter"><code>RequestRoot</code></em> … … 1350 1352 allow “<span class="quote">localhost</span>” to print. If it runs on different machines, you 1351 1353 need to make sure the Samba host gets access to printing on CUPS. 1352 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 423671"></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="id397939"></a>Network PostScript RIP</h2></div></div></div><p> 1353 1355 This section discusses the use of CUPS filters on the server configuration where 1354 1356 clients make use of a PostScript driver with CUPS-PPDs. 1355 1357 </p><p> 1356 <a class="indexterm" name="id 423686"></a>1357 <a class="indexterm" name="id 423693"></a>1358 <a class="indexterm" name="id 423699"></a>1358 <a class="indexterm" name="id397954"></a> 1359 <a class="indexterm" name="id397961"></a> 1360 <a class="indexterm" name="id397967"></a> 1359 1361 PPDs can control all print device options. They are usually provided by the manufacturer if you own 1360 1362 a PostScript printer, that is. PPD files are always a component of PostScript printer drivers on MS Windows or … … 1365 1367 CUPS can load, without any conversions, the PPD file from any Windows (NT is recommended) PostScript driver 1366 1368 and handle the options. There is a Web browser interface to the print options (select <a class="ulink" href="http://localhost:631/printers/" target="_top">http://localhost:631/printers/</a> and click on one 1367 <span class="guibutton">Configure Printer</span> button to see it) or a command -line interface (see <code class="literal">man1369 <span class="guibutton">Configure Printer</span> button to see it) or a command line interface (see <code class="literal">man 1368 1370 lpoptions</code> or see if you have <code class="literal">lphelp</code> on your system). There are also some 1369 1371 different GUI front-ends on Linux/UNIX, which can present PPD options to users. PPD options are normally meant 1370 1372 to be evaluated by the PostScript RIP on the real PostScript printer. 1371 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423751"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p>1372 <a class="indexterm" name="id 423758"></a>1373 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398019"></a>PPDs for Non-PS Printers on UNIX</h3></div></div></div><p> 1374 <a class="indexterm" name="id398026"></a> 1373 1375 CUPS does not limit itself to “<span class="quote">real</span>” PostScript printers in its use of PPDs. The CUPS developers 1374 1376 have extended the scope of the PPD concept to also describe available device and driver options for … … 1382 1384 devices to its clients, because it can act as a PostScript RIP for those printers, processing the received 1383 1385 PostScript code into a proper raster print format. 1384 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423788"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p>1385 <a class="indexterm" name="id 423795"></a>1386 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398056"></a>PPDs for Non-PS Printers on Windows</h3></div></div></div><p> 1387 <a class="indexterm" name="id398063"></a> 1386 1388 CUPS-PPDs can also be used on Windows clients, on top of a “<span class="quote">core</span>” PostScript driver (now 1387 1389 recommended is the CUPS PostScript Driver for Windows NT/200x/XP; you can also use the Adobe one, with … … 1397 1399 </p></li></ul></div><p> 1398 1400 Using CUPS PPDs on Windows clients enables them to control all print job settings just as a UNIX client can do. 1399 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 423848"></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="id398116"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div></div><p> 1400 1402 This setup may be of special interest to people experiencing major problems in WTS environments. WTS often 1401 1403 need a multitude of non-PostScript drivers installed to run their clients' variety of different printer 1402 1404 models. This often imposes the price of much increased instability. 1403 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423860"></a>Printer Drivers Running in “<span class="quote">Kernel Mode</span>” Cause Many1405 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398128"></a>Printer Drivers Running in “<span class="quote">Kernel Mode</span>” Cause Many 1404 1406 Problems</h3></div></div></div><p> 1405 1407 Windows NT printer drivers, which run in “<span class="quote">kernel mode</span>”, introduce a high risk for the stability … … 1413 1415 one from Adobe and the one from Microsoft. Both are well-tested and are as stable as you can imagine on 1414 1416 Windows. The CUPS driver is derived from the Microsoft one. 1415 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423891"></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="id398159"></a>Workarounds Impose Heavy Limitations</h3></div></div></div><p> 1416 1418 In an attempt to work around problems, site administrators have resorted to restricting the 1417 1419 allowed drivers installed on their WTS to one generic PCL and one PostScript driver. This, however, restricts 1418 1420 the number of printer options available for clients to use. Often they can't get out more than simplex 1419 1421 prints from one standard paper tray, while their devices could do much better if driven by a different driver! 1420 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423905"></a>CUPS: A “<span class="quote">Magical Stone</span>”?</h3></div></div></div><p>1421 <a class="indexterm" name="id 423916"></a>1422 <a class="indexterm" name="id 423923"></a>1422 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398173"></a>CUPS: A “<span class="quote">Magical Stone</span>”?</h3></div></div></div><p> 1423 <a class="indexterm" name="id398184"></a> 1424 <a class="indexterm" name="id398191"></a> 1423 1425 Using a PostScript driver, enabled with a CUPS-PPD, seems to be a very elegant way to overcome all these 1424 1426 shortcomings. There are, depending on the version of Windows OS you use, up to three different PostScript … … 1429 1431 “<span class="quote">raw spooling</span>” device. Plus, this setup is not yet widely tested, although the first feedbacks 1430 1432 look very promising. 1431 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 423941"></a>PostScript Drivers with No Major Problems, Even in Kernel1433 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398209"></a>PostScript Drivers with No Major Problems, Even in Kernel 1432 1434 Mode</h3></div></div></div><p> 1433 <a class="indexterm" name="id 423950"></a>1434 <a class="indexterm" name="id 423956"></a>1435 <a class="indexterm" name="id 423963"></a>1436 <a class="indexterm" name="id 423970"></a>1437 <a class="indexterm" name="id 423977"></a>1438 <a class="indexterm" name="id 423984"></a>1435 <a class="indexterm" name="id398218"></a> 1436 <a class="indexterm" name="id398224"></a> 1437 <a class="indexterm" name="id398231"></a> 1438 <a class="indexterm" name="id398238"></a> 1439 <a class="indexterm" name="id398245"></a> 1440 <a class="indexterm" name="id398252"></a> 1439 1441 More recent printer drivers on W200x and XP no longer run in kernel mode (unlike Windows NT). However, both 1440 1442 operating systems can still use the NT drivers, running in kernel mode (you can roughly tell which is which as … … 1448 1450 the GPL, and if you are the owner of an “<span class="quote">MS DDK for Windows NT,</span>” you can check the driver 1449 1451 yourself. 1450 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 424020"></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="id398288"></a>Configuring CUPS for Driver Download</h2></div></div></div><p> 1451 1453 As we have said before, all previously known methods to prepare client printer drivers on the Samba server for 1452 1454 download and Point'n'Print convenience of Windows workstations are working with CUPS, too. These methods were 1453 1455 described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing</a>. In reality, this is a pure Samba 1454 1456 business and relates only to the Samba-Windows client relationship. 1455 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424038"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p>1456 <a class="indexterm" name="id 424048"></a>1457 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id398306"></a><span class="emphasis"><em>cupsaddsmb</em></span>: The Unknown Utility</h3></div></div></div><p> 1458 <a class="indexterm" name="id398316"></a> 1457 1459 The <em class="parameter"><code>cupsaddsmb</code></em> utility (shipped with all current CUPS versions) is an alternative 1458 1460 method to transfer printer drivers into the Samba <em class="parameter"><code>[print$]</code></em> share. Remember, this … … 1471 1473 CUPS drivers. You will also need to get the respective part of the Adobe driver 1472 1474 if you need to support Windows 95, 98, and Me clients. 1473 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424126"></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="id398394"></a>Prepare Your <code class="filename">smb.conf</code> for <code class="literal">cupsaddsmb</code></h3></div></div></div><p> 1474 1476 Prior to running <code class="literal">cupsaddsmb</code>, you need the settings in 1475 1477 <code class="filename">smb.conf</code> as shown in <a class="link" href="CUPS-printing.html#cupsadd-ex" title="Example 22.3. smb.conf for cupsaddsmb Usage">the <code class="filename">smb.conf</code> for cupsaddsmb Usage</a>. 1476 </p><div class="example"><a name="cupsadd-ex"></a><p class="title"><b>Example 22.3. smb.conf for cupsaddsmb Usage</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id 424195"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424206"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id424218"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id424238"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id424250"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id424261"></a><em class="parameter"><code>browseable = no</code></em></td></tr><tr><td><a class="indexterm" name="id424272"></a><em class="parameter"><code>public = yes</code></em></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><a class="indexterm" name="id424288"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424299"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id424310"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424322"></a><em class="parameter"><code>printer admin = root</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[print$]</code></em></td></tr><tr><td><a class="indexterm" name="id424342"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id424354"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id424366"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424377"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id424388"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id424400"></a><em class="parameter"><code>write list = root</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id424414"></a>CUPS “<span class="quote">PostScript Driver for Windows NT/200x/XP</span>”</h3></div></div></div><p>1477 <a class="indexterm" name="id 424424"></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="id398463"></a><em class="parameter"><code>load printers = yes</code></em></td></tr><tr><td><a class="indexterm" name="id398474"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id398486"></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="id398506"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id398518"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id398529"></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="id398544"></a><em class="parameter"><code>guest ok = yes</code></em></td></tr><tr><td><a class="indexterm" name="id398556"></a><em class="parameter"><code>writable = no</code></em></td></tr><tr><td><a class="indexterm" name="id398567"></a><em class="parameter"><code>printable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id398578"></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="id398599"></a><em class="parameter"><code>comment = Printer Drivers</code></em></td></tr><tr><td><a class="indexterm" name="id398610"></a><em class="parameter"><code>path = /etc/samba/drivers</code></em></td></tr><tr><td><a class="indexterm" name="id398622"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id398634"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id398645"></a><em class="parameter"><code>read only = yes</code></em></td></tr><tr><td><a class="indexterm" name="id398656"></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="id398670"></a>CUPS “<span class="quote">PostScript Driver for Windows NT/200x/XP</span>”</h3></div></div></div><p> 1479 <a class="indexterm" name="id398681"></a> 1478 1480 CUPS 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 1479 1481 from the CUPS-based software files, tagged as CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba (tar.gz, … … 1488 1490 cups-samba.ss 1489 1491 </pre><p> 1490 <a class="indexterm" name="id 424466"></a>1491 <a class="indexterm" name="id 424475"></a>1492 <a class="indexterm" name="id398723"></a> 1493 <a class="indexterm" name="id398732"></a> 1492 1494 These have been packaged with the ESP meta-packager software EPM. The <code class="filename">*.install</code> and 1493 1495 <code class="filename">*.remove</code> files are simple shell scripts, which untar the <code class="filename">*.ss</code> (the … … 1521 1523 the correct place. 1522 1524 </p></div><p> 1523 <a class="indexterm" name="id 424618"></a>1525 <a class="indexterm" name="id398875"></a> 1524 1526 This new CUPS PostScript driver is currently binary only, but free of charge. No complete source code is 1525 1527 provided (yet). The reason is that it has been developed with the help of the Microsoft DDK and compiled with … … 1527 1529 free software. However, CUPS developers released the “<span class="quote">diff</span>” in source code under the GPL, so 1528 1530 anybody with a license for Visual Studio and a DDK will be able to compile for himself or herself. 1529 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424635"></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="id398892"></a>Recognizing Different Driver Files</h3></div></div></div><p> 1530 1532 The CUPS drivers do not support the older Windows 95/98/Me, but only the Windows NT/2000/XP client. 1531 1533 </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> … … 1534 1536 different platforms. 1535 1537 </p><p>Windows 95, 98, and ME are supported by:</p><div class="itemizedlist"><ul type="disc"><li><p>ADFONTS.MFM</p></li><li><p>ADOBEPS4.DRV</p></li><li><p>ADOBEPS4.HLP</p></li><li><p>DEFPRTR2.PPD</p></li><li><p>ICONLIB.DLL</p></li><li><p>PSMON.DLL</p></li></ul></div><p>Windows NT, 2000, and XP are supported by:</p><div class="itemizedlist"><ul type="disc"><li><p>ADOBEPS5.DLL</p></li><li><p>ADOBEPSU.DLL</p></li><li><p>ADOBEPSU.HLP</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 1536 <a class="indexterm" name="id 424728"></a>1538 <a class="indexterm" name="id398985"></a> 1537 1539 If both the Adobe driver files and the CUPS driver files for the support of Windows NT/200x/XP are presently 1538 1540 installed on the server, the Adobe files will be ignored and the CUPS files will be used. If you prefer 1539 1541 for whatever reason to use Adobe-only drivers, move away the three CUPS driver files. 1540 1542 The Windows 9x/Me clients use the Adobe drivers in any case. 1541 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424746"></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="id399003"></a>Acquiring the Adobe Driver Files</h3></div></div></div><p> 1542 1544 Acquiring the Adobe driver files seems to be unexpectedly difficult for many users. They are not available on 1543 1545 the Adobe Web site as single files, and the self-extracting and/or self-installing Windows-.exe is not easy to … … 1545 1547 client once. This will install the drivers (and one generic PostScript printer) locally on the client. When 1546 1548 they are installed, share the generic PostScript printer. After this, the client's <em class="parameter"><code>[print$]</code></em> share holds the Adobe files, which you can get with smbclient from the CUPS host. 1547 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424766"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p>1548 <a class="indexterm" name="id 424774"></a>1549 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399023"></a>ESP Print Pro PostScript Driver for Windows NT/200x/XP</h3></div></div></div><p> 1550 <a class="indexterm" name="id399031"></a> 1549 1551 Users of the ESP Print Pro software are able to install the ESP print drivers package as an alternative to the 1550 1552 Adobe PostScript drivers. To do so, retrieve the driver files from the normal download area of the ESP Print … … 1556 1558 the <em class="parameter"><code>[print$]</code></em> share, and so on. The ESP Print Pro package includes the CUPS driver 1557 1559 files as well as a (licensed) set of Adobe drivers for the Windows 95/98/Me client family. 1558 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 424821"></a>Caveats to Be Considered</h3></div></div></div><p>1559 <a class="indexterm" name="id 424829"></a>1560 <a class="indexterm" name="id 424835"></a>1561 <a class="indexterm" name="id 424842"></a>1562 <a class="indexterm" name="id 424849"></a>1560 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399077"></a>Caveats to Be Considered</h3></div></div></div><p> 1561 <a class="indexterm" name="id399085"></a> 1562 <a class="indexterm" name="id399092"></a> 1563 <a class="indexterm" name="id399099"></a> 1564 <a class="indexterm" name="id399106"></a> 1563 1565 Once you have run the install script (and possibly manually moved the <code class="filename">cups.hlp</code> file to 1564 1566 <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 … … 1567 1569 1.1.16). 1568 1570 </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> 1569 <a class="indexterm" name="id 424905"></a>1570 <a class="indexterm" name="id 424912"></a>1571 <a class="indexterm" name="id399162"></a> 1572 <a class="indexterm" name="id399169"></a> 1571 1573 You may need to put root into the smbpasswd file by running <code class="literal">smbpasswd</code>; this is especially 1572 1574 important if you should run this whole procedure for the first time and are not working in an environment … … 1583 1585 1.1.16) will automatically prefer its own drivers if it finds both. 1584 1586 </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 1585 <a class="indexterm" name="id 424981"></a>1586 <a class="indexterm" name="id 424988"></a>1587 <a class="indexterm" name="id399238"></a> 1588 <a class="indexterm" name="id399245"></a> 1587 1589 Should your Windows clients have had the old <code class="filename">ADOBE*.*</code> files for the Adobe PostScript 1588 1590 driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/200x/XP will … … 1598 1600 privileges to do this. 1599 1601 </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 1600 <a class="indexterm" name="id 425055"></a>1601 <a class="indexterm" name="id 425064"></a>1602 <a class="indexterm" name="id399312"></a> 1603 <a class="indexterm" name="id399321"></a> 1602 1604 Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all 1603 1605 printers to this one by proceeding as described in <a class="link" href="classicalprinting.html" title="Chapter 21. Classical Printing Support">Classical Printing … … 1605 1607 Properties</span> dialog, or use <code class="literal">rpcclient</code> with the <code class="literal">setdriver</code> 1606 1608 subcommand. 1607 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 425100"></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="id399357"></a>Windows CUPS PostScript Driver Versus Adobe Driver</h3></div></div></div><p> 1608 1610 Are you interested in a comparison between the CUPS and the Adobe PostScript drivers? For our purposes, these 1609 1611 are the most important items that weigh in favor of CUPS: 1610 1612 </p><div class="itemizedlist"><ul type="disc"><li><p>No hassle with the Adobe EULA.</p></li><li><p>No hassle with the question, “<span class="quote">Where do I 1611 1613 get the ADOBE*.* driver files?</span>”</p></li><li><p> 1612 <a class="indexterm" name="id 425128"></a>1614 <a class="indexterm" name="id399385"></a> 1613 1615 The Adobe drivers (on request of the printer PPD associated with them) often put a PJL header in front of the 1614 1616 main PostScript part of the print file. Thus, the print file starts with <em class="parameter"><code><1B … … 1616 1618 <em class="parameter"><code>%!PS</code></em>. This leads to the CUPS daemon autotyping the incoming file as a print-ready file, 1617 1619 not initiating a pass through the <em class="parameter"><code>pstops</code></em> filter (to speak more technically, it is not 1618 regarded as the generic MIME-type <a class="indexterm" name="id 425162"></a>1620 regarded as the generic MIME-type <a class="indexterm" name="id399419"></a> 1619 1621 <em class="parameter"><code>application/postscript</code></em>, but as the more special MIME type 1620 <a class="indexterm" name="id 425175"></a>1622 <a class="indexterm" name="id399432"></a> 1621 1623 <em class="parameter"><code>application/cups.vnd-postscript</code></em>), which therefore also leads to the page accounting in 1622 1624 <em class="parameter"><code>/var/log/cups/page_log</code></em> not receiving the exact number of pages; instead the dummy page 1623 1625 number of “<span class="quote">1</span>” is logged in a standard setup). 1624 1626 </p></li><li><p>The Adobe driver has more options to misconfigure the 1625 <a class="indexterm" name="id 425204"></a>1627 <a class="indexterm" name="id399460"></a> 1626 1628 PostScript generated by it (like setting it inadvertently to 1627 1629 <span class="guilabel">Optimize for Speed</span> instead of 1628 1630 <span class="guilabel">Optimize for Portability</span>, which 1629 1631 could lead to CUPS being unable to process it).</p></li><li><p>The CUPS PostScript driver output sent by Windows 1630 <a class="indexterm" name="id 425228"></a>1632 <a class="indexterm" name="id399485"></a> 1631 1633 clients to the CUPS server is guaranteed to autotype 1632 1634 as the generic MIME type <em class="parameter"><code>application/postscript</code></em>, … … 1634 1636 correct number of pages in the <code class="filename">page_log</code> for 1635 1637 accounting and quota purposes.</p></li><li><p> 1636 <a class="indexterm" name="id 425259"></a>1638 <a class="indexterm" name="id399516"></a> 1637 1639 The CUPS PostScript driver supports the sending of additional standard (IPP) print options by Windows 1638 1640 NT/200x/XP clients. Such additional print options are naming the CUPS standard <span class="emphasis"><em>banner … … 1647 1649 and simply ignore it).</p></li><li><p>The CUPS PostScript driver will be the heart of the 1648 1650 fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon 1649 (probably alongside the first beta release for CUPS 1.2).</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 425295"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p>1650 <a class="indexterm" name="id 425303"></a>1651 <a class="indexterm" name="id 425310"></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="id399552"></a>Run cupsaddsmb (Quiet Mode)</h3></div></div></div><p> 1652 <a class="indexterm" name="id399560"></a> 1653 <a class="indexterm" name="id399567"></a> 1652 1654 The <code class="literal">cupsaddsmb</code> command copies the needed files into your <em class="parameter"><code>[print$]</code></em> 1653 1655 share. Additionally, the PPD associated with this printer is copied from <code class="filename">/etc/cups/ppd/</code> … … 1657 1659 </p><p> 1658 1660 Here is an example of a successfully run <code class="literal">cupsaddsmb</code> command: 1659 <a class="indexterm" name="id 425364"></a>1660 <a class="indexterm" name="id 425371"></a>1661 <a class="indexterm" name="id399621"></a> 1662 <a class="indexterm" name="id399627"></a> 1661 1663 </p><pre class="screen"> 1662 1664 <code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root infotec_IS2027</code></strong> 1663 1665 Password for root required to access localhost via Samba: <strong class="userinput"><code>['secret']</code></strong> 1664 1666 </pre><p> 1665 <a class="indexterm" name="id 425402"></a>1667 <a class="indexterm" name="id399659"></a> 1666 1668 To share <span class="emphasis"><em>all</em></span> printers and drivers, use the 1667 1669 <code class="option">-a</code> parameter instead of a printer name. Since 1668 1670 <code class="literal">cupsaddsmb</code> “<span class="quote">exports</span>” the printer drivers to Samba, it should be 1669 1671 obvious that it only works for queues with a CUPS driver associated. 1670 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 425429"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p>1671 <a class="indexterm" name="id 425437"></a>1672 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399686"></a>Run cupsaddsmb with Verbose Output</h3></div></div></div><p> 1673 <a class="indexterm" name="id399693"></a> 1672 1674 Probably you want to see what's going on. Use the 1673 1675 <code class="option">-v</code> parameter to get a more verbose output. The … … 1675 1677 a line indicate that I inserted an artificial line break plus some 1676 1678 indentation here: 1677 <a class="indexterm" name="id 425452"></a>1678 <a class="indexterm" name="id 425462"></a>1679 <a class="indexterm" name="id399709"></a> 1680 <a class="indexterm" name="id399718"></a> 1679 1681 </p><pre class="screen"> 1680 1682 <code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -U root -v infotec_2105</code></strong> … … 1745 1747 This will occur when the directories WIN40 and W32X86 already existed in the <em class="parameter"><code>[print$]</code></em> 1746 1748 driver download share (from a previous driver installation). These are harmless warning messages. 1747 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 425560"></a>Understanding cupsaddsmb</h3></div></div></div><p>1748 <a class="indexterm" name="id 425568"></a>1749 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id399816"></a>Understanding cupsaddsmb</h3></div></div></div><p> 1750 <a class="indexterm" name="id399824"></a> 1749 1751 What has happened? What did <code class="literal">cupsaddsmb</code> do? There are five stages of the procedure: 1750 1752 </p><div class="orderedlist"><ol type="1"><li><p> 1751 <a class="indexterm" name="id 425592"></a>1753 <a class="indexterm" name="id399849"></a> 1752 1754 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 1753 1755 share's WIN40 (for Windows 9x/Me) and W32X86 (for Windows NT/200x/XP) subdirectories.</p></li><li><p> 1754 <a class="indexterm" name="id 425626"></a>1756 <a class="indexterm" name="id399883"></a> 1755 1757 Connect via rpcclient to the Samba server and execute the <code class="literal">adddriver</code> command with the correct parameters. 1756 1758 </p></li><li><p> 1757 <a class="indexterm" name="id 425646"></a>1759 <a class="indexterm" name="id399903"></a> 1758 1760 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> 1759 1761 You can run the <code class="literal">cupsaddsmb</code> utility with parameters to specify one remote host as Samba host … … 1764 1766 <code class="prompt">root# </code><strong class="userinput"><code>cupsaddsmb -H sambaserver -h cupsserver -v printer</code></strong> 1765 1767 </pre><p> 1766 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 425696"></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="id399952"></a>How to Recognize If cupsaddsmb Completed Successfully</h3></div></div></div><p> 1767 1769 You <span class="emphasis"><em>must</em></span> always check if the utility completed 1768 1770 successfully in all fields. You need at minimum these three messages … … 1793 1795 Therefore, we strongly recommend against use of the default quiet mode. It will hide any problems from you that 1794 1796 might occur. 1795 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 25806"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p>1796 <a class="indexterm" name="id4 25814"></a>1797 <a class="indexterm" name="id4 25821"></a>1797 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400063"></a>cupsaddsmb with a Samba PDC</h3></div></div></div><p> 1798 <a class="indexterm" name="id400071"></a> 1799 <a class="indexterm" name="id400078"></a> 1798 1800 Can't get the standard <code class="literal">cupsaddsmb</code> command to run on a Samba PDC? Are you asked for the 1799 1801 password credential again and again, and the command just will not take off at all? Try one of these … … 1805 1807 </pre><p> 1806 1808 (Note the two backslashes: the first one is required to “<span class="quote">escape</span>” the second one). 1807 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 25884"></a>cupsaddsmb Flowchart</h3></div></div></div><p>1808 <a class="indexterm" name="id4 25891"></a>1809 <a class="indexterm" name="id4 25898"></a>1809 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400140"></a>cupsaddsmb Flowchart</h3></div></div></div><p> 1810 <a class="indexterm" name="id400148"></a> 1811 <a class="indexterm" name="id400155"></a> 1810 1812 <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 1811 1813 data flows of the <code class="literal">cupaddsmb</code> command. Note again: cupsaddsmb is 1812 1814 not intended to, and does not work with, raw print queues! 1813 </p><div class="figure"><a name="small14"></a><p class="title"><b>Figure 22.16. cupsaddsmb Flowchart.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/14small.png" alt="cupsaddsmb Flowchart."></div></div></div><br class="figure-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 25962"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p>1814 <a class="indexterm" name="id4 25970"></a>1815 <a class="indexterm" name="id4 25977"></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="id400218"></a>Installing the PostScript Driver on a Client</h3></div></div></div><p> 1816 <a class="indexterm" name="id400226"></a> 1817 <a class="indexterm" name="id400233"></a> 1816 1818 After <code class="literal">cupsaddsmb</code> is completed, your driver is prepared for the clients to use. Here are the 1817 1819 steps you must perform to download and install it via Point'n'Print. From a Windows client, browse to the 1818 1820 CUPS/Samba server: 1819 1821 </p><div class="itemizedlist"><ul type="disc"><li><p> 1820 <a class="indexterm" name="id4 25998"></a>1822 <a class="indexterm" name="id400254"></a> 1821 1823 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 1822 1824 <span class="guimenuitem">Install...</span> or … … 1825 1827 <span class="guilabel">Printers</span> folder. On Windows XP it will follow a naming convention of 1826 1828 <span class="emphasis"><em>PrinterName on SambaServer</em></span>. (In my current case it is infotec_2105 on kde-bitshop). If 1827 you want to test it and send your first job from an application like Winword, the new printer appears in a 1829 you want to test it and send your first job from an application like Microsoft Word, 1830 the new printer appears in a 1828 1831 <code class="filename">\\SambaServer\PrinterName</code> entry in the drop-down list of available printers. 1829 1832 </p><p> 1830 <a class="indexterm" name="id4 26062"></a>1831 <a class="indexterm" name="id4 26069"></a>1832 <a class="indexterm" name="id4 26076"></a>1833 <a class="indexterm" name="id400319"></a> 1834 <a class="indexterm" name="id400325"></a> 1835 <a class="indexterm" name="id400332"></a> 1833 1836 <code class="literal">cupsaddsmb</code> will only reliably work with CUPS version 1.1.15 or higher and with Samba 1834 1837 version 2.2.4, or later. If it does not work, or if the automatic printer driver download to the clients does … … 1859 1862 instead of 3 (the latest ESP Ghostscript package handles Level 3 PostScript very well; Adobe). 1860 1863 </p></li><li><p> 1861 Say Yes to PostScript Error Handler (Adobe).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 26171"></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="id400428"></a>Installing PostScript Driver Files Manually Using rpcclient</h2></div></div></div><p> 1862 1865 Of course, you can run all the commands that are embedded into the 1863 1866 cupsaddsmb convenience utility yourself, one by one, and upload … … 1865 1868 </p><div class="orderedlist"><ol type="1"><li><p>Prepare Samba (a CUPS print queue with the name of the 1866 1869 printer should be there. We are providing the driver now).</p></li><li><p>Copy all files to <em class="parameter"><code>[print$]</code></em>.</p></li><li><p> 1867 <a class="indexterm" name="id4 26207"></a>1870 <a class="indexterm" name="id400464"></a> 1868 1871 Run <code class="literal">rpcclient adddriver</code> 1869 1872 (for each client architecture you want to support).</p></li><li><p> 1870 <a class="indexterm" name="id4 26227"></a>1873 <a class="indexterm" name="id400484"></a> 1871 1874 Run <code class="literal">rpcclient setdriver.</code></p></li></ol></div><p> 1872 <a class="indexterm" name="id4 26246"></a>1873 <a class="indexterm" name="id4 26255"></a>1874 <a class="indexterm" name="id4 26264"></a>1875 <a class="indexterm" name="id4 26273"></a>1876 <a class="indexterm" name="id4 26282"></a>1875 <a class="indexterm" name="id400502"></a> 1876 <a class="indexterm" name="id400511"></a> 1877 <a class="indexterm" name="id400521"></a> 1878 <a class="indexterm" name="id400530"></a> 1879 <a class="indexterm" name="id400539"></a> 1877 1880 We are going to do this now. First, read the man page on <em class="parameter"><code>rpcclient</code></em> to get a first idea. 1878 1881 Look at all the printing-related subcommands: <code class="literal">enumprinters</code>, <code class="literal">enumdrivers</code>, … … 1881 1884 You can use it to query (and command) a Windows NT (or 200x/XP) PC, too. MS-RPC is used by Windows clients, 1882 1885 among other things, to benefit from the Point'n'Print features. Samba can now mimic this as well. 1883 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 26337"></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="id400594"></a>A Check of the rpcclient man Page</h3></div></div></div><p> 1884 1887 First let's check the <em class="parameter"><code>rpcclient</code></em> man page. Here are two relevant passages: 1885 1888 </p><p> 1886 <a class="indexterm" name="id4 26355"></a>1887 <a class="indexterm" name="id4 26361"></a>1888 <a class="indexterm" name="id4 26368"></a>1889 <a class="indexterm" name="id400611"></a> 1890 <a class="indexterm" name="id400618"></a> 1891 <a class="indexterm" name="id400625"></a> 1889 1892 <code class="literal">adddriver <arch> <config></code> Execute an <code class="literal">AddPrinterDriver()</code> RPC 1890 1893 to install the printer driver information on the server. The driver files should already exist in the … … 1909 1912 RPC will fail. 1910 1913 </p><p> 1911 <a class="indexterm" name="id4 26439"></a>1912 <a class="indexterm" name="id4 26445"></a>1914 <a class="indexterm" name="id400695"></a> 1915 <a class="indexterm" name="id400702"></a> 1913 1916 <code class="literal">setdriver <printername> <drivername></code> Execute a <code class="literal">SetPrinter()</code> 1914 1917 command to update the printer driver associated with an installed printer. The printer driver must already be 1915 1918 correctly installed on the print server. 1916 1919 </p><p> 1917 <a class="indexterm" name="id4 26469"></a>1918 <a class="indexterm" name="id4 26476"></a>1920 <a class="indexterm" name="id400726"></a> 1921 <a class="indexterm" name="id400732"></a> 1919 1922 See also the <code class="literal">enumprinters</code> and <code class="literal">enumdrivers</code> commands to 1920 1923 obtain a list of installed printers and drivers. 1921 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 26497"></a>Understanding the rpcclient man Page</h3></div></div></div><p>1922 <a class="indexterm" name="id4 26505"></a>1924 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400754"></a>Understanding the rpcclient man Page</h3></div></div></div><p> 1925 <a class="indexterm" name="id400762"></a> 1923 1926 The <span class="emphasis"><em>exact</em></span> format isn't made too clear by the man page, since you have to deal with some 1924 1927 parameters containing spaces. Here is a better description for it. We have line-broken the command and … … 1944 1947 access it from a UNIX workstation. We will query it with <code class="literal">rpcclient</code> to see what it tells us 1945 1948 and try to understand the man page more clearly. 1946 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 26589"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p>1947 <a class="indexterm" name="id4 26597"></a>1948 <a class="indexterm" name="id4 26606"></a>1949 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400846"></a>Producing an Example by Querying a Windows Box</h3></div></div></div><p> 1950 <a class="indexterm" name="id400854"></a> 1951 <a class="indexterm" name="id400863"></a> 1949 1952 We could run <code class="literal">rpcclient</code> with a <code class="literal">getdriver</code> or a 1950 1953 <code class="literal">getprinter</code> subcommand (in level 3 verbosity) against it. Just sit down at a UNIX or Linux … … 1954 1957 </pre><p> 1955 1958 From the result it should become clear which is which. Here is an example from my installation: 1956 <a class="indexterm" name="id4 26654"></a>1959 <a class="indexterm" name="id400911"></a> 1957 1960 </p><pre class="screen"> 1958 1961 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -U'Danka%xxxx' W200xSERVER \ … … 1985 1988 drivers, we do not need any (nor would we for the Adobe PostScript driver); therefore, the field will get a 1986 1989 “<span class="quote">NULL</span>” entry. 1987 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 26709"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p>1988 <a class="indexterm" name="id4 26717"></a>1989 <a class="indexterm" name="id4 26726"></a>1990 <a class="indexterm" name="id4 26733"></a>1990 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id400965"></a>Requirements for adddriver and setdriver to Succeed</h3></div></div></div><p> 1991 <a class="indexterm" name="id400973"></a> 1992 <a class="indexterm" name="id400983"></a> 1993 <a class="indexterm" name="id400989"></a> 1991 1994 From the man page (and from the quoted output of <code class="literal">cupsaddsmb</code> above) it becomes clear that 1992 1995 you need to have certain conditions in order to make the manual uploading and initializing of the driver files … … 2005 2008 subdirectories.</p></li><li><p>The printer you are going to set up for the Windows 2006 2009 clients needs to be installed in CUPS already.</p></li><li><p> 2007 <a class="indexterm" name="id4 26877"></a>2008 <a class="indexterm" name="id4 26886"></a>2010 <a class="indexterm" name="id401133"></a> 2011 <a class="indexterm" name="id401143"></a> 2009 2012 The CUPS printer must be known to Samba; otherwise the <code class="literal">setdriver</code> subcommand fails with an 2010 2013 NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by Samba, you may use the … … 2012 2015 proper update of the printer list until every smbd process had received a SIGHUP or was restarted. Remember 2013 2016 this in case you've created the CUPS printer just recently and encounter problems: try restarting Samba. 2014 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 26920"></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="id401176"></a>Manual Driver Installation in 15 Steps</h3></div></div></div><p> 2015 2018 We are going to install a printer driver now by manually executing all 2016 2019 required commands. Because this may seem a rather complicated process at 2017 2020 first, we go through the procedure step by step, explaining every 2018 2021 single action item as it comes up. 2019 </p><div class="procedure"><a name="id4 26931"></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="id401188"></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"> 2020 2023 <code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E \ 2021 2024 -P canonIR85.ppd</code></strong> … … 2026 2029 for this step. 2027 2030 </p></li><li><p class="title"><b>(Optional.) Check if the printer is recognized by Samba.</b></p><p> 2028 <a class="indexterm" name="id4 26984"></a>2031 <a class="indexterm" name="id401241"></a> 2029 2032 </p><pre class="screen"> 2030 2033 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumprinters' localhost \ … … 2046 2049 list</span>” as defined in <code class="filename">smb.conf</code> for <em class="parameter"><code>[print$]</code></em>. 2047 2050 </p></li><li><p class="title"><b>(Optional.) Check if Samba knows a driver for the printer.</b></p><p> 2048 <a class="indexterm" name="id4 27075"></a>2049 <a class="indexterm" name="id4 27085"></a>2051 <a class="indexterm" name="id401332"></a> 2052 <a class="indexterm" name="id401341"></a> 2050 2053 </p><pre class="screen"> 2051 2054 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2'\ … … 2103 2106 <em class="parameter"><code>[print$]</code></em>. 2104 2107 </p></li><li><p class="title"><b>Tell Samba that these are driver files (<code class="literal">adddriver</code>).</b></p><p> 2105 <a class="indexterm" name="id4 27255"></a>2108 <a class="indexterm" name="id401512"></a> 2106 2109 </p><pre class="screen"> 2107 2110 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" \ … … 2134 2137 subdirectory. Compare this with the situation after step 5. 2135 2138 </p></li><li><p class="title"><b>(Optional.) Verify if Samba now recognizes the driver.</b></p><p> 2136 <a class="indexterm" name="id4 27350"></a>2139 <a class="indexterm" name="id401606"></a> 2137 2140 </p><pre class="screen"> 2138 2141 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'enumdrivers 3' \ … … 2149 2152 Remember, this command greps for the name you chose for the 2150 2153 driver in step 6. This command must succeed before you can proceed. 2151 </p></li><li><p ><span style="color: red"><title>Tell Samba which printer should use these driver files (<code class="literal">setdriver</code>).</title></span></p><p>2152 <a class="indexterm" name="id4 27401"></a>2154 </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="id401656"></a> 2153 2156 </p><pre class="screen"> 2154 2157 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' \ … … 2161 2164 <code class="literal">enumprinters</code> must find the printer. 2162 2165 </p></li><li><p class="title"><b>(Optional) Verify if Samba has recognized this association.</b></p><p> 2163 <a class="indexterm" name="id4 27456"></a>2164 <a class="indexterm" name="id4 27465"></a>2165 <a class="indexterm" name="id4 27474"></a>2166 <a class="indexterm" name="id401712"></a> 2167 <a class="indexterm" name="id401721"></a> 2168 <a class="indexterm" name="id401730"></a> 2166 2169 </p><pre class="screen"> 2167 2170 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ … … 2203 2206 2204 2207 </pre><p> 2205 <a class="indexterm" name="id4 27542"></a>2208 <a class="indexterm" name="id401798"></a> 2206 2209 Compare these results with the ones from steps 2 and 3. Every one of these commands show the driver is installed. Even 2207 2210 the <code class="literal">enumprinters</code> command now lists the driver … … 2209 2212 </p></li><li><p class="title"><b>(Optional.) Tickle the driver into a correct 2210 2213 device mode.</b></p><p> 2211 <a class="indexterm" name="id4 27575"></a>2214 <a class="indexterm" name="id401831"></a> 2212 2215 You certainly know how to install the driver on the client. In case 2213 2216 you are not particularly familiar with Windows, here is a short … … 2232 2235 <span class="guilabel">landscape</span></em></span>), click on <span class="guibutton">Apply</span>, and change the setting back. 2233 2236 </p></li><li><p class="title"><b>Install the printer on a client (Point'n'Print).</b></p><p> 2234 <a class="indexterm" name="id4 27684"></a>2237 <a class="indexterm" name="id401940"></a> 2235 2238 </p><pre class="screen"> 2236 2239 <code class="prompt">C:\> </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /in /n "\\sambaserver\mysmbtstprn"</code></strong> 2237 2240 </pre><p> 2238 2241 If it does not work, it could be a permissions problem with the <em class="parameter"><code>[print$]</code></em> share. 2239 </p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id4 27724"></a><pre class="screen">2242 </p></li><li><p class="title"><b>(Optional) Print a test page.</b></p><a class="indexterm" name="id401979"></a><pre class="screen"> 2240 2243 <code class="prompt">C:\> </code><strong class="userinput"><code>rundll32 printui.dll,PrintUIEntry /p /n "\\sambaserver\mysmbtstprn"</code></strong> 2241 2244 </pre><p> … … 2247 2250 </p></li><li><p class="title"><b>(Obligatory.) Enjoy. Jump. Celebrate your success.</b></p><pre class="screen"> 2248 2251 <code class="prompt">root# </code><strong class="userinput"><code>echo "Cheeeeerioooooo! Success..." >> /var/log/samba/log.smbd</code></strong> 2249 </pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 27799"></a>Troubleshooting Revisited</h3></div></div></div><p>2250 <a class="indexterm" name="id4 27807"></a>2252 </pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402054"></a>Troubleshooting Revisited</h3></div></div></div><p> 2253 <a class="indexterm" name="id402062"></a> 2251 2254 The setdriver command will fail if in Samba's mind the queue is not 2252 2255 already there. A successful installation displys the promising message that the: … … 2259 2262 result was NT_STATUS_UNSUCCESSFUL 2260 2263 </code></p><p> 2261 <a class="indexterm" name="id4 27836"></a>2262 <a class="indexterm" name="id4 27842"></a>2264 <a class="indexterm" name="id402091"></a> 2265 <a class="indexterm" name="id402098"></a> 2263 2266 It is not good enough that you can see the queue in CUPS, using the <code class="literal">lpstat -p ir85wm</code> 2264 2267 command. A bug in most recent versions of Samba prevents the proper update of the queue list. The recognition … … 2266 2269 if this is the reason why Samba does not execute the <code class="literal">setdriver</code> command successfully, check 2267 2270 if Samba “<span class="quote">sees</span>” the printer: 2268 <a class="indexterm" name="id4 27868"></a>2271 <a class="indexterm" name="id402124"></a> 2269 2272 </p><pre class="screen"> 2270 2273 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%xxxx' -c 'enumprinters 0'|grep ir85wm</code></strong> … … 2272 2275 </pre><p> 2273 2276 An alternate command could be this: 2274 <a class="indexterm" name="id4 27896"></a>2277 <a class="indexterm" name="id402152"></a> 2275 2278 </p><pre class="screen"> 2276 2279 <code class="prompt">root# </code><strong class="userinput"><code>rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' </code></strong> … … 2282 2285 </pre><p> 2283 2286 By the way, you can use these commands, plus a few more, of course, to install drivers on remote Windows NT print servers too! 2284 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 27930"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p>2285 <a class="indexterm" name="id4 27944"></a>2286 <a class="indexterm" name="id4 27950"></a>2287 <a class="indexterm" name="id4 27959"></a>2288 <a class="indexterm" name="id4 27968"></a>2289 <a class="indexterm" name="id4 27977"></a>2290 <a class="indexterm" name="id4 27986"></a>2291 <a class="indexterm" name="id4 27995"></a>2292 <a class="indexterm" name="id4 28004"></a>2293 <a class="indexterm" name="id4 28013"></a>2294 <a class="indexterm" name="id4 28022"></a>2295 <a class="indexterm" name="id4 28031"></a>2296 <a class="indexterm" name="id4 28040"></a>2297 <a class="indexterm" name="id4 28049"></a>2287 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id402186"></a>The Printing <code class="filename">*.tdb</code> Files</h2></div></div></div><p> 2288 <a class="indexterm" name="id402200"></a> 2289 <a class="indexterm" name="id402206"></a> 2290 <a class="indexterm" name="id402215"></a> 2291 <a class="indexterm" name="id402224"></a> 2292 <a class="indexterm" name="id402233"></a> 2293 <a class="indexterm" name="id402242"></a> 2294 <a class="indexterm" name="id402251"></a> 2295 <a class="indexterm" name="id402260"></a> 2296 <a class="indexterm" name="id402269"></a> 2297 <a class="indexterm" name="id402278"></a> 2298 <a class="indexterm" name="id402286"></a> 2299 <a class="indexterm" name="id402295"></a> 2300 <a class="indexterm" name="id402304"></a> 2298 2301 Some mystery is associated with the series of files with a tdb suffix appearing in every Samba installation. 2299 2302 They are <code class="filename">connections.tdb</code>, <code class="filename">printing.tdb</code>, … … 2302 2305 <code class="filename">messages.tdb</code> , <code class="filename">ntprinters.tdb</code>, <code class="filename">sessionid.tdb</code>, 2303 2306 and <code class="filename">secrets.tdb</code>. What is their purpose? 2304 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 28129"></a>Trivial Database Files</h3></div></div></div><p>2305 <a class="indexterm" name="id4 28137"></a>2307 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402385"></a>Trivial Database Files</h3></div></div></div><p> 2308 <a class="indexterm" name="id402393"></a> 2306 2309 A Windows NT (print) server keeps track of all information needed to serve its duty toward its clients by 2307 2310 storing entries in the Windows registry. Client queries are answered by reading from the registry, … … 2312 2315 <code class="filename">ntprinters.tdb</code>, <code class="filename">printing.tdb</code>,<code class="filename">ntforms.tdb</code>, and 2313 2316 <code class="filename">ntdrivers.tdb</code>. 2314 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 28191"></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="id402447"></a>Binary Format</h3></div></div></div><p> 2315 2318 <code class="filename">*.tdb</code> files are not human readable. They are written in a binary format. “<span class="quote">Why not 2316 2319 ASCII?</span>”, you may ask. “<span class="quote">After all, ASCII configuration files are a good and proven tradition on … … 2321 2324 <code class="filename">*.tdb</code> files allows for this provision. Many smbd processes may write to the same 2322 2325 <code class="filename">*.tdb</code> file at the same time. This wouldn't be possible with pure ASCII files. 2323 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 28252"></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="id402508"></a>Losing <code class="filename">*.tdb</code> Files</h3></div></div></div><p> 2324 2327 It is very important that all <code class="filename">*.tdb</code> files remain consistent over all write and read 2325 2328 accesses. However, it may happen that these files <span class="emphasis"><em>do</em></span> get corrupted. (A <code class="literal">kill -9 … … 2328 2331 only option. After that, you need to re-create all print-related setups unless you have made a backup of the 2329 2332 <code class="filename">*.tdb</code> files in time. 2330 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 28299"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p>2331 <a class="indexterm" name="id4 28311"></a>2332 <a class="indexterm" name="id4 28322"></a>2333 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402554"></a>Using <code class="literal">tdbbackup</code></h3></div></div></div><p> 2334 <a class="indexterm" name="id402567"></a> 2335 <a class="indexterm" name="id402578"></a> 2333 2336 Samba ships with a little utility that helps the root user of your system to backup your 2334 2337 <code class="filename">*.tdb</code> files. If you run it with no argument, it prints a usage message: … … 2357 2360 -rw------- 1 root root 40960 May 2 03:44 printing.tdb.bak 2358 2361 2359 </pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 28409"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p>2360 <a class="indexterm" name="id4 28417"></a>2362 </pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id402665"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div></div><p> 2363 <a class="indexterm" name="id402673"></a> 2361 2364 CUPS ships with good support for HP LaserJet-type printers. You can install the generic driver as follows: 2362 <a class="indexterm" name="id4 28425"></a>2365 <a class="indexterm" name="id402681"></a> 2363 2366 </p><pre class="screen"> 2364 2367 <code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd</code></strong> … … 2376 2379 <code class="literal">foomatic-rip</code> utility. 2377 2380 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 2378 <a class="indexterm" name="id4 28506"></a>2379 <a class="indexterm" name="id4 28513"></a>2380 <a class="indexterm" name="id4 28520"></a>2381 <a class="indexterm" name="id402762"></a> 2382 <a class="indexterm" name="id402768"></a> 2383 <a class="indexterm" name="id402775"></a> 2381 2384 The former <code class="literal">cupsomatic</code> concept is now being replaced by the new successor, a much more 2382 2385 powerful <code class="literal">foomatic-rip</code>. <code class="literal">cupsomatic</code> is no longer maintained. Here is the … … 2387 2390 are also intended to be used by Samba and the cupsaddsmb utility, to provide the driver files for the Windows 2388 2391 clients! 2389 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 28570"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p>2390 <a class="indexterm" name="id4 28577"></a>2391 <a class="indexterm" name="id4 28584"></a>2392 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id402825"></a>foomatic-rip and Foomatic Explained</h3></div></div></div><p> 2393 <a class="indexterm" name="id402833"></a> 2394 <a class="indexterm" name="id402840"></a> 2392 2395 Nowadays, 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 2393 2396 (which, by the way, works on all UNIXes and on Mac OS X and Darwin, too). The utilities from this sire have a … … 2400 2403 available 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 2401 2404 various models, and many models may be driven by different drivers its your choice! 2402 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 28630"></a>690 “<span class="quote">Perfect</span>” Printers</h4></div></div></div><p>2403 <a class="indexterm" name="id4 28641"></a>2405 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id402886"></a>690 “<span class="quote">Perfect</span>” Printers</h4></div></div></div><p> 2406 <a class="indexterm" name="id402897"></a> 2404 2407 At present, there are 690 devices dubbed as working perfectly: 181 are <span class="emphasis"><em>mostly</em></span> perfect, 96 2405 2408 are <span class="emphasis"><em>partially</em></span> perfect, and 46 are paperweights. Keeping in mind that most of these are … … 2409 2412 achievement! Three years ago the number was not more than 500, and Linux or UNIX printing at the time wasn't 2410 2413 anywhere near the quality it is today. 2411 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 28666"></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="id402922"></a>How the Printing HOWTO Started It All</h4></div></div></div><p> 2412 2415 A few years ago <a class="ulink" href="http://www2.picante.com/" target="_top">Grant Taylor</a> started it all. The 2413 2416 roots 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 … … 2418 2421 This database became the core component of today's Foomatic collection of tools and data. In the meantime, it 2419 2422 has moved to an XML representation of the data. 2420 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 28697"></a>Foomatic's Strange Name</h4></div></div></div><p>2421 <a class="indexterm" name="id4 28705"></a>2423 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id402952"></a>Foomatic's Strange Name</h4></div></div></div><p> 2424 <a class="indexterm" name="id402960"></a> 2422 2425 “<span class="quote">Why the funny name?</span>” you ask. When it really took off, around spring 2000, CUPS was far less 2423 2426 popular than today, and most systems used LPD, LPRng, or even PDQ to print. CUPS shipped with a few generic … … 2437 2440 printing was the only one available).</p></li><li><p>It gave all the advanced CUPS options (Web interface, 2438 2441 GUI driver configurations) to users wanting (or needing) to use 2439 Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 28763"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p>2440 <a class="indexterm" name="id4 28771"></a>2441 <a class="indexterm" name="id4 28778"></a>2442 <a class="indexterm" name="id4 28785"></a>2442 Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id403019"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div></div><p> 2443 <a class="indexterm" name="id403027"></a> 2444 <a class="indexterm" name="id403034"></a> 2445 <a class="indexterm" name="id403041"></a> 2443 2446 CUPS worked through a quickly hacked-up filter script named <a class="ulink" href="http://www.linuxprinting.org/download.cgi?filename=cupsomatic&show=0" target="_top">cupsomatic</a>. cupsomatic 2444 2447 ran the printfile through Ghostscript, constructing automatically the rather complicated command line needed. … … 2461 2464 structures attached to Linuxprinting.org PPDs for CUPS. It had a different “<span class="quote">*omatic</span>” script for 2462 2465 every spooler, as well as different printer configuration files. 2463 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 28901"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p>2464 <a class="indexterm" name="id4 28913"></a>2466 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id403157"></a>The <span class="emphasis"><em>Grand Unification</em></span> Achieved</h4></div></div></div><p> 2467 <a class="indexterm" name="id403168"></a> 2465 2468 This has all changed in Foomatic versions 2.9 (beta) and released as “<span class="quote">stable</span>” 3.0. It has now 2466 2469 achieved 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&show=0" target="_top">foomatic-rip</a>. … … 2471 2474 there is improved media type and source support paper sizes and trays are easier to configure. 2472 2475 </p><p> 2473 <a class="indexterm" name="id4 28942"></a>2474 <a class="indexterm" name="id4 28948"></a>2475 <a class="indexterm" name="id4 28955"></a>2476 <a class="indexterm" name="id403197"></a> 2477 <a class="indexterm" name="id403204"></a> 2478 <a class="indexterm" name="id403210"></a> 2476 2479 Also, the new generation of Linuxprinting.org PPDs no longer contains Perl data structures. If you are a 2477 2480 distro maintainer and have used the previous version of Foomatic, you may want to give the new one a spin, but … … 2480 2483 the steps</a> outlined in the Foomatic tutorial or in this chapter. This new development is truly amazing. 2481 2484 </p><p> 2482 <a class="indexterm" name="id4 28982"></a>2483 <a class="indexterm" name="id4 28989"></a>2484 <a class="indexterm" name="id4 28995"></a>2485 <a class="indexterm" name="id403237"></a> 2486 <a class="indexterm" name="id403244"></a> 2487 <a class="indexterm" name="id403251"></a> 2485 2488 foomatic-rip is a very clever wrapper around the need to run Ghostscript with a different syntax, options, 2486 2489 device selections, and/or filters for each different printer or spooler. At the same time, it can read the PPD … … 2490 2493 printing on media drawn from different paper trays within the same job (in both cases, even where there is no 2491 2494 support for this from Windows-based vendor printer drivers). 2492 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 29010"></a>Driver Development Outside</h4></div></div></div><p>2493 <a class="indexterm" name="id4 29018"></a>2495 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id403266"></a>Driver Development Outside</h4></div></div></div><p> 2496 <a class="indexterm" name="id403274"></a> 2494 2497 Most driver development itself does not happen within Linuxprinting.org. Drivers are written by independent 2495 2498 maintainers. Linuxprinting.org just pools all the information and stores it in its database. In addition, it … … 2499 2502 Speaking of the different driver development groups, most of the work is currently done in three projects: 2500 2503 </p><div class="itemizedlist"><ul type="disc"><li><p> 2501 <a class="indexterm" name="id4 29039"></a>2504 <a class="indexterm" name="id403294"></a> 2502 2505 <a class="ulink" href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">Omni</a> 2503 2506 a free software project by IBM that tries to convert its printer … … 2505 2508 universal driver architecture for Linux/UNIX (still beta). This 2506 2509 currently supports 437 models.</p></li><li><p> 2507 <a class="indexterm" name="id4 29061"></a>2510 <a class="indexterm" name="id403317"></a> 2508 2511 <a class="ulink" href="http://hpinkjet.sf.net/" target="_top">HPIJS</a> 2509 2512 a free software project by HP to provide the support for its own … … 2511 2514 provides true photo quality). This currently supports 369 2512 2515 models.</p></li><li><p> 2513 <a class="indexterm" name="id4 29082"></a>2514 <a class="ulink" href="http://gimp-print.s f.net/" target="_top">Gimp-Print</a> a free software2516 <a class="indexterm" name="id403338"></a> 2517 <a class="ulink" href="http://gimp-print.sourceforge.net/" target="_top">Gutenprint</a> a free software 2515 2518 effort, started by Michael Sweet (also lead developer for CUPS), now 2516 2519 directed by Robert Krawitz, which has achieved an amazing level of 2517 2520 photo print quality (many Epson users swear that its quality is 2518 2521 better than the vendor drivers provided by Epson for the Microsoft 2519 platforms). This currently supports 522 models.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 29104"></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="id403359"></a>Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX)</h4></div></div></div><p> 2520 2523 Linuxprinting.org today is the one-stop shop to download printer drivers. Look for printer information and 2521 2524 <a class="ulink" href="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/" target="_top">tutorials</a> or solve … … 2526 2529 forum</a> has turned out to be one of the most frequented forums after only a few weeks. 2527 2530 </p><p> 2528 <a class="indexterm" name="id4 29142"></a>2529 <a class="indexterm" name="id4 29149"></a>2530 <a class="indexterm" name="id4 29156"></a>2531 <a class="indexterm" name="id403398"></a> 2532 <a class="indexterm" name="id403405"></a> 2533 <a class="indexterm" name="id403411"></a> 2531 2534 Linuxprinting.org and the Foomatic driver wrappers around Ghostscript are now a standard tool-chain for 2532 2535 printing on all the important distros. Most of them also have CUPS underneath. While in recent years most … … 2537 2540 Till Kamppeter from Mandrakesoft is doing an excellent job in his spare time to maintain Linuxprinting.org and 2538 2541 Foomatic. So if you use it often, please send him a note showing your appreciation. 2539 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 29175"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p>2540 <a class="indexterm" name="id4 29183"></a>2541 <a class="indexterm" name="id4 29190"></a>2542 <a class="indexterm" name="id4 29196"></a>2543 <a class="indexterm" name="id4 29203"></a>2544 <a class="indexterm" name="id4 29210"></a>2545 <a class="indexterm" name="id4 29217"></a>2546 <a class="indexterm" name="id4 29224"></a>2547 <a class="indexterm" name="id4 29230"></a>2548 <a class="indexterm" name="id4 29237"></a>2542 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id403430"></a>Foomatic Database-Generated PPDs</h4></div></div></div><p> 2543 <a class="indexterm" name="id403438"></a> 2544 <a class="indexterm" name="id403445"></a> 2545 <a class="indexterm" name="id403452"></a> 2546 <a class="indexterm" name="id403459"></a> 2547 <a class="indexterm" name="id403466"></a> 2548 <a class="indexterm" name="id403472"></a> 2549 <a class="indexterm" name="id403479"></a> 2550 <a class="indexterm" name="id403486"></a> 2551 <a class="indexterm" name="id403493"></a> 2549 2552 The Foomatic database is an amazing piece of ingenuity in itself. Not only does it keep the printer and driver 2550 2553 information, but it is organized in a way that it can generate PPD files on the fly from its internal … … 2561 2564 developers. 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 2562 2565 this information to present the available settings to the user as an intuitive menu selection. 2563 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 29283"></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="id403538"></a>foomatic-rip and Foomatic PPD Download and Installation</h3></div></div></div><p> 2564 2567 Here are the steps to install a foomatic-rip-driven LaserJet 4 Plus-compatible 2565 2568 printer in CUPS (note that recent distributions of SuSE, UnitedLinux and … … 2654 2657 the driver/model) contain support for a certain device representing 2655 2658 the selected driver for your model (as shown by <code class="literal">gs -h</code>).</p></li><li><p>foomatic-rip needs a new version of PPDs (PPD versions 2656 produced for cupsomatic do not work with foomatic-rip).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 29705"></a>Page Accounting with CUPS</h2></div></div></div><p>2657 <a class="indexterm" name="id4 29713"></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="id403960"></a>Page Accounting with CUPS</h2></div></div></div><p> 2660 <a class="indexterm" name="id403968"></a> 2658 2661 Often there are questions regarding print quotas where Samba users (that is, Windows clients) should not be 2659 2662 able to print beyond a certain number of pages or data volume per day, week, or month. This feature is … … 2663 2666 Of course one could hack things with one's own scripts. But then there is CUPS. CUPS supports quotas that can 2664 2667 be based on the size of jobs or on the number of pages or both, and can span any time period you want. 2665 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 29735"></a>Setting Up Quotas</h3></div></div></div><p>2666 <a class="indexterm" name="id4 29742"></a>2668 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id403990"></a>Setting Up Quotas</h3></div></div></div><p> 2669 <a class="indexterm" name="id403998"></a> 2667 2670 This is an example command of how root would set a print quota in CUPS, assuming an existing printer named 2668 2671 “<span class="quote">quotaprinter</span>”: 2669 <a class="indexterm" name="id4 29756"></a>2672 <a class="indexterm" name="id404012"></a> 2670 2673 </p><pre class="screen"> 2671 2674 <code class="prompt">root# </code><strong class="userinput"><code>lpadmin -p quotaprinter -o job-quota-period=604800 \ … … 2674 2677 This would limit every single user to print no more than 100 pages or 1024 KB of 2675 2678 data (whichever comes first) within the last 604,800 seconds ( = 1 week). 2676 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 29785"></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="id404041"></a>Correct and Incorrect Accounting</h3></div></div></div><p> 2677 2680 For CUPS to count correctly, the printfile needs to pass the CUPS pstops filter; otherwise it uses a dummy 2678 2681 count of “<span class="quote">one</span>”. Some print files do not pass it (e.g., image files), but then those are mostly … … 2685 2688 to a print-ready format for the target printer. This is currently working for about a thousand different 2686 2689 printer models. Linuxprinting.org has a driver <a class="ulink" href="http://www.linuxprinting.org/printer_list.cgi" target="_top">list</a>. 2687 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 29818"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p>2688 <a class="indexterm" name="id4 29826"></a>2689 <a class="indexterm" name="id4 29833"></a>2690 <a class="indexterm" name="id4 29840"></a>2691 <a class="indexterm" name="id4 29846"></a>2692 <a class="indexterm" name="id4 29853"></a>2690 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404074"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div></div><p> 2691 <a class="indexterm" name="id404082"></a> 2692 <a class="indexterm" name="id404089"></a> 2693 <a class="indexterm" name="id404095"></a> 2694 <a class="indexterm" name="id404102"></a> 2695 <a class="indexterm" name="id404109"></a> 2693 2696 Before CUPS 1.1.16, your only option was to use the Adobe PostScript driver on the Windows clients. The output 2694 2697 of this driver was not always passed through the <code class="literal">pstops</code> filter on the CUPS/Samba side, and … … 2701 2704 <code class="filename">cups-samba-1.1.16.tar.gz</code> package). It does <span class="emphasis"><em>not</em></span> work for Windows 2702 2705 9x/Me clients, but it guarantees: 2703 </p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id4 29908"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the2706 </p><div class="itemizedlist"><ul type="disc"><li><p> <a class="indexterm" name="id404164"></a> To not write a PJL-header.</p></li><li><p>To still read and support all PJL-options named in the 2704 2707 driver PPD with its own means.</p></li><li><p>That the file will pass through the <code class="literal">pstops</code> filter 2705 2708 on the CUPS/Samba server.</p></li><li><p>To page-count correctly the print file.</p></li></ul></div><p> 2706 2709 You can read more about the setup of this combination in the man page for <code class="literal">cupsaddsmb</code> (which 2707 2710 is only present with CUPS installed, and only current from CUPS 1.1.16). 2708 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 29949"></a>The page_log File Syntax</h3></div></div></div><p>2709 <a class="indexterm" name="id4 29957"></a>2711 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404205"></a>The page_log File Syntax</h3></div></div></div><p> 2712 <a class="indexterm" name="id404213"></a> 2710 2713 These are the items CUPS logs in the <code class="filename">page_log</code> for every page of a job: 2711 2714 </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> … … 2725 2728 from IP address <code class="constant">10.160.51.33</code>, printed from one page 440 copies, and 2726 2729 is set to be billed to <em class="parameter"><code>finance-dep</code></em>. 2727 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30085"></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="id404341"></a>Possible Shortcomings</h3></div></div></div><p> 2728 2731 What flaws or shortcomings are there with this quota system? 2729 2732 </p><div class="itemizedlist"><ul type="disc"><li><p>The ones named above (wrongly logged job in case of … … 2739 2742 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 2740 2743 does not get a meaningful error message from CUPS other than 2741 “<span class="quote">client-error-not-possible</span>”.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30143"></a>Future Developments</h3></div></div></div><p>2744 “<span class="quote">client-error-not-possible</span>”.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404399"></a>Future Developments</h3></div></div></div><p> 2742 2745 This is the best system currently available, and there are huge 2743 2746 improvements under development for CUPS 1.2: … … 2747 2750 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 2748 2751 about their accounts in advance.</p></li><li><p>Probably there will be support for some other tools 2749 around this topic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30178"></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="id404434"></a>Other Accounting Tools</h3></div></div></div><p> 2750 2753 Other accounting tools that can be used includes: PrintAnalyzer, pyKota, printbill, LogReport. 2751 2754 For more information regarding these tools you can try a Google search. 2752 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 30191"></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="id404447"></a>Additional Material</h2></div></div></div><p> 2753 2756 A printer queue with <span class="emphasis"><em>no</em></span> PPD associated to it is a 2754 2757 “<span class="quote">raw</span>” printer, and all files will go directly there as received by the … … 2829 2832 to load the proper paper type before running the 10,000 page job 2830 2833 requested by marketing for the mailing, and so on). 2831 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 30379"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p>2832 <a class="indexterm" name="id4 30387"></a>2833 <a class="indexterm" name="id4 30394"></a>2834 <a class="indexterm" name="id4 30401"></a>2834 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id404635"></a>Autodeletion or Preservation of CUPS Spool Files</h2></div></div></div><p> 2835 <a class="indexterm" name="id404643"></a> 2836 <a class="indexterm" name="id404650"></a> 2837 <a class="indexterm" name="id404656"></a> 2835 2838 Samba print files pass through two spool directories. One is the incoming directory managed by Samba (set in 2836 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 2837 2840 CUPS it is normally <code class="filename">/var/spool/cups/</code>, as set by the <code class="filename">cupsd.conf</code> 2838 2841 directive <code class="filename">RequestRoot /var/spool/cups</code>. 2839 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30451"></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="id404706"></a>CUPS Configuration Settings Explained</h3></div></div></div><p> 2840 2843 Some important parameter settings in the CUPS configuration file 2841 2844 <code class="filename">cupsd.conf</code> are: … … 2861 2864 (There are also additional settings for <em class="parameter"><code>MaxJobsPerUser</code></em> and 2862 2865 <em class="parameter"><code>MaxJobsPerPrinter</code></em>.) 2863 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30528"></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="id404783"></a>Preconditions</h3></div></div></div><p> 2864 2867 For everything to work as it should, you need to have three things: 2865 2868 </p><div class="itemizedlist"><ul type="disc"><li><p>A Samba smbd that is compiled against <code class="filename">libcups</code> (check … … 2874 2877 <a class="link" href="smb.conf.5.html#LPRESUMECOMMAND">lpresume command</a>) are ignored, and they should normally have no 2875 2878 influence whatsoever on your printing. 2876 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 30657"></a>Manual Configuration</h3></div></div></div><p>2879 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id404913"></a>Manual Configuration</h3></div></div></div><p> 2877 2880 If you want to do things manually, replace the <a class="link" href="smb.conf.5.html#PRINTING">printing = cups</a> 2878 2881 by <a class="link" href="smb.conf.5.html#PRINTING">printing = bsd</a>. Then your manually set commands may work 2879 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> 2880 2883 may do what you need. 2881 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 30701"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p>2882 <a class="indexterm" name="id4 30709"></a>2883 <a class="indexterm" name="id4 30715"></a>2884 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id404956"></a>Printing from CUPS to Windows-Attached Printers</h2></div></div></div><p> 2885 <a class="indexterm" name="id404964"></a> 2886 <a class="indexterm" name="id404971"></a> 2884 2887 From time to time the question arises, how can you print <span class="emphasis"><em>to</em></span> a Windows-attached printer 2885 2888 <span class="emphasis"><em>from</em></span> Samba? Normally the local connection from Windows host to printer would be done by … … 2916 2919 <code class="prompt">root# </code><strong class="userinput"><code>ln -s `which smbspool` /usr/lib/cups/backend/smb</code></strong> 2917 2920 </pre><p> 2918 <a class="indexterm" name="id4 30824"></a>2919 <a class="indexterm" name="id4 30831"></a>2921 <a class="indexterm" name="id405079"></a> 2922 <a class="indexterm" name="id405086"></a> 2920 2923 <code class="literal">smbspool</code> was written by Mike Sweet from the CUPS folks. It is included and ships with 2921 2924 Samba. It may also be used with print subsystems other than CUPS, to spool jobs to Windows printer shares. To … … 2932 2935 -P /path/to/PPD</code></strong> 2933 2936 </pre><p> 2934 <a class="indexterm" name="id4 30883"></a>2935 <a class="indexterm" name="id4 30890"></a>2936 <a class="indexterm" name="id4 30897"></a>2937 <a class="indexterm" name="id405139"></a> 2938 <a class="indexterm" name="id405146"></a> 2939 <a class="indexterm" name="id405152"></a> 2937 2940 The PPD must be able to direct CUPS to generate the print data for the target model. For PostScript printers, 2938 2941 just use the PPD that would be used with the Windows NT PostScript driver. But what can you do if the printer … … 2947 2950 feature of CUPS and you do not necessarily need to have smbd running. 2948 2951 2949 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 30957"></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="id405213"></a>More CUPS Filtering Chains</h2></div></div></div><p> 2950 2953 The 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 2951 2954 cupsomatic</a> show how CUPS handles print jobs. 2952 </p><div class="figure"><a name="cups1"></a><p class="title"><b>Figure 22.17. Filtering Chain 1.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups1.png" alt="Filtering Chain 1."></div></div></div><br class="figure-break"><div class="figure"><a name="cups2"></a><p class="title"><b>Figure 22.18. Filtering Chain with cupsomatic</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/cups2.png" width="243" alt="Filtering Chain with cupsomatic"></div></div></div><br class="figure-break"></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 31066"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id431072"></a>Windows 9x/Me Client Can't Install Driver</h3></div></div></div><p>For Windows 9x/Me, clients require the printer names to be eight2955 </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="id405322"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405327"></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 2953 2956 characters (or “<span class="quote">8 plus 3 chars suffix</span>”) max; otherwise, the driver files 2954 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>“<span class="quote">cupsaddsmb</span>” 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 … … 2961 2964 If the error is “<span class="quote">Tree connect failed: NT_STATUS_BAD_NETWORK_NAME</span>”, 2962 2965 you may have forgotten to create the <code class="filename">/etc/samba/drivers</code> directory. 2963 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31141"></a>“<span class="quote">cupsaddsmb</span>” or “<span class="quote">rpcclient addriver</span>” 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="id405397"></a>“<span class="quote">cupsaddsmb</span>” or “<span class="quote">rpcclient addriver</span>” Emit Error</h3></div></div></div><p> 2964 2967 If <code class="literal">cupsaddsmb</code>, or <code class="literal">rpcclient addriver</code> emit the error message 2965 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>. 2966 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31178"></a>“<span class="quote">cupsaddsmb</span>” Errors</h3></div></div></div><p>2969 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405434"></a>“<span class="quote">cupsaddsmb</span>” Errors</h3></div></div></div><p> 2967 2970 The use of “<span class="quote">cupsaddsmb</span>” gives “<span class="quote">No PPD file for printer...</span>” 2968 2971 message while PPD file is present. What might the problem be? … … 2975 2978 </p><p>Is your <em class="parameter"><code>TempDir</code></em> directive in 2976 2979 <code class="filename">cupsd.conf</code> set to a valid value, and is it writable? 2977 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31248"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user2980 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405504"></a>Client Can't Connect to Samba Printer</h3></div></div></div><p>Use <code class="literal">smbstatus</code> to check which user 2978 2981 you are from Samba's point of view. Do you have the privileges to 2979 2982 write into the <em class="parameter"><code>[print$]</code></em> 2980 share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31271"></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="id405527"></a>New Account Reconnection from Windows 200x/XP Troubles</h3></div></div></div><p> 2981 2984 Once you are connected as the wrong user (for example, as <code class="constant">nobody</code>, which often occurs if 2982 2985 you have <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>), Windows Explorer will not accept an … … 2993 2996 the <span class="guilabel">Network Neighborhood</span>), right-click on the printer in question, and select 2994 2997 <span class="guibutton">Connect....</span>. 2995 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31352"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p>2996 <a class="indexterm" name="id4 31360"></a>2998 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405607"></a>Avoid Being Connected to the Samba Server as the Wrong User</h3></div></div></div><p> 2999 <a class="indexterm" name="id405616"></a> 2997 3000 You see per <code class="literal">smbstatus</code> that you are connected as user nobody, but you want to be root or 2998 3001 printer admin. This is probably due to <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest = bad user</a>, which 2999 3002 silently connected you under the guest account when you gave (maybe by accident) an incorrect username. Remove 3000 3003 <a class="link" href="smb.conf.5.html#MAPTOGUEST">map to guest</a> if you want to prevent this. 3001 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31398"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p>3004 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405654"></a>Upgrading to CUPS Drivers from Adobe Drivers</h3></div></div></div><p> 3002 3005 This information came from a mailing list posting regarding problems experienced when 3003 3006 upgrading from Adobe drivers to CUPS drivers on Microsoft Windows NT/200x/XP clients. 3004 3007 </p><p>First delete all old Adobe-using printers. Then delete all old Adobe drivers. (On Windows 200x/XP, right-click in 3005 3008 the background of <span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties...</span>, select 3006 tab <span class="guilabel">Drivers</span>, and delete here).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31432"></a>Can't Use “<span class="quote">cupsaddsmb</span>” on Samba Server, Which Is a PDC</h3></div></div></div><p>Do you use the “<span class="quote">naked</span>” root user name? Try to do it3009 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="id405688"></a>Can't Use “<span class="quote">cupsaddsmb</span>” on Samba Server, Which Is a PDC</h3></div></div></div><p>Do you use the “<span class="quote">naked</span>” root user name? Try to do it 3007 3010 this way: <strong class="userinput"><code>cupsaddsmb -U <em class="replaceable"><code>DOMAINNAME</code></em>\\root -v 3008 3011 <em class="replaceable"><code>printername</code></em></code></strong>> (note the two backslashes: the first one is 3009 required to “<span class="quote">escape</span>” the second one).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31467"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the3012 required to “<span class="quote">escape</span>” the second one).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405722"></a>Deleted Windows 200x Printer Driver Is Still Shown</h3></div></div></div><p>Deleting a printer on the client will not delete the 3010 3013 driver too (to verify, right-click on the white background of the 3011 3014 <span class="guilabel">Printers</span> folder, select <span class="guimenuitem">Server Properties</span> and click on the … … 3013 3016 install a printer with the same name. If you want to update to a new 3014 3017 driver, delete the old ones first. Deletion is only possible if no 3015 other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31498"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id431504"></a><a class="indexterm" name="id431510"></a><p>Local security policies may not allow the installation of unsigned drivers “<span class="quote">local3016 security policies</span>” 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="id4 31529"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p>3017 <a class="indexterm" name="id4 31537"></a>3018 <a class="indexterm" name="id4 31544"></a>3018 other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405753"></a>Windows 200x/XP Local Security Policies</h3></div></div></div><a class="indexterm" name="id405759"></a><a class="indexterm" name="id405766"></a><p>Local security policies may not allow the installation of unsigned drivers “<span class="quote">local 3019 security policies</span>” 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="id405784"></a>Administrator Cannot Install Printers for All Local Users</h3></div></div></div><p> 3020 <a class="indexterm" name="id405792"></a> 3021 <a class="indexterm" name="id405799"></a> 3019 3022 Windows XP handles SMB printers on a “<span class="quote">per-user</span>” basis. 3020 3023 This means every user needs to install the printer himself or herself. To have a printer available for … … 3022 3025 path of <em class="parameter"><code>http://cupsserver:631/printers/printername</code></em>. We're still looking into this one. 3023 3026 Maybe a logon script could automatically install printers for all users. 3024 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31566"></a>Print Change, Notify Functions on NT Clients</h3></div></div></div><p>For print change, notify functions on NT++ clients. These need to run the <code class="literal">Server</code>3025 service first (renamed to <code class="literal">File & 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="id4 31589"></a>Win XP-SP1</h3></div></div></div><p>Win XP-SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to3027 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405821"></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 & 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="id405845"></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 3026 3029 “<span class="quote">Administrator</span>” or “<span class="quote">Power User</span>” groups of users). In Group Policy Object Editor, go 3027 3030 to <span class="guimenu">User Configuration -> Administrative Templates -> Control Panel -> Printers</span>. The policy … … 3030 3033 <code class="constant">Users can only Point and Print to these servers</code> to make driver downloads from Samba 3031 3034 possible. 3032 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31631"></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 three3035 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id405887"></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 3033 3036 different ways to bring you to a dialog that <span class="emphasis"><em>seems</em></span> to set everything. All three dialogs 3034 3037 <span class="emphasis"><em>look</em></span> the same, yet only one of them does what you intend. You need to be Administrator or 3035 Print Administrator to do this for all users. Here is how I do i non XP:3038 Print Administrator to do this for all users. Here is how I do it on XP: 3036 3039 </p><div class="orderedlist"><ol type="A"><li><p>The first wrong way: 3037 3040 … … 3063 3066 driver (the clients can later set their own <span class="emphasis"><em>per-user defaults</em></span> by following the procedures 3064 3067 <span class="emphasis"><em>A</em></span> or <span class="emphasis"><em>B</em></span>). 3065 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31898"></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="id406154"></a>Most Common Blunders in Driver Settings on Windows Clients</h3></div></div></div><p> 3066 3069 Don't use <em class="parameter"><code>Optimize for Speed</code></em>, but use <em class="parameter"><code>Optimize for Portability</code></em> 3067 3070 instead (Adobe PS Driver). Don't use <em class="parameter"><code>Page Independence: No</code></em>. Always settle with … … 3070 3073 Driver). For <span class="guilabel">TrueType Download Options</span> choose <code class="constant">Outline</code>. Use 3071 3074 PostScript Level 2 if you are having trouble with a non-PS printer and if there is a choice. 3072 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31951"></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="id406206"></a><code class="literal">cupsaddsmb</code> Does Not Work with Newly Installed Printer</h3></div></div></div><p> 3073 3076 Symptom: The last command of <code class="literal">cupsaddsmb</code> does not complete successfully. If the <code class="literal">cmd 3074 3077 = setdriver printername printername</code> result was NT_STATUS_UNSUCCESSFUL, then possibly the printer was … … 3076 3079 hostname -c `enumprinters'</code>? Restart smbd (or send a <code class="literal">kill -HUP</code> to all processes 3077 3080 listed by <code class="literal">smbstatus</code>, and try again. 3078 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 31997"></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="id406252"></a>Permissions on <code class="filename">/var/spool/samba/</code> Get Reset After Each Reboot</h3></div></div></div><p> 3079 3082 Have you ever by accident set the CUPS spool directory to the same location (<em class="parameter"><code>RequestRoot 3080 3083 /var/spool/samba/</code></em> in <code class="filename">cupsd.conf</code> or the other way round: … … 3083 3086 /var/spool/samba</a> in the <em class="parameter"><code>[printers]</code></em> section of <code class="filename">smb.conf</code>. Otherwise, 3084 3087 cupsd will sanitize permissions to its spool directory with each restart and printing will not work reliably. 3085 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 32090"></a>Print Queue Called “<span class="quote">lp</span>” 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="id406346"></a>Print Queue Called “<span class="quote">lp</span>” Mishandles Print Jobs</h3></div></div></div><p> 3086 3089 In this case a print queue called “<span class="quote">lp</span>” intermittently swallows jobs and 3087 3090 spits out completely different ones from what was sent. 3088 3091 </p><p> 3089 <a class="indexterm" name="id4 32109"></a>3090 <a class="indexterm" name="id4 32115"></a>3091 <a class="indexterm" name="id4 32122"></a>3092 <a class="indexterm" name="id406364"></a> 3093 <a class="indexterm" name="id406371"></a> 3094 <a class="indexterm" name="id406378"></a> 3092 3095 It is a bad idea to name any printer “<span class="quote">lp</span>”. This is the traditional UNIX name for the default 3093 3096 printer. CUPS may be set up to do an automatic creation of Implicit Classes. This means, to group all printers … … 3098 3101 <em class="replaceable"><code>printername@cupshost</code></em>, which gives you better control over what may happen in a 3099 3102 large networked environment. 3100 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 32153"></a>Location of Adobe PostScript Driver Files for “<span class="quote">cupsaddsmb</span>”</h3></div></div></div><p>3103 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id406408"></a>Location of Adobe PostScript Driver Files for “<span class="quote">cupsaddsmb</span>”</h3></div></div></div><p> 3101 3104 Use <code class="literal">smbclient</code> to connect to any Windows box with a shared PostScript printer: 3102 3105 <code class="literal">smbclient //windowsbox/print\$ -U guest</code>. You can navigate to the … … 3104 3107 <code class="filename">WIN40/0</code> to do the same. Another option is to download the <code class="filename">*.exe</code> 3105 3108 packaged files from the Adobe Web site. 3106 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 32204"></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="id406459"></a>Overview of the CUPS Printing Processes</h2></div></div></div><p> 3107 3110 A 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 3108 3111 Printing Overview diagram</a>. 3109 </p><div class="figure"><a name="a_small"></a><p class="title"><b>Figure 22.19. CUPS Printing Overview.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/a_small.png" width="243" alt="CUPS Printing Overview."></div></div></div><br class="figure-break"></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id 422411" href="#id422411" class="para">6</a>] </sup>See also <a class="ulink" href="http://www.cups.org/cups-help.html" target="_top">http://www.cups.org/cups-help.html</a></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="classicalprinting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. Classical Printing Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. Stackable VFS modules</td></tr></table></div></body></html>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.id396679" href="#id396679" 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.