<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content="HTML Tidy, see www.w3.org"> <title>IFHP-HOWTO</title> <meta name="GENERATOR" content= "Modular DocBook HTML Stylesheet Version 1.54"> </head> <body class="BOOK" bgcolor="#FFFFFF" text="#000000" link= "#0000FF" vlink="#840084" alink="#0000FF"> <div class="BOOK"> <a name="AEN1"></a> <div class="TITLEPAGE"> <h1 class="TITLE"><a name="AEN2">IFHP-HOWTO</a></h1> <h2 class="SUBTITLE">19 Aug 2000 (For ifhp-3.3.21)</h2> <h3 class="AUTHOR"><a name="AEN5">Patrick A Powell</a></h3> <div class="AFFILIATION"> <div class="ADDRESS"> <p class="ADDRESS">papowell@astart.com<br> AStArt Technologies addr<br> 9475 Chesapeake Dr, Suite D,<br> San Diego, CA 92123<br> Phone 858-874-6543<br> Fax 858-279-8424</p> </div> </div> <p class="COPYRIGHT">Copyright © 1996, 1997, 1998, 1999, 2000 by <span class="HOLDER">Patrick Powell</span></p> <div> <div class="ABSTRACT"> <p>The <b class="APPLICATION">ifhp</b> program is an enhanced, extended, highly configurable, and portable implementation of a print filter for use with the <b class="APPLICATION">LPRng</b> Print spooler package. <tt class="LITERAL"><b class="APPLICATION"> ifhp</b></tt> supports network, serial, and parallel printers, does page accounting and job recovery, and allows an extremely high level of configuration and tuning. <tt class="LITERAL"><b class="APPLICATION"> ifhp</b></tt> gets its flexibility by using a configuration file to set its operational characteristics. The configuration file can contain multiple separate printer configurations and the configuration selection is done by a very simple command line option. The filter supports text, PostScript, PCL, and PJL printers, and can be configured to handle a wide range of printer quirks and mis-implementations.</p> </div> </div> <div class="LEGALNOTICE"> <div class="IMPORTANT"> <blockquote class="IMPORTANT"> <p><b>Important:</b> THIS DOCUMENTATION AND THE DESCRIBED SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> </blockquote> </div> </div> <hr> </div> <div class="TOC"> <dl> <dt><b>Table of Contents</b></dt> <dt><a href="#AEN33">Preface</a></dt> <dd> <dl> <dt>1. <a href="#AEN35">Introduction</a></dt> <dt>2. <a href="#AEN42">Acknowledgements</a></dt> <dt>3. <a href="#AEN47">Shell Prompts</a></dt> <dt>4. <a href="#AEN66">Typographic Conventions</a></dt> <dt>5. <a href="#AEN115">Notes, warnings, and examples</a></dt> </dl> </dd> <dt>1. <a href="#AEN124">Introduction</a></dt> <dd> <dl> <dt>1.1. <a href="#AEN157">Copyright and Disclaimer</a></dt> <dt>1.2. <a href="#AEN165">Commercial Support</a></dt> <dt>1.3. <a href="#AEN171">Web Site</a></dt> <dt>1.4. <a href="#SECFTP">FTP Sites</a></dt> <dt>1.5. <a href="#AEN203">Mailing List</a></dt> <dt>1.6. <a href="#AEN210">PGP Public Key</a></dt> </dl> </dd> <dt>2. <a href="#AEN217">Software Installation and Configuration</a></dt> <dd> <dl> <dt>2.1. <a href="#AEN229">Additional Recommended Software</a></dt> <dt>2.2. <a href="#AEN298">Installation</a></dt> <dt>2.3. <a href="#MODELSELECTION">Printer Models Supported</a></dt> </dl> </dd> <dt>3. <a href="#AEN1467">Recommended -Z options for Users</a></dt> <dd> <dl> <dt>3.1. <a href="#AEN1472">Input Tray Selection</a></dt> <dt>3.2. <a href="#AEN1491">Output Bin Selection</a></dt> <dt>3.3. <a href="#AEN1509">Media Size (Paper) Selection</a></dt> <dt>3.4. <a href="#AEN1531">Media Type Selection</a></dt> <dt>3.5. <a href="#AEN1543">Duplex and Simplex</a></dt> <dt>3.6. <a href="#AEN1573">Copies</a></dt> </dl> </dd> <dt>4. <a href="#AEN1584">Printer Capabilities, Configurations, and Printcaps</a></dt> <dd> <dl> <dt>4.1. <a href="#AEN1588">Printer Configurations</a></dt> <dt>4.2. <a href="#NETWORKPROTOCOLS">Network Communication Protocols</a></dt> <dt>4.3. <a href="#RFC1179PC">RFC1179 (BSD or TCP/IP) Job Transfer Printcap Entry</a></dt> <dt>4.4. <a href="#SOCKETPC">Socket Protocol (TCP/IP) Operation Printcap Entry</a></dt> <dt>4.5. <a href="#APPSOCKETPC">Appsocket Protocol (TCP/IP) Operation Printcap Entry</a></dt> <dt>4.6. <a href="#AEN1781">Common Print Server Boxes Configuration Information</a></dt> <dt>4.7. <a href="#AEN1942">Timeout Problems Sending A Job</a></dt> <dt>4.8. <a href="#AEN1959">PS, PCL, PJL Printer with TPC/IP Network Interface</a></dt> <dt>4.9. <a href="#AEN1980">PS, PCL, PJL Printer with Parallel Port Connection</a></dt> <dt>4.10. <a href="#AEN1993">PS, PCL, PJL Printer with Serial Port</a></dt> <dt>4.11. <a href="#PSONLY">PostScript Only Printer</a></dt> <dt>4.12. <a href="#AEN2027">GhostScript</a></dt> <dt>4.13. <a href="#PHASER">Tektronics Phaser, QMS, and Appsocket Protocol</a></dt> </dl> </dd> <dt>5. <a href="#OPTIONS">Options and Arguments</a></dt> <dd> <dl> <dt>5.1. <a href="#AEN2064">Command Line Options</a></dt> <dt>5.2. <a href="#CONFIG">General Configuration Options - config, trace, debug</a></dt> <dt>5.3. <a href="#STATUSFILE">Status Messages</a></dt> <dt>5.4. <a href="#STATUS">Printer Status Available - status</a></dt> <dt>5.5. <a href="#AEN2202">Monitoring Options - sync, waitend, pagecount</a></dt> <dt>5.6. <a href="#AEN2239">User -Z Option Support</a></dt> <dt>5.7. <a href="#AEN2370">Adding User Options</a></dt> <dt>5.8. <a href="#AEN2383">Initialization and Setup Control</a></dt> </dl> </dd> <dt>6. <a href="#AEN2413">Configuration File</a></dt> <dd> <dl> <dt>6.1. <a href="#AEN2418">Configuration File Entries</a></dt> <dt>6.2. <a href="#AEN2426">Comments</a></dt> <dt>6.3. <a href="#AEN2432">Option Setting</a></dt> <dt>6.4. <a href="#AEN2456">Option Use</a></dt> <dt>6.5. <a href="#AEN2461">List Expansion</a></dt> <dt>6.6. <a href="#STRINGESCAPE">String Escape Sequences</a></dt> <dt>6.7. <a href="#AEN2580">Language Context and Value Expansion</a></dt> <dd> <dl> <dt>6.7.1. <a href="#AEN2587">PJL Language</a></dt> <dt>6.7.2. <a href="#AEN2622">PCL Language</a></dt> <dt>6.7.3. <a href="#AEN2637">PostScript Language</a></dt> </dl> </dd> <dt>6.8. <a href="#AEN2649">Printer Entries</a></dt> <dt>6.9. <a href="#AEN2667">Include Facility</a></dt> <dt>6.10. <a href="#AEN2671">tc Entry Inclusion Facility</a></dt> </dl> </dd> <dt>7. <a href="#DETAILS">Filter Operation Details</a></dt> <dd> <dl> <dt>7.1. <a href="#AEN2689">Filter Pseudo-Code</a></dt> <dt>7.2. <a href="#SETUP">Options, Initialization and Setup</a></dt> <dt>7.3. <a href="#LANGUAGES">Languages Supported- pjl, pcl, ps, and text</a></dt> <dd> <dl> <dt>7.3.1. <a href="#PJL-JOB">pjl_job FLAG</a></dt> <dt>7.3.2. <a href="#PJL-ENTER">pjl_enter FLAG</a></dt> <dt>7.3.3. <a href="#NULLPAD">nullpad STRING</a></dt> <dt>7.3.4. <a href="#PJL-CONSOLE">pjl_console FLAG</a></dt> <dt>7.3.5. <a href="#REMOVE-CTRL">remove_ctrl STRING</a></dt> <dt>7.3.6. <a href="#TBCP">tbcp FLAG</a></dt> </dl> </dd> <dt>7.4. <a href="#SYNCPAGE">Synchronization and Pagecounts</a></dt> <dt>7.5. <a href="#PJLINIT">PJL Initialization</a></dt> <dt>7.6. <a href="#FILECONVERSION">File Conversion Support</a></dt> <dd> <dl> <dt>7.6.1. <a href="#FILE-UTIL-PATH">File Type Detection</a></dt> <dt>7.6.2. <a href="#CONVERSION"> Conversion</a></dt> <dt>7.6.3. <a href="#CRLF">LF to CR/LF Conversion</a></dt> <dt>7.6.4. <a href="#AEN3212">Text Treated Like PCL</a></dt> <dt>7.6.5. <a href="#AEN3218">Default to Passthrough</a></dt> </dl> </dd> <dt>7.7. <a href="#GHOSTSCRIPTCONFIG">GhostScript Printer</a></dt> <dt>7.8. <a href="#LANGUAGEINIT">Language Specific Initialization</a></dt> <dt>7.9. <a href="#FILETRANSFER">File Transfer and Error Status Monitoring</a></dt> <dt>7.10. <a href="#WAITEND">End of Job</a></dt> <dt>7.11. <a href="#APPSOCKET">Tektronix Phaser, QMS and AppSocket Support</a></dt> </dl> </dd> <dt>8. <a href="#AEN3361">Banners and OF Mode Operation</a></dt> <dd> <dl> <dt>8.1. <a href="#AEN3381">No Banner</a></dt> <dt>8.2. <a href="#AEN3389">Banner Printing and No OF Filter</a></dt> <dt>8.3. <a href="#AEN3399">Banner Printing With OF Filter</a></dt> <dt>8.4. <a href="#AEN3413"><b class="APPLICATION"> LPRng</b> Options Controlling Banner Printing</a></dt> <dt>8.5. <a href="#OFOPTIONS">of_options option</a></dt> </dl> </dd> <dt>9. <a href="#AEN3444">Font Download Support</a></dt> <dd> <dl> <dt>9.1. <a href="#AEN3450">PCL Font Downloading</a></dt> <dt>9.2. <a href="#AEN3476">PS Font Downloading</a></dt> <dt>9.3. <a href="#AEN3486">PJL File Downloading</a></dt> </dl> </dd> <dt>10. <a href="#AEN3495">Debugging and Problem Solving</a></dt> <dt>A. <a href="#IFHPOPTIONS">Index to Options</a></dt> <dt>B. <a href="#AEN3873">HP JetDirect Card Support</a></dt> <dd> <dl> <dt>B.1. <a href="#AEN3876">MicroSoft JetDirect Support</a></dt> <dt>B.2. <a href="#AEN3879">TCP/IP Address</a></dt> <dt>B.3. <a href="#AEN3884">Web Server Configuration</a></dt> <dt>B.4. <a href="#AEN3888">Telnet Configuration</a></dt> <dt>B.5. <a href="#AEN3895">BOOTP Information</a></dt> <dt>B.6. <a href="#AEN3903">Timeouts</a></dt> </dl> </dd> </dl> </div> <div class="LOT"> <dl class="LOT"> <dt><b>List of Tables</b></dt> <dt>2-1. <a href="#AEN303">Configure File Location Variables</a></dt> <dt>2-2. <a href="#AEN375">Executable and Configuration File Locations</a></dt> <dt>2-3. <a href="#CONFIGENTRIES"><tt class="LITERAL"> ifhp.conf</tt> Configuration Entries</a></dt> <dt>4-1. <a href="#NETWORKPRINTSERVERS">Network Print Servers</a></dt> <dt>A-1. <a href="#IFHPOPTIONSTABLE"><tt class="LITERAL"> ifhp.conf</tt> - <b class="APPLICATION">ifhp</b> Options</a></dt> </dl> </div> <div class="PREFACE"> <hr> <h1><a name="AEN33">Preface</a></h1> <div class="SECT1"> <h1 class="SECT1"><a name="AEN35">1. Introduction</a></h1> <p>The <b class="APPLICATION">ifhp</b> Print Filter is the primary print filter for the <b class="APPLICATION"> LPRng</b> Print Spooler. This document is designed to be the single basic reference for the <b class= "APPLICATION">ifhp</b> software; the <b class= "APPLICATION">LPRng</b> software is distributed separately and has additional documentation.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN42">2. Acknowledgements</a></h1> <p>I would like to thank all of the <b class= "APPLICATION">LPRng</b> users who so relentlessly tried the incredible number of permutations and combinations of printers and software, and whose requests for <i class= "EMPHASIS">just one more feature</i> led to the development of the software.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN47">3. Shell Prompts</a></h1> <p>The following table shows the default system prompt and superuser prompt. The examples will use this prompt to indicate which user you should be running the example as.</p> <div class="INFORMALTABLE"> <table border="0" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">User</th> <th align="LEFT" valign="TOP">Prompt</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP">Normal user</td> <td align="LEFT" valign="TOP"><tt class="PROMPT"> %</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">root</tt></td> <td align="LEFT" valign="TOP"><tt class="PROMPT"> #</tt></td> </tr> </tbody> </table> </div> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN66">4. Typographic Conventions</a></h1> <p>The following table describes the typographic conventions used in this book.</p> <div class="INFORMALTABLE"> <table border="0" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Meaning</th> <th align="LEFT" valign="TOP">Examples</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP">The name of commands, files, and directories. On screen computer output.</td> <td align="LEFT" valign="TOP"> <p>Edit your <tt class="FILENAME">.login</tt> file.</p> <p>Use <tt class="COMMAND">ls -a</tt> to list all files.</p> <pre class="SCREEN"> You have mail. </pre> <br> <br> </td> </tr> <tr> <td align="LEFT" valign="TOP">What you type, when contrasted with on-screen computer output.</td> <td align="LEFT" valign="TOP"> <pre class="SCREEN"> <tt class="PROMPT">%</tt> <tt class="USERINPUT"><b>su</b></tt> Password: </pre> </td> </tr> <tr> <td align="LEFT" valign="TOP">Manual page references.</td> <td align="LEFT" valign="TOP">Use <span class= "CITEREFENTRY"><span class="REFENTRYTITLE"> su</span>(1)</span> to change user names.</td> </tr> <tr> <td align="LEFT" valign="TOP">User and group names</td> <td align="LEFT" valign="TOP">Only <tt class= "LITERAL">root</tt> can do this.</td> </tr> <tr> <td align="LEFT" valign="TOP">Emphasis</td> <td align="LEFT" valign="TOP">You <i class= "EMPHASIS">must</i> do this.</td> </tr> <tr> <td align="LEFT" valign="TOP">Command line variables; replace with the real name or variable.</td> <td align="LEFT" valign="TOP">To delete a file, type <tt class="COMMAND">rm <tt class="FILENAME"> <tt class="REPLACEABLE"><i> filename</i></tt></tt></tt></td> </tr> <tr> <td align="LEFT" valign="TOP">Environment variables</td> <td align="LEFT" valign="TOP"><tt class="ENVAR"> $HOME</tt> is your home directory.</td> </tr> </tbody> </table> </div> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN115">5. Notes, warnings, and examples</a></h1> <p>Within the text appear notes, warnings, and examples.</p> <div class="NOTE"> <blockquote class="NOTE"> <p><b>Note:</b> Notes are represented like this, and contain information that you should take note of, as it may affect what you do.</p> </blockquote> </div> <div class="WARNING"> <blockquote class="WARNING"> <p><b>Warning</b>Warnings are represented like this, and contain information warning you about possible damage if you do not follow the instructions. This damage may be physical, to your hardware or to you, or it may be non-physical, such as the inadvertant deletion of important files.</p> </blockquote> </div> <div class="INFORMALEXAMPLE"> <p>Examples are represented like this, and typically contain examples you should walk through, or show you what the results of a particular action should be.</p> </div> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN124">Chapter 1. Introduction</a></h1> <p>The <b class="APPLICATION">ifhp</b> print filter is the latest in a long evolutionary path of print filters for the <b class="APPLICATION">LPRng</b> print spooler system. It unifies the low level printer communication facilities and provide a common code base for future development.</p> <p>This document is the complete set of references and installation guide for the <b class="APPLICATION">ifhp</b> print filter. It covers compilation, installation, initial testing, details of system configuration, and configuration options that would be needed by the system administrator. Previous releases of <b class="APPLICATION">ifhp</b> had a large selection of <span class="ACRONYM">README</span> files which are now incorporated into the IFHP-HOWTO document.</p> <p><a name="WEBSITE"></a> Information about <b class= "APPLICATION">LPRng</b> and <b class="APPLICATION">ifhp</b> can be found on the <b class="APPLICATION">LPRng</b> web page <a href="http://www.lprng.com" target="_top"> http://www.lprng.com</a>.</p> <p><a name="MAILLIST"></a> There is mailing list for <b class="APPLICATION">ifhp</b> and <b class="APPLICATION"> LPRng</b> at <tt class="EMAIL"><<a href= "mailto:lprng@lprng.com">lprng@lprng.com</a>></tt>. In order to reduce the amount of unsolicited <i class= "EMPHASIS">spam</i> mail posted to the list you must subscribe to the list before posting to it. To subscribe, send email message to <i class="EMPHASIS"><a href= "mailto:lprng-request@lprng.com" target="_top"> lprng-request@lprng.com</a></i>, with the single word <i class="EMPHASIS">subscribe</i> in the body.</p> <p>Several presentations of <b class="APPLICATION"> LPRng</b> and print spooling software have been made at the Large Scale Installation Administrator (LISA) conferences and are in the <b class="APPLICATION">ifhp</b> distribution and available on web sites. The slides for the LISA 97 tutorial on <a href= "ftp://ftp.astart.com/pub/LPRng/LISA97.tgz" target="_top"> Printers and Network Print Spooling</a> are the <tt class= "FILENAME">LISA97.ppt</tt> in the <b class="APPLICATION"> LPRng</b> distribution.</p> <p>During development of <b class="APPLICATION">ifhp</b>, the following documents were invaluable references. For Printer Job Language (PJL) related issues see the Printer Job Language Technical Reference Manual, Hewlett Packard, 10th Edition, October 1997. For PCL related issues see the PCL 5 Printer Language Technical Reference Manual, First Edition, 1992. These manuals are available through the Hewlett Packard Developers Program. See <a href= "http://www.hp.com/go/devexchange" target="_top"> http://www.hp.com/go/devexchange</a> for information on how to join.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN157">1.1. Copyright and Disclaimer</a></h1> <p>Material included in this document from the <b class= "APPLICATION">ifhp</b> distribution Copyright Patrick Powell 1988-1999, where applicable. The rights to distribute this document complete or in part are hereby granted for non-commercial purposes. Partial reproductions must acknowledge the source. Permission to distribute this file together with <b class= "APPLICATION">LPRng</b>, <b class="APPLICATION">ifhp</b> and `derived works' is explicitly granted.</p> <p><i class="EMPHASIS">THE MATERIAL IN THIS HOWTO IS PROVIDED WITHOUT FEE AND AS-IS WITH NO WARRANTY REGARDING FITNESS OF USE FOR ANY PURPOSE. THE AUTHOR AND ALL CONTRIBUTORS ARE NOT LIABLE FOR ANY DAMAGES, DIRECT OR INDIRECT, RESULTING FROM THE USE OF INFORMATION PROVIDED IN THIS DOCUMENT.</i></p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN165">1.2. Commercial Support</a></h1> <p><a href="http://www.astart.com" target="_top">AStArt Technologies (http://www.astart.com)</a> provides commercial support and enhancements for <b class= "APPLICATION">LPRng</b>, <b class="APPLICATION">ifhp</b>, and other network software. AStArt provides network and system consulting services for UNIX and NT systems, as well as real time and network software.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN171">1.3. Web Site</a></h1> <p>Web Page: <a href="http://www.astart.com/LPRng.html" target="_top">http://www.astart.com/LPRng.html</a></p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="SECFTP">1.4. FTP Sites</a></h1> <p>Main FTP Site:</p> <table border="0"> <tbody> <tr> <td><a href="ftp://ftp.astart.com/pub/LPRng" target="_top">ftp://ftp.astart.com/pub/LPRng</a> (US)</td> </tr> </tbody> </table> <br> <br> <p>Mirrors:</p> <table border="0"> <tbody> <tr> <td><a href= "ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng" target="_top"> ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng</a> (AU)</td> </tr> <tr> <td><a href= "ftp://sunsite.ualberta.ca/pub/Mirror/LPRng/" target="_top"> ftp://sunsite.ualberta.ca/pub/Mirror/LPRng/</a> (CA)</td> </tr> <tr> <td><a href= "ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/LPRng" target="_top"> ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/LPRng</a> (DE)</td> </tr> <tr> <td><a href= "ftp://ftp.uni-paderborn.de/pub/unix/printer/plp/LPRng" target="_top"> ftp://ftp.uni-paderborn.de/pub/unix/printer/plp/LPRng</a> (DE)</td> </tr> <tr> <td><a href= "ftp://ftp.chembio.ntnu.no/pub/mirrors/LPRng" target="_top"> ftp://ftp.chembio.ntnu.no/pub/mirrors/LPRng</a> (NO)</td> </tr> <tr> <td><a href="ftp://ftp.mono.org/pub/LPRng" target= "_top">ftp://ftp.mono.org/pub/LPRng</a> (UK)</td> </tr> <tr> <td><a href= "ftp://ftp.cs.columbia.edu/pub/archives/pkg/LPRng" target="_top"> ftp://ftp.cs.columbia.edu/pub/archives/pkg/LPRng</a> (US)</td> </tr> <tr> <td><a href="ftp://ftp.cs.umn.edu/pub/LPRng" target="_top">ftp://ftp.cs.umn.edu/pub/LPRng</a> (US)</td> </tr> <tr> <td><a href= "ftp://uiarchive.uiuc.edu/pub/packages/LPRng" target="_top"> ftp://uiarchive.uiuc.edu/pub/packages/LPRng</a> (US)</td> </tr> <tr> <td><a href= "ftp://uabgate.uab.ericsson.se/pub/unix/LPRng" target="_top"> ftp://uabgate.uab.ericsson.se/pub/unix/LPRng</a>(SE)</td> </tr> </tbody> </table> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN203">1.5. Mailing List</a></h1> <p>To join the <b class="APPLICATION">LPRng</b> mailing list, please send mail to <a href= "mailto: lprng-request@lprng.ie" target="_top"> lprng-request@lprng.ie</a> with the only the word <i class="EMPHASIS">subscribe</i> in the body of the message. <a name="FAQREF"></a></p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN210">1.6. PGP Public Key</a></h1> <p>The <b class="APPLICATION">LPRng</b> and <b class= "APPLICATION">ifhp</b> distributions have MD5 checksum files which are signed with a PGP public key. Here is the key for validating the checksums:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Type Bits/KeyID Date User ID pub 1024/00D95C9D 1997/01/31 Patrick A. Powell <papowell@astart.com> Patrick A. Powell <papowell@sdsu.edu> -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.3i mQCNAzLygTQAAAEEANBW5fPYjN3wSAnP9xWOUc3CvsMUxjip0cN2sY5qrdoJyIhn qbAspBopR+tGQfyp5T7C21yfWRRnfXmoJ3FVtgToAsJUYmzoSFY08eDx+rmSqCLe rdJjX8aG8jVXpGipEo9U4QsUK+OKzx3/y/OaK4cizoWqKvy1l4lEzDsA2VydAAUT tCdQYXRyaWNrIEEuIFBvd2VsbCA8cGFwb3dlbGxAYXN0YXJ0LmNvbT6JAJUDBRA0 XonoiUTMOwDZXJ0BAQ2cBAC7zU9Fn3sC3x0USJ+3vjhg/qA+Gjb5Fi1dJd4solc4 vJvtf0UL/1/rGipbR+A0XHpHzJUMP9ZfJzKZjaK/d0ZBNlS3i+JnypypeQiAqo9t FV0OyUCwDfWybgAORuAa2V6UJnAhvj/7TpxMmCApolaIb4yFyKunHa8aBxN+17Ro rrQlUGF0cmljayBBLiBQb3dlbGwgPHBhcG93ZWxsQHNkc3UuZWR1PokAlQMFEDLy gTSJRMw7ANlcnQEBYBYD/0zTeoiDNnI+NjaIei6+6z6oakqO70qFVx0FG3aP3kRH WlDhdtFaAuaMRh+RItHfFfcHhw5K7jiJdgKiTgGfj5Vt3OdHYkeeh/sddqgf9YnS tpj0u5NfrotPTUw39n6YTgS5/aW0PQfO9dx7jVUcGeod1TGXTe9mIhDMwDJI4J14 =3Zbp -----END PGP PUBLIC KEY BLOCK----- </pre> </div> <br> <br> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN217">Chapter 2. Software Installation and Configuration</a></h1> <p>Before you do an installation please read the following instructions. You will need to:</p> <ol type="1"> <li> <p>Use GNU Make. You can get it from <a href= "http://www.gnu.org/software/software.html" target= "_top">http://www.gnu.org/software/software.html</a>. Don't even think about trying to use another make unless you are a Wizard. And even the Wizards use GNU Make.</p> </li> <li> <p>Use an ANSI C compiler. <b class="APPLICATION"> ifhp</b> is developed and tested with the GNU C compiler. You can get it from <a href= "http://www.gnu.org/software/software.html" target= "_top">http://www.gnu.org/software/software.html</a>. Solaris users should consult the excellent <a href= "http://sunfreeware.com" target="_top"> http://sunfreeware.com</a> site for binary distributions.</p> </li> </ol> <br> <br> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN229">2.1. Additional Recommended Software</a></h1> <p>The following software is recommended for use with <b class="APPLICATION">ifhp</b>. If your printer does not support PostScript, PCL, or text printing directly you will need to install GhostScript to convert from PostScript to the printer format and use a suitable text to PostScript converter.</p> <div class="VARIABLELIST"> <dl> <dt>Unix File Utility</dt> <dd> <p><a name="FILEUTIL"></a> The <b class= "APPLICATION">ifhp</b> filter will recognize that a file is PostScript, PJL, or PCL by examining the first couple of bytes of a file and applying a simple set of rules. If you require more elaborate file type detection then you can configure <b class="APPLICATION">ifhp</b> to also use the UNIX <i class="EMPHASIS">file</i> utility if it is unable to determine the file type. See <a href= "ftp://ftp.astron.com/pub/file/" target="_top"> ftp://ftp.astron.com/pub/file/</a> to obtain this software.</p> </dd> <dt><b class="APPLICATION">LPRng</b> Print Spooler</dt> <dd> <p><a href="http://www.astart.com/LPRng.html" target="_top">http://www.astart.com/LPRng.html</a> The <b class="APPLICATION">ifhp</b> filter works best with the later versions of this software, and the two are developed as an integrated unit.</p> </dd> <dt>GhostScript</dt> <dd> <p><a name="GHOSTSCRIPT"></a> <a href= "http://www.cs.wisc.edu/~ghost/index.html" target= "_top">http://www.cs.wisc.edu/~ghost/index.html</a> or <a href="http://www.ghostscript.com/" target= "_top">http://www.ghostscript.com</a> If your printer does not handle PostScript and you need to print PostScript, GhostScript is used to convert PostScript to a format usable by the printer.</p> </dd> <dt>a2ps - Ascii Text To PostScript Converter</dt> <dd> <p><a name="A2PS"></a> If your printer is a PostScript only printer or you wish to have enhanced formatting capability for documents, then you will need a text to PostScript converter. <a href="http://www-inf.enst.fr/~demaille/a2ps/" target="_top"> http://www-inf.enst.fr/~demaille/a2ps/</a> This package does a very good job of text to PostScript conversion. It also makes use of the <a href= "#FILEUTIL">file utility</a> to determine the required conversions.</p> </dd> <dt>enscript - GNU Enscript</dt> <dd> <p><a name="ENSCRIPT"></a> <a href= "http://www.gnu.org" target="_top"> http://www.gnu.org/</a> This package is an alternative to <tt class="LITERAL">a2ps</tt>, but requires careful handling due to the exit codes it produces. Please see <a href="#CONVERSION">Wrappers For Programs</a> for details on how to use <tt class="LITERAL">enscript</tt> with <b class= "APPLICATION">ifhp</b>.</p> </dd> <dt>textps</dt> <dd> <p><a name="TEXTPS"></a> This program is included with the <b class="APPLICATION">ifhp</b> distribution and is an extremely primitive text to PostScript filter. It generates PostScript compatible with even the most ancient of PostScript printers and is useful where <tt class="LITERAL"> a2ps</tt> and <i class="EMPHASIS">enscript</i> are just too modern. See <a href= "http://www.astart.com/LPRng.html" target="_top"> http://www.astart.com/LPRng.html</a>.</p> </dd> <dt>psutils</dt> <dd> <p><a name="PSUTILS"></a> The <tt class="LITERAL"> psutils</tt> package developed by Angus Duggan is available from <a href= "ftp://ftp.dcs.ed.ac.uk/pub/ajcd/" target="_top"> ftp://ftp.dcs.ed.ac.uk/pub/ajcd/</a>. These are a collection of programs for manipulation of PostScript files, and include facilities for doing page selection, page reversal, n-up printing, and watermarking.</p> </dd> <dt>netcat</dt> <dd> <p><a name="NETCAT"></a> The <tt class="LITERAL"> netcat</tt> utility is extremely useful when trying to send files to a network printer and you need to monitor its activity. Developed by <tt class= "EMAIL"><<a href= "mailto:hobbit@avian.org">hobbit@avian.org</a>></tt>, it is available from <a href= "ftp://avian.org/src/hacks/nc110.tgz" target= "_top">ftp://avian.org/src/hacks/nc110.tgz</a>.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN298">2.2. Installation</a></h1> <p>The installation procedure uses the <tt class= "LITERAL">configure</tt> facility to generate Makefiles. By convention, these files have the following variables that install the <b class="APPLICATION">ifhp</b> executables and configuration files in the following locations:</p> <div class="TABLE"> <p><b>Table 2-1. Configure File Location Variables</b></p> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Configure Variable</th> <th align="LEFT" valign="TOP">Default Value</th> <th align="LEFT" valign="TOP">Expanded Default Value</th> <th align="LEFT" valign="TOP">Override</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${prefix}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--prefix=PATH</tt></td> <td> </td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${exec_prefix}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${prefix}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--execprefix=PATH</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${bindir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${exec_prefix}/bin</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local/bin</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--bindir=PATH</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${sbindir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${exec_prefix}/sbin</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local/sbin</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--sbindir=PATH</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${libexecdir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${exec_prefix}/libexec</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local/libexec</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--libexecdir=PATH</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${sysconfdir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${prefix}/etc</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local/etc</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--sysconfdir=PATH</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${mandir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${prefix}/man</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">/usr/local/man</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">--mandir=PATH</tt></td> </tr> </tbody> </table> </div> <p>The following files are installed as shown below:</p> <div class="TABLE"> <p><b>Table 2-2. Executable and Configuration File Locations</b></p> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Configure Variable</th> <th align="LEFT" valign="TOP">Files</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${libexecdir}/filters</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">lpf, ifhp</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${sysconfdir}</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">ifhp.conf</tt></td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">${mandir}/man[1-9]</tt></td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">man pages</tt></td> </tr> </tbody> </table> </div> <br> <br> <p>The configuration you choose should match that of the <b class="APPLICATION">LPRng</b> print spooler. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ./configure --prefix=/usr --sysconfdir=/etc \ --mandir=/usr/share/man executables and files in /usr/libexec/filters ifhp /etc ifhp.conf /usr/share/man/man[0-9] ifhp.man1 </pre> </div> <br> <br> <p>First, we untar, configure, compile, and install the software:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> <tt class="PROMPT">h4: {1} %</tt> <tt class= "USERINPUT"><b>gunzip -c ifhp-<version>.tgz | tar xvf -</b></tt> <tt class="PROMPT">h4: {2} %</tt> <tt class= "USERINPUT"><b>cd ifhp-<version></b></tt> <tt class="PROMPT">h4: {3} %</tt> <tt class= "USERINPUT"><b>./configure [ ... configuration options ]</b></tt> <tt class="PROMPT">h4: {4} %</tt> <tt class= "USERINPUT"><b>make clean all</b></tt> <tt class="PROMPT">h4: {5} %</tt> <tt class= "USERINPUT"><b>su # you must do the following commands as root</b></tt> <tt class="PROMPT">h4: {6} #</tt> <tt class= "USERINPUT"><b>make install</b></tt> </pre> </div> <br> <br> <p>Modify your printcap file to use <b class= "APPLICATION">ifhp</b>. Your printcap usually has the following format; older version of <b class= "APPLICATION">lpd</b> require <i class="EMPHASIS">:\</i> at the end of each line of a printcap entry. The <tt class="LITERAL">:if</tt> and <i class="EMPHASIS">:of</i> filter entries are usually the ones of interest.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :lp=xxxx:sd=xxxx:.... :if=/usr/local/path_to_old_filters/old_if_filter :of=/usr/local/path_to_old_filters/old_of_filter </pre> </div> <br> <br> <p>Your new printcap entry will look like the one below. The <span class="ACRONYM">MODEL</span> information is described in the next section.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :lp=xxxx:sd=xxxx:.... # see text for details about the next line :ifhp=model=MODEL,status@ :filter=/usr/local/libexec/filters/ifhp # only if you are using accounting or banners #:of=/usr/local/libexec/filters/ifhp </pre> </div> <br> <br> <p>Select a suitable printer from the entries in the configuration file (<tt class= "FILENAME">/usr/local/etc/lpd.conf</tt> or <tt class= "FILENAME">/etc/lpd.conf</tt>). These are described in more detail in the next section.</p> <p>Shut down and restart your print spooler and then send a job to the printer. If this works and you do not need any further capabilities of <b class="APPLICATION"> ifhp</b> such as error reporting or printer monitoring, then you are finished.</p> <p>If you want to use additional capabilities, then you should read the detailed instructions in the next couple of sections.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="MODELSELECTION">2.3. Printer Models Supported</a></h1> <p>There are over 500 different printer models, types and configurations supported by <b class="APPLICATION"> ifhp</b>. If your printer is not currently supported and you have documentation about the printer then send mail to the <a href="#MAILLIST"><b class="APPLICATION"> LPRng</b> Mailing List</a> and support will be added.</p> <p>The default printer is an HP LaserJet 4MP, which supports PostScript Level 3, PCL5, PJL, and has bidirectional communication and a functional pagecounter.</p> <p>The <tt class="FILENAME">ifhp.conf</tt> configuration file contains configuration entries for various models of printers. Each entry has a name usually corresponding to the model of printer or its basic capabilities. For example, the HP LaserJet 4 printer has the <tt class= "LITERAL">model=hp4</tt> configuration entry. The <i class="EMPHASIS">default</i> printer configuration covers a wide range of network printers manufactured by Hewlett-Packard, Canon, Epson, and others and is for a printer that has a bidirectional communications connection that allows it to report status information and the following capabilities:</p> <ol type="1"> <li> <p>PJL support (<tt class="LITERAL">pjl</tt>) compatible with HP 4 family of printers</p> </li> <li> <p>PostScript (PS) support (<tt class= "LITERAL">ps</tt>).</p> </li> <li> <p>PCL support (<tt class="LITERAL">pcl</tt>).</p> </li> <li> <p>Text files printed as PCL (<tt class= "LITERAL">text</tt>, <tt class="LITERAL"> default_language=pcl</tt>).</p> </li> </ol> <br> <br> <p>There is also support for <a href="#PSONLY">PostScript only printers</a> (<tt class="LITERAL">model=ps</tt>), <a href="#PHASER">Tektronics Phasers</a> (<tt class= "LITERAL">model=phaser</tt>), <a href="#PHASER">QMS</a> (<tt class="LITERAL">model=qmsXXX</tt>) and others. The best way to determine the printers currently supported are to examine the <tt class="FILENAME">ifhp.conf</tt> file. The following is a sample of the various entries in the configuration file.</p> <div class="TABLE"> <a name="CONFIGENTRIES"></a> <p><b>Table 2-3. <tt class="LITERAL">ifhp.conf</tt> Configuration Entries</b></p> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Configuration</th> <th align="LEFT" valign="TOP">Printer Supported</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">default</tt></td> <td align="LEFT" valign="TOP">HP 4M Plus, PostScript, PJL, PCL, status, pagecount support</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">apple</tt></td> <td align="LEFT" valign="TOP">PostScript printer, text to PS conversion, status, pagecount support</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">postscript</tt></td> <td align="LEFT" valign="TOP">PostScript printer, text to PS conversion, status, pagecount support</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">ps</tt></td> <td align="LEFT" valign="TOP">PostScript printer, text to PS conversion, status, pagecount support</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pcl</tt></td> <td align="LEFT" valign="TOP">PCL only printer, write only, no status</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pcl_gs</tt></td> <td align="LEFT" valign="TOP">PCL only printer, write only, no status, GhostScript to PCL conversion</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">ghostscript</tt></td> <td align="LEFT" valign="TOP">GhostScript PostScript to raster conversion, write only, no status</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs</tt></td> <td align="LEFT" valign="TOP">GhostScript PostScript to raster conversion, write only, no status</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpiiisi</tt></td> <td align="LEFT" valign="TOP">HP LaserJet III si, default with limited PJL capability</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp3si</tt></td> <td align="LEFT" valign="TOP">HP LaserJet III si, default with limited PJL capability</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4m</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4m</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4si</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4si</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4simx</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4simx</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4plus</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4plus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4mplus</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4mplus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4v</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4v</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4mv</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4mv</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4p</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4p</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4mp</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4mp</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4pj</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4pj</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpljpro</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet ljpro</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4lc</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4lc</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4m</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4M, has limited pagecount capability</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4mplus</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4MPlus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4v</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4v</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4mv</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 4mv</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5l</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 5l</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp6l</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 6l</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp1100</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4 Family, HP LaserJet 1100</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4l</tt></td> <td align="LEFT" valign="TOP">Hp LaserJet 4L, PCL only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4ml</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4ml</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5p</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5p</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5mp</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5mp</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp6p</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 6p</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp6mp</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 6mp</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5si</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5si</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5simx</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5simx</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5m</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5m</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5simopier</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5simopier</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4000</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 4000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpcolorlj</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpcolorlj5</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet 5</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpcolorlj5m</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet 5m</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj1200</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 1200 Family</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hppjxl300</tt></td> <td align="LEFT" valign="TOP">HP Paint Jet XL 300 Family</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj1600</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 1600 Family</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj200</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 200</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj220</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 220</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj600</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj650</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 650</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj230</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 230</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj250c</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 250c</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj330</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 330</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj350c</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 350c</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj430</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 430</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj450c</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 450c</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj455ca</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 455ca</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj700</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 700</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj750c</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 750c</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj750cplus</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 750cplus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj755cm</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 755cm</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj2000cp</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 2000cp</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp2500</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 2500 - No PCL, PostScript Only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp2500cm</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 2500cm - No PCL, PostScript Only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp2500c</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 2500c - No PCL, PostScript Only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp2500cm</tt></td> <td align="LEFT" valign="TOP">HP Design Jet 2500cm - PCL and PostScript</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hpdj2500cp</tt></td> <td align="LEFT" valign="TOP">HP DesignJet 2500CP, not HP2500, HP2500c, HP2500cm</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">lj3pclonly</tt></td> <td align="LEFT" valign="TOP">LaserJet 3 with PCL only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4500</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet Printer 4500</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp8500</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet Printer 8500</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp8550</tt></td> <td align="LEFT" valign="TOP">HP Color LaserJet Printer 8550</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5000</tt></td> <td align="LEFT" valign="TOP">HP5000 Model number: C4111A (LaserJet 5000N)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp5000</tt></td> <td align="LEFT" valign="TOP">HP5000 Model C4111A (LaserJet 5000)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp8000</tt></td> <td align="LEFT" valign="TOP">HP Laserjet 8000 Series, HP8000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp8100</tt></td> <td align="LEFT" valign="TOP">HP Laserjet 8000 Series, HP8100</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp2100</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 2100 Series</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4050</tt></td> <td align="LEFT" valign="TOP">HP4050 Series</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">hp4050</tt></td> <td align="LEFT" valign="TOP">HP4050 Series Printers</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">qms1725</tt></td> <td align="LEFT" valign="TOP">QMS 1725, uses appsocket, no status, PostScript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">qms2025</tt></td> <td align="LEFT" valign="TOP">QMS Laser Printer QMS 2025, appsocket, no status, PostScript and PCL</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">qms860</tt></td> <td align="LEFT" valign="TOP">QMS Laser Printer QMS 860, appsocket, no status, PostScript and PCL</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">qms2060</tt></td> <td align="LEFT" valign="TOP">QMS Laser Printer QMS 2060, appsocket, no status, PostScript and PCL</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">phaser</tt></td> <td align="LEFT" valign="TOP">Generic Tektronics Phaser Color Printer, appsocket, PostScript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">phaser360</tt></td> <td align="LEFT" valign="TOP">Tektronics Phaser 360 Color Printer, appsocket, PostScript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">phaser740</tt></td> <td align="LEFT" valign="TOP">Tektronics Phaser 740 Color Printer, appsocket, PostScript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">phaser850</tt></td> <td align="LEFT" valign="TOP">Tektronics Phaser 850 Color Printer, appsocket, PostScript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">lexmark4039</tt></td> <td align="LEFT" valign="TOP">Lexmark 4039, Postscript only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">lexmark_optra_e312</tt></td> <td align="LEFT" valign="TOP">Lexmark Optra e312, Postscript, PCL and PJL</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj10</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJ10e</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj10</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJ20</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj200</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJ200</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj200</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-210 B/W only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj200</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-240 B/W only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj200</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-250 B/W only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bj200</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-70 B/W only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-610</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-50</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-70</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-80</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-210 Color only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-240 Color only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BJC-250</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-1000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-2000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4100 B/W only</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4200</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4300</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4550</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-6000</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc600</tt></td> <td align="LEFT" valign="TOP">Canon MultiPASS C2500 color printer/fax/copier</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc800</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-800</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc800</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-7000 Color.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc800</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4300 Color</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_bjc800</tt></td> <td align="LEFT" valign="TOP">Canon BubbleJet BJC-4650</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_deskjet</tt></td> <td align="LEFT" valign="TOP">HP DeskJet</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_deskjet</tt></td> <td align="LEFT" valign="TOP">HP DeskJet Plus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_djet500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 500 B/W</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_djet500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet Portable B/W</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_djet500</tt></td> <td align="LEFT" valign="TOP">HP OfficeJet 590 B/W</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 400</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 500C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 540C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 690C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj500</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 693C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 550C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 560C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 660C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 660C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 682C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 683C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 693C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 694C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 690C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 692C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 693C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 694C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 695C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 850</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 870Cse</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 895Cxi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 970</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">HP OfficeJet 590</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">Olivetti jp450</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj550</tt></td> <td align="LEFT" valign="TOP">Xerox XJ6C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 850</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 855</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 870Cse</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 870Cxi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 890C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 670C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdj850</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 680</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdeskjet</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 500C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdeskjet</tt></td> <td align="LEFT" valign="TOP">GhostScript with -sDEVICE=cdj500 -dBitsPerPixel=3</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjcolor</tt></td> <td align="LEFT" valign="TOP">GhostScript with -sDEVICE=cdj500 -dBitsPerPixel=24</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 500C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 510</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 520</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 540C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 693C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_cdjmono</tt></td> <td align="LEFT" valign="TOP">GhostScript with -sDEVICE=cdj500 -dBitsPerPixel=1</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_epsonc</tt></td> <td align="LEFT" valign="TOP">Fujitsu DL-1100</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_epsonc</tt></td> <td align="LEFT" valign="TOP">Fujitsu DL-2400</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_hl7x0</tt></td> <td align="LEFT" valign="TOP">Brother HL-720</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_hl7x0</tt></td> <td align="LEFT" valign="TOP">Brother HL-730</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_hl7x0</tt></td> <td align="LEFT" valign="TOP">Do not use hl7x0 with PCL compliant Brother HL-760. Use ljet4.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_laserjet</tt></td> <td align="LEFT" valign="TOP">Bull Compuprint Pagemaster 415</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_lips3</tt></td> <td align="LEFT" valign="TOP">Canon LBP4+</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_lj4dith</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet2</tt></td> <td align="LEFT" valign="TOP">HP LaserJet II</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet2</tt></td> <td align="LEFT" valign="TOP">Xerox 4030</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet3</tt></td> <td align="LEFT" valign="TOP">Tandy LP800 With LaserJet III emulation.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Brother HL-660</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Brother HL-760 600dpi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Epson EPL5700 300dpi OK</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 600 margins wrong</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 870Cse</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5 300dpi or 600dpi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 5L 300dpi or 600dpi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 6L 600dpi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">HP LaserJet 1100 600dpi OK.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">IBM Network Printer 17</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">IBM/Lexmark 4029 Margins wrong.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Lexmark Optra E+</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Lexmark Optra SC 1275 B/W only.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljet4</tt></td> <td align="LEFT" valign="TOP">Oki OL410ex LED printer 300dpi or 600dpi</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljetplus</tt></td> <td align="LEFT" valign="TOP">HP LaserJet Plus</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljetplus</tt></td> <td align="LEFT" valign="TOP">Canon Laser LBP-600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_ljetplus</tt></td> <td align="LEFT" valign="TOP">NEC SuperScript 860</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_pjxl300</tt></td> <td align="LEFT" valign="TOP">HP PaintJet XL300</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_pjxl300</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_pjxl300</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 1200C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_pjxl300</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 1600C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_r4081</tt></td> <td align="LEFT" valign="TOP">Ricoh 4081 laser printer</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_r4081</tt></td> <td align="LEFT" valign="TOP">Ricoh 6000 laser printer</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 550C</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">NEC P2X</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color II</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 500</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 600</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 800</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 1520</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">SUN rasterfile</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Canon BJC-210 Color</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 640</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">gs_uniprint</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 740</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a0.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi plain paper, high speed</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a1.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a2.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi coated paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a3.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi transparency film</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a4.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi back print film</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a5.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi fabric sheet</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a6.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi glossy paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a7.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi high gloss film</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610a8.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 360×360dpi high resolution paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b1.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b2.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi coated paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b3.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi transparency film</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b4.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi back print film</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b6.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi glossy paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b7.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi high-gloss paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">bjc610b8.upp</tt></td> <td align="LEFT" valign="TOP">Canon BJC 610 (color, rendered) 720×720dpi high resolution paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">cdj550.upp</tt></td> <td align="LEFT" valign="TOP">HP DeskJet 550C 300×300dpi 32-bit CMYK</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">necp2x.upp</tt></td> <td align="LEFT" valign="TOP">NEC P2X 360×360dpi 8-bit (Floyd-Steinberg)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stcany.upp</tt></td> <td align="LEFT" valign="TOP">Any Epson Stylus Color 360×360dpi 4-bit, PostScript halftoning</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 360×360dpi 32-bit CMYK, 15-pin</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc_l.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 360×360dpi 4-bit, PostScript halftoning, weaved noWeave</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc_h.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 720×720dpi 32-bit CMYK, 15-pin Weave</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc2.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 360×360dpi 32-bit CMYK, 20-pin, Epson Stylus Color II(s)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc2_h.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 720×720dpi 32-bit CMYK, 20-pin, Epson Stylus Color II</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc2s_h.upp</tt></td> <td align="LEFT" valign="TOP">Original Epson Stylus and Stylus Pro Color 720×720dpi 32-bit CMYK, 20-pin, Epson Stylus Color IIs</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc500p.upp</tt></td> <td align="LEFT" valign="TOP">360×360dpi Epson Stylus Color 500 32-bit CMYK, noWeave, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc500ph.upp</tt></td> <td align="LEFT" valign="TOP">720×720dpi Epson Stylus Color 500 32-bit CMYK, noWeave, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc600pl.upp</tt></td> <td align="LEFT" valign="TOP">360×360dpi Epson Stylus Color 600, 32/90-inch weaving 32-bit CMYK, 32-pin, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc600p.upp</tt></td> <td align="LEFT" valign="TOP">720×720dpi Epson Stylus Color 600, 32/90-inch weaving 32-bit CMYK, 32-pin, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc600ih.upp</tt></td> <td align="LEFT" valign="TOP">1440×720dpi Epson Stylus Color 600, 32/90-inch weaving 32-bit CMYK, 30-pin, inkjet paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc800pl.upp</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 800, 64/180-inch weaving 360×360dpi 32-bit CMYK, 64-pin, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc800p.upp</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 800, 64/180-inch weaving 720×720dpi 32-bit CMYK, 64-pin, plain paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc800ih.upp</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 800, 64/180-inch weaving 1440×720dpi 32-bit CMYK, 62-pin, inkjet paper</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">stc1520h.upp</tt></td> <td align="LEFT" valign="TOP">Epson Stylus Color 800, 64/180-inch weaving 1440×720dpi 32-bit CMYK, 62-pin, inkjet paper</td> </tr> </tbody> </table> </div> <br> <br> <p>If your printer is not in this this list then you can use the following guidelines. If you have a PostScript only printer you should use the <tt class="LITERAL"> ps</tt> model. If you have a PCL only printer, then <tt class="LITERAL">pcl</tt> is recommended. If you want to process PostScript files on your PCL only printer then install GhostScript and use <span class="SYMBOL"> pcl_ps</span> entry and select the GhostScript driver suitable for your printer.</p> <p>The other model entries are used when specific printer functionality or features is needed. For example, if you want to do accounting or use <i class="EMPHASIS"> landscape</i> mode, then you should check for your specific printer model in the configuration file.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN1467">Chapter 3. Recommended -Z options for Users</a></h1> <p>Due to the general nature of the <b class="APPLICATION"> ifhp</b> filter, there is no standard set of <tt class= "OPTION">-Z</tt> user options because there is no standard set of user facilities. However, the following are recommended for use by implementors of new configurations or printer support.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1472">3.1. Input Tray Selection</a></h1> <p>If a printer supports an input tray selection mechanism, then the following options are recommended for use. Local conditions or printer type may require addition options.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">inupper, inlower, intray1, intray2, ..., manual, envelope</tt></dt> <dd> <p>The input tray selection options should start with the <tt class="LITERAL">in</tt> prefix and correspond to the various trays, if possible. The <tt class="LITERAL">manual</tt> and <i class= "EMPHASIS">envelope</i> options are included to select manual feed or envelope feed. There is a possible source of conflict here as there may be an envelope feeder as well as an envelope media. This is a printer specific dependency.</p> </dd> <dt><tt class="LITERAL">source=name</tt></dt> <dd> <p>The <tt class="LITERAL">key=value</tt> entry allows users to use options such as <tt class= "LITERAL">-Zsource=inbin1</tt>, which may be useful for systems that have an unusual or nonstandard input selection mechanism. The two</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1491">3.2. Output Bin Selection</a></h1> <p>If a printer has an output bin selection mechanism or some other finishing mechanism, then the following are recommended for use.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">outupper, outlower, outbin1, ...</tt></dt> <dd> <p>The output bin selection should start with the <tt class="LITERAL">out</tt> prefix.</p> </dd> <dt><tt class="LITERAL">outbin=name</tt></dt> <dd> <p>The <tt class="LITERAL">outbin=name</tt> form allow users to use options such as <tt class= "LITERAL">-Zoutbin=stapler</tt>, which may be useful for systems that have an unusual or nonstandard output selection mechanism.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1509">3.3. Media Size (Paper) Selection</a></h1> <p>The paper size selection facilities usually are quite printer dependent, and the input tray selection and paper size selection mechanisms may interact in strange and mysterious ways.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">letter, legal, ledger, oversize, a0, a1, ...</tt></dt> <dd> <p>These are standard paper size names.</p> </dd> <dt><tt class="LITERAL">11x17, tabloid</tt></dt> <dd> <p>These are usually aliases for ledger, but depending on local conditions can select different types of paper.</p> </dd> <dt><tt class="LITERAL">paper=name</tt></dt> <dd> <p>The <tt class="LITERAL">paper=name</tt> form allow users to use options such as <tt class= "LITERAL">-Zpaper=b3</tt>, which may be useful for systems that have an unusual or nonstandard input media selection mechanism.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1531">3.4. Media Type Selection</a></h1> <p>Media Type is not the same as paper size, and corresponds to the name assigned to a particular media. Of course, the issue is complicated by the fact that some media have standard sizes as well. Again, the input tray selection, media size, and media type selection will interact in confusing and mysterious ways, depending on the whim of the printer firmware iplementors.</p> <p>You will also notice that there is no general <tt class="LITERAL">mediatype=name</tt> selection mechanism. This is due to the extremely different way that the media names must be passed for PostScript, PJL, and PCL.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">plain, preprinted, letterhead, transparency, glossy, prepunched, labels</tt></dt> <dd> <p>These are commonly used media type names gleaned from various PostScript Printer Description Files, Microsoft printer drivers, and arcane lore of the Printer Working Group. Note that these are not accepted terms in the paper industry for any of these type of media. You are warned.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1543">3.5. Duplex and Simplex</a></h1> <p>Duplex printing is when impressions are placed on both sides of a sheet of media. Due to a general lack of conventions, the orientation of each of the impressions varies from vendor to vendor, and has changed over the years.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">duplex, lduplex</tt></dt> <dd> <p>Print on both sides using the default orientation. The <tt class="LITERAL">lduplex</tt> is an alias for <i class="EMPHASIS">duplex</i></p> </dd> <dt><tt class="LITERAL">duplexshort, sduplex</tt></dt> <dd> <p>Print on both sides but reverse the orientation of one page. The <tt class="LITERAL">sduplex</tt> is an alias for <i class="EMPHASIS">duplex</i> Which page is reversed it at the whim of the firmware implementors and conventions for the printer.</p> </dd> <dt><tt class="LITERAL">simplex</tt></dt> <dd> <p>Print on a single side of a page</p> </dd> <dt><tt class="LITERAL">tumble, shortedge</tt></dt> <dd> <p>This is use to print a single page on one side of the media, but using the (nonstandard) orientation for the <tt class="LITERAL"> duplexshort</tt>. This is usually done when a single impression must be generated on the alternative side of the media, rather than the default side. Again, this is dependent on the whims and whimsys of the printer firmware implementors, and may have some unexpected side effects.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1573">3.6. Copies</a></h1> <p>This option has been provided to effectively allow the printer to make multiple copies of a single page or job. This option tends to be misimplemented on almost all known printers, and it is strongly recommended that users do not use it. However, for completeness, compatibility, and implementor consideration, this is included, even against the better judgement of the implementors of the <b class="APPLICATION">ifhp</b> software.</p> <div class="VARIABLELIST"> <dl> <dt><tt class="LITERAL">copies=nnn</tt></dt> <dd> <p>Attempt to make <tt class="LITERAL">nnn</tt> copies of each impression. This usually fails with catastrophic problems unless you have a system that supports all of the various options required, has enough memory to handle rasterization, you do not have a paper outage, and the printer does not stop with operator intervention. You have been warned.</p> </dd> </dl> </div> <br> <br> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN1584">Chapter 4. Printer Capabilities, Configurations, and Printcaps</a></h1> <p>One of the major difficulties with printer software is dealing with the wide range of different printer hardware configurations and printer connections. This section outlines the printer communication methods, the types of print job languages, and the effects of these on printing software and the <b class="APPLICATION">ifhp</b> filter.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1588">4.1. Printer Configurations</a></h1> <p>A printer consists of a hardware print engine which marks the output page and delivers it, a set of control hardware that takes a <i class="EMPHASIS">print job</i> in a well defined format and operates the hardware to produce output according to information in the <i class= "EMPHASIS">print job</i>, and a communication channel from the computer to the control hardware. The control hardware is sometimes called a <i class="EMPHASIS">print engine</i>. In most modern computers the control hardware may consist of multiple microprocessors, each with their own firmware, and each performing a specific printing task. For example, one may control the paper feed path, one may do rasterization, and one handle communications with the outside world.</p> <p>In order to set up printing correctly, it is necessary to know the following information about your printer.</p> <ol type="1"> <li> <p>The capabilities of the hardware. This is dependent on the model of printer, and may be such things as the page feed, output and input tray selection, numbers of columns and/or rows of output available on the output device. This information is readily available from most manufacturers.</p> </li> <li> <p>The <i class="EMPHASIS">print job language</i> recognized by the control hardware. This is the special set of codes, commands, and formats recognized by the control hardware.</p> </li> <li> <p>The protocol used to send jobs to the printer and obtain status about the printing activity.</p> </li> </ol> <br> <br> <p>Usually the capabilities of a modern printer are very well known and documented, and the <b class= "APPLICATION">ifhp</b> filter and most print spooling software has little difficulty working with them.</p> <p>The following checklist will help you in setting up your printer. The various options that you will need to know about are indicated where appropriate.</p> <ol type="1"> <li> <p>Printer Model (<tt class="LITERAL">model=???</tt>) What is the exact printer model? Check the serial number or other identification to get this information. You should check the <tt class= "FILENAME">ifhp.conf</tt> configuration file to see if your printer is already supported.</p> </li> <li> <p>Print Languages Supported By Your Printer</p> <ol type="a"> <li> <p>PJL? (<tt class="LITERAL">pjl</tt> or <tt class="LITERAL">pjl@</tt>) The Printer Job Language (PJL) is a high level language supported by many Hewlett-Packard printers that allows some print system configuration to be performed. Due to historical developments, not all printers support all PJL language facilities, and some support them in different ways than other printers. The <b class="APPLICATION">ifhp</b> filter can use the PJL support for a printer if it is available.</p> </li> <li> <p>PostScript (and what version)? (<tt class= "LITERAL">ps</tt> or <tt class="LITERAL"> ps@</tt>) PostScript is the most common print job language in use. If your printer supports PostScript, then you will have a relatively trouble free time with it. One problem is that it requires a fairly substantial amount of memory and computational support, and is usually not found on the low end (less than $500) printers.</p> </li> <li> <p>PCL? (<tt class="LITERAL">pcl</tt> or <tt class="LITERAL">pcl@</tt>) PCL is another Print Language supported by many vendors, including Hewlett-Packard, Lexmark, and others. It is essentially text with escape sequences to tell the print engine to place markings on a page at specific places in a specific font. It is the second most common format used with modern printers.</p> </li> <li> <p>Text? (<tt class="LITERAL">text</tt> or <tt class="LITERAL">text@</tt>) Text is really just PCL without any control sequences. However, it is easy to have <b class="APPLICATION">ifhp</b> convert ordinary text into PCL by prefixing the appropriate PCL control codes. You may also need to use the <tt class="LITERAL">crlf</tt> option to force <span class="ACRONYM">CR</span> to <tt class="LITERAL">CR-LF</tt> translation. If you have a simple text printer then you may want to use the much easier to configure <b class= "APPLICATION">lpf</b> filter from the <b class= "APPLICATION">LPRng</b> distribution (<a href= "http://www.astart.com/LPRng.html" target= "_top">http://www.astart.com/LPRng.html</a>).</p> </li> <li> <p>Vendor Specific There is a growing trend to have very proprietary Print Languages for very low end (less than $300) printers. These printers usually require all of their jobs to be preformated by software running on the host and to have the job delivered to them in a specific manner. If you have one of these printers, you will need to get a rasterizing program that produces the correct format. Check to see if <a href="#GHOSTSCRIPT">GhostScript</a>, supports your printer. If it does then you can use <tt class="LITERAL">GhostScript</tt> to translate PostScript to your printer's required format.</p> </li> </ol> <br> <br> </li> <li> <p>Memory Size. If you are going to be sending large print jobs or ones with a large amount of graphics to the printer, you will need a substantial amount of memory to deal with rasterization. Most high resolution Laser Copier based printers require a minimum of 16 megabytes for adequate performance, and if you are printing complex PostScript or PDF documents you may want at least 32 megabytes. Color printers require substantially more and 64 megabytes is not uncommon.</p> </li> <li> <p>Communications. The connection between your printer and the host computer.</p> <ol type="a"> <li> <p>Network Connection This is the most reliable and high speed way to connect a printer to a system. This is especially true if a printer must be accessible to multiple users and is located at a distance from the user.</p> </li> <li> <p>Parallel Port (<tt class= "LITERAL">status@</tt>) The parallel port is a <i class="EMPHASIS">unidirectional</i> communications channel and does not do full duplex bidirectional communications. Some operating system support bidirectional communications, but they do so by requiring write operations to alternate with read operations.</p> </li> <li> <p>Serial Ports This is the very worst way to communicate at high speed with a printer. Serial ports usually have a high error rate, suffer from data overruns, and have a severe impact on system performance. You will need to configure your printer speed, format (bits per character, parity, stop bit), and flow control method, and then do the same for the host. This can be an endless source of frustration for the novice user.</p> </li> <li> <p>Print Server Box Many older printers do not directly support a network connection and have an external <i class="EMPHASIS">print server box</i> attached to either their serial or parallel ports. If you have the printer connected to a parallel port, then you will still most likely only have unidirectional communication and no status information will be available from the printer.</p> </li> </ol> <br> <br> </li> </ol> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="NETWORKPROTOCOLS">4.2. Network Communication Protocols</a></h1> <p>The most high speed and reliable connection to your printer is using a network connection. The following protocols are usually used to communicate with a network printer: RFC1179 (TCP/IP printing), Socket Protocol (TCP/IP), AppSocket Protocol (TCP/IP), Novell Print Protocol (IPX), SMB Print Protocol (TCP/IP), and AppleTalk Print Protocol (TCP/IP).</p> <p>It is highly recommended that you use TCP/IP networking to communications to talk to your printer, and that you do not enable any other protocol on your printer. If you have two different systems trying to connect to the same printer using different protocols, a wide range of vendor's hardware will lock up and may require a power up reset to recover. Documented evidence for this behavior includes a wide range of printers, including those from Hewlett-Packard, LexMark, IBM and other vendors.</p> <p>Only the TCP/IP based network job transfer protocols are discussed in this document. For details on using other protocols, please consult the consult the <a href= "http://www.astart.com/LPRng.html" target="_top"><b class="APPLICATION">LPRng</b></a> documentation.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="RFC1179PC">4.3. RFC1179 (BSD or TCP/IP) Job Transfer Printcap Entry</a></h1> <p>RFC1179 is used to transfer print jobs between a client (user) and a print spooler, or between two print spoolers. Jobs are transferred as a set of files, and the only information exchanged during the transfer process is the success or failure of the transfer. In order to get status about the actual job printing, a separate query status (<b class="APPLICATION">lpq</b>) is sent to the print spooler.</p> <p>Many, if not all, printers with a network interface that supports the TCP/IP protocol support the RFC1179 protocol for job transfer. However, their support for print job status is usually minimal to non-existent. If you want to send a job to a printer using the RFC1179 protocol, please be aware of the following problems.</p> <p>Normally a print spooler (System 5 lp, BSD lpd, <b class="APPLICATION">LPRng</b>) does not modify a print job when forwarding it to another print spooler. This means that your print job will normally pass from the originating <b class="APPLICATION">lp</b> or <b class= "APPLICATION">lpr</b> program to the destination printer with no changes. This can have disastrous results if the job <i class="EMPHASIS">requires</i> filter processing.</p> <p>If you are using the <b class="APPLICATION">LPRng</b> print spooler, job transfers using <tt class="LITERAL"> RFC1179</tt> is specified by using <tt class="LITERAL"> :lp=spoolqueue@host</tt> or <tt class="LITERAL"> :rp=spoolqueue:rh=host</tt> printcap entries. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> raw: :lp=raw@host :sh:sf:mx=0 :sd=/var/spool/lp cooked: :rp=cooked:rm=host :sh:sf:mx=0 :sd=/var/spool/lp </pre> </div> <br> <br> <p>If no filters are specified as the job is not modified, only transferred from one server to another. Even if filters were specified they would be ignored. The <span class="SYMBOL">lpd_bounce</span> flag causes the <b class="APPLICATION">LPRng</b> spooler to pass the print job through the specified filter and then send the filter output to the actual network printer. The <b class= "APPLICATION">lpd</b> print spooler will open a temporary file for to hold the filter output, and then proceed to start the specified filter with its <span class= "ACRONYM">STDOUT</span> attached to the temporary file, its <span class="ACRONYM">STDIN</span> attached to the file to be processed, and its <span class="ACRONYM"> STDERR</span> redirected to an error log. The single resulting file is then transferred to the destination system using the <tt class="LITERAL">RFC1179</tt> protocol.</p> <p>When a job is created the job format is specified (default is <tt class="LITERAL">f</tt>), and a filter named by the <tt class="LITERAL">:i</tt>><i class= "EMPHASIS">format</i> option is selected for use. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> raw: :lpd_bounce :lp=raw@host :sh:sf:mx=0 :sd=/var/spool/lp :ifhp=model=XXX,status@ # for 'f' format :filter=/usr/local/libexec/filters/ifhp cooked: :lpd_bounce :rp=cooked:rm=host :sh:sf:mx=0 :sd=/var/spool/lp :ifhp=model=XXX,status@ # for 'f' format :filter=/usr/local/libexec/filters/ifhp </pre> </div> <br> <br> <p>Unfortunately, some print spooling systems also use the <tt class="LITERAL">v</tt> format by default. You may find the following printcap entry useful in this case. The <tt class="LITERAL">:filter</tt> option specifies a default filter that is used if one is not specified for the format.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> raw: :lpd_bounce :lp=raw@host :sh:sf:mx=0 :sd=/var/spool/lp :ifhp=model=XXX,status@ # for 'f' format :filter=/usr/local/libexec/filters/ifhp </pre> </div> <br> <br> <p>The <tt class="COMMAND">lpr -l</tt> or <tt class= "COMMAND">lpr -b</tt> flag is used to specify that a job has the special <tt class="LITERAL">binary</tt> flag. In this case, most filters will perform only the most perfunctory processing and pass the job directly to the printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="SOCKETPC">4.4. Socket Protocol (TCP/IP) Operation Printcap Entry</a></h1> <p>Many printers with a network interface provide a TCP/IP port that is a direct connection to the internal <i class="EMPHASIS">print engine</i>. If a TCP/IP connection is made to this port and a file is sent over this connection, then the print engine will process the file. More importantly, the connection is bidirectional, and the printer will report errors and status conditions over the connection. PJL and PostScript status request commands can be sent to the printer and the printer will respond with information.</p> <p>The <b class="APPLICATION">ifhp</b> filter makes extensive use of this protocol, and provides support for status and error reporting. In cooperation with the <b class="APPLICATION">LPRng</b> print spooler, it will provide a detailed description of the actual print job progress and any error conditions that arise.</p> <p>To use a Socket connection with <b class= "APPLICATION">LPRng</b>, you use the <tt class="LITERAL"> :lp=host%port</tt> printcap entry shown below. The <b class="APPLICATION">lpd</b> print spooler will open a connection to the TCP/IP <tt class="LITERAL">port</tt> on <i class="EMPHASIS">host</i> and passes the (bidirectional) connection to the <b class="APPLICATION"> ifhp</b> filter on file descriptor 1 (<span class= "ACRONYM">STDOUT</span>) and the file to be printed on file descriptor 0 (<span class="ACRONYM">STDIN</span>). Errors and status information are reported by the <b class="APPLICATION">ifhp</b> filter on file descriptor 2 (<span class="ACRONYM">STDOUT</span>) and placed in the error status log by the <b class="APPLICATION">lpd</b> print spooler.</p> <p>The connection made by the <b class="APPLICATION"> lpd</b> server to the printer is <i class="EMPHASIS"> persistent</i> over the entire job; all file transfers for the same job are made over the same connection. This is important as it prevents other printer users from <i class="EMPHASIS">hijacking</i> the printer in the middle of print a job and getting your job outputs mixed together.</p> <p>The following is a typical printcap entry using the socket protocol.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> raw: :lp=host%9100 :sh:sf:mx=0 :sd=/var/spool/lp :filter=/usr/local/libexec/filters/ifhp </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="APPSOCKETPC">4.5. Appsocket Protocol (TCP/IP) Operation Printcap Entry</a></h1> <p>The Tektronics Phaser Series printers and QMS printers use the <i class="EMPHASIS">Appsocket</i> protocol when sending a job to the printer. This protocol uses two ports: a TCP/IP <i class="EMPHASIS">listening</i> port which accepts TCP/IP connections and a UDP <i class= "EMPHASIS">query</i> port that is used to obtain status information. Unfortunately, the UDP port is almost totally useless for job monitoring and status purposes and is not used except in an advisory role.</p> <p>The Appsocket protocol is (briefly):</p> <ol type="1"> <li> <p>When a UDP packet is received on the UDP port a reply packet containing the status is returned to the originator's address. This packet contains an status indication in a <i class="EMPHASIS">undefined</i> format but usually is readable or has a clearly defined format.</p> </li> <li> <p>To send a job to the printer, a TCP/IP connection is opened to the TCP/IP port and a PostScript job is sent. Only a single job can be sent at a time - a EOJ in the job, i.e.- CTRL-D for PostScript or ESC E for PCL will cause the printer to terminate reading from the TCP/IP port, and after job processing has finished, to close the TCP/IP connection. All input after the EOJ may be ignored by the printer and not processed.</p> </li> <li> <p>While processing the job, if <i class="EMPHASIS"> bidirectional</i> support is available and has been enabled the printer will return job status or information until all of the print job which is has received has been processed. This support is usually not enabled by default and must be enabled by using a specialized administration interface or configuration tool.</p> </li> <li> <p>Unfortunately, some printers will also close the connection when the EOJ has been received. These printers are virtually useless when trying to get error or status information about a job.</p> </li> <li> <p>While processing the job, the printer will ignore any connection requests, and only until the job has been processed will the printer accept connections.</p> </li> <li> <p>During job processing, status and error indications can be obtained by sending a query to the UDP port. However, the error conditions and other information are not very precise as the status may change dramatically during job processing.</p> </li> </ol> <br> <br> <p>The Appsocket protocol does not use a <i class= "EMPHASIS">persistent</i> connection. If two people are sending jobs to the printer simultaneously it is very likely that the jobs will get intermixed.</p> <p>The <tt class="LITERAL">appsocket</tt> option causes the <b class="APPLICATION">ifhp</b> filter to open and close a TCP/IP connections to the printer. Since it is handling connections, you should specify <tt class= "LITERAL">:lp=/dev/null</tt> in the printcap to <i class= "EMPHASIS">trick</i> the <b class="APPLICATION">lpd</b> server into allowing the <b class="APPLICATION">ifhp</b> filter to make the connections. The following is a sample printcap entry for this printer:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # Phaser Setup # no status reporting - write only to the printer lp:server :<tt class="LITERAL">lp=/dev/null</tt> :sd=<i class="EMPHASIS">spooldir</i> :... :ifhp=model=ps,appsocket,status@,dev=10.0.0.1%9100 #path to ifhp filter :filter=/.../ifhp </pre> </div> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # Phaser Setup # bidirectional connection, status reporting lp:server :<tt class="LITERAL">lp=/dev/null</tt> :sd=<i class="EMPHASIS">spooldir</i> :... :ifhp=model=ps,appsocket,dev=10.0.0.1%9100 #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> <p>The <tt class="LITERAL">lp=/dev/null/</tt> is necessary to force the <b class="APPLICATION">lpd</b> print server to open a connection to a dummy device. This is passed to the <b class="APPLICATION">ifhp</b> filter on file descriptor 1. The <tt class="LITERAL"> appsocket</tt> option causes the filter to ignore this connection and to open a connection directly to <tt class="LITERAL">dev=10.0.0.1%9100</tt>, that is, port <tt class="LITERAL">9100</tt> on IP address <i class= "EMPHASIS">10.0.0.1</i>. This address can also be a DNS host entry. The <tt class="LITERAL">status@</tt> tells it not to expect any status back from the printer.</p> <p>For your convenience, the <tt class="LITERAL"> model=phaser</tt> entry is suitable for use with the appsocket protocol.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1781">4.6. Common Print Server Boxes Configuration Information</a></h1> <p>The following is a list of print server manufacturers, models, and with hints on how to access these boxes with various protocols.</p> <div class="TABLE"> <a name="NETWORKPRINTSERVERS"></a> <p><b>Table 4-1. Network Print Servers</b></p> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Manufacturer</th> <th align="LEFT" valign="TOP">Model</th> <th align="LEFT" valign="TOP">RFC1179 Port Name (rp=XXX)</th> <th align="LEFT" valign="TOP">Send to TCP port</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.digprod.com/" target="_top">Digital Products Inc.</a></td> <td align="LEFT" valign="TOP">NETPrint Print Server</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">PORT</tt><i class="EMPHASIS">n</i>, where <i class="EMPHASIS">n</i> is port on server</td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td rowspan="4" align="LEFT" valign="TOP"><a href="http://www.efi.com/" target="_top"> Electronics For Imaging Inc.</a></td> <td align="LEFT" valign="TOP">Fiery RIP i series</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">normalq</tt> or <i class="EMPHASIS"> urgentq</i></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP">Fiery RIP XJ series</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">xjprint</tt></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP">Fiery RIP XJ+ and SI series</td> <td align="LEFT" valign="TOP"><span class= "SYMBOL">print_</span><i class= "EMPHASIS">Model</i>, e.g. <span class="SYMBOL"> print_DocuColor</span></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP">Fiery models ZX2100, ZX3300, X2, X2e</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">print</tt></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.emulex.com/" target="_top">Emulex Corp.</a></td> <td align="LEFT" valign="TOP">NETJet/NETQue print server</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">PASSTHRU</span></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.extendsys.com/" target="_top"> Extended Systems Inc.</a></td> <td align="LEFT" valign="TOP">ExtendNet Print Server</td> <td align="LEFT" valign="TOP"><i class= "EMPHASIS">Printer<tt class= "REPLACEABLE"><i>n</i></tt></i>, where <i class= "EMPHASIS">n</i> is port on server</td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td rowspan="2" align="LEFT" valign="TOP"><a href="http://www.hp.com/" target="_top"> Hewlett-Packard</a></td> <td align="LEFT" valign="TOP">JetDirect interface card</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">raw</tt></td> <td align="LEFT" valign="TOP">9100</td> </tr> <tr> <td align="LEFT" valign="TOP">JetDirect Print Server</td> <td align="LEFT" valign="TOP">Port1=<tt class= "LITERAL">raw1</tt>, Port2=<tt class= "LITERAL">raw2</tt>, ...</td> <td align="LEFT" valign="TOP">Port1=9100, Port2=9101, ...</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.i-data.com/" target="_top"> I-Data</a></td> <td align="LEFT" valign="TOP">Easycom 10 Printserver</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">par1</tt> (parallel port 1)</td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP"> </td> <td align="LEFT" valign="TOP">Easycom 100 Printserver</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">LPDPRT1</tt></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.printers.ibm.com/" target="_top"> IBM</a></td> <td align="LEFT" valign="TOP">Network Printer 12, 17, 24, and 24PS</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">PASS</span></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.lantronix.com/" target="_top"> Lantronix</a></td> <td align="LEFT" valign="TOP">EPS1, EPS2</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">EPS_XXXX_S1 (serial) port 1, EPS_XXXX_P1 (parallel) port 2</tt>, etc.</td> <td align="LEFT" valign="TOP">3001 (port 1), 3002 (port 2), etc.</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.qms.com/" target="_top">QMS</a></td> <td align="LEFT" valign="TOP">Various Models</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">RAW</span></td> <td align="LEFT" valign="TOP">35 (Appsocket)</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.tek.com/color_printers/" target= "_top">Tektronix</a> (Now <a href= "http://www.tektronix.xerox.com" target="_top"> Xerox</a>)</td> <td align="LEFT" valign="TOP">Tektronix printer network cards</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">PS</span> (PostScript), <span class= "ACRONYM">PCL</span> (PCL), or <span class= "ACRONYM">AUTO</span>(Auto-selection between PS, PCL, or HPGL). Not reliable.</td> <td align="LEFT" valign="TOP">9100 (Appsocket on some models)</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "http://www.rosel.com" target="_top">Rose Electronics</a></td> <td align="LEFT" valign="TOP">Microserve Print Servers</td> <td align="LEFT" valign="TOP">lp</td> <td align="LEFT" valign="TOP">9100</td> </tr> <tr> <td rowspan="6" align="LEFT" valign="TOP"><a href="http://www.xerox.com/" target="_top"> Xerox</a></td> <td align="LEFT" valign="TOP">Models 4505, 4510, 4517, 4520</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">PASSTHRU</span></td> <td align="LEFT" valign="TOP">2501 (Appsocket on some models)</td> </tr> <tr> <td align="LEFT" valign="TOP">Model 4512</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">PORT1</tt></td> <td align="LEFT" valign="TOP">10001 (programmable)</td> </tr> <tr> <td align="LEFT" valign="TOP"> </td> <td align="LEFT" valign="TOP">Model N17</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">RAW</span></td> <td align="LEFT" valign="TOP">9100</td> </tr> <tr> <td align="LEFT" valign="TOP">Models N24 and N32</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">RAW</span></td> <td align="LEFT" valign="TOP">2000</td> </tr> <tr> <td align="LEFT" valign="TOP">Models 4900, 4915, 4925, C55</td> <td align="LEFT" valign="TOP"><span class= "ACRONYM">PS</span></td> <td align="LEFT" valign="TOP">2000</td> </tr> <tr> <td align="LEFT" valign="TOP">Document Centre DC220/230</td> <td align="LEFT" valign="TOP"><tt class= "LITERAL">lp</tt></td> <td align="LEFT" valign="TOP">- Unknown if supported -</td> </tr> </tbody> </table> </div> <br> <br> <p>All company, brand, and product names are properties of their respective owners.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1942">4.7. Timeout Problems Sending A Job</a></h1> <p>The <b class="APPLICATION">ifhp</b> filter may need to run a program such as <tt class="LITERAL"> ghostscript</tt> to do format conversion. For large files this can take quite a bit of time and most network printers have a <i class="EMPHASIS">connection timeout</i>. If no data is received for this time the printer will close the connection. By default this timeout is fairly short: 30 or 90 seconds on most printers.</p> <p>If you are sending large jobs to the printer using the <tt class="LITERAL">socket</tt> protocol and are getting timeout problems due to conversion timeouts, then there are two solutions: a) use the Appsocket protocol, which will open and close the connection for each file, and only send data when the converted file is available, or b) do your conversions first and then spooling the converted job to be sent directly to the printer. The second method requires an <b class="APPLICATION"> LPRng</b> bounce queue.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # Method a) Appsocket lp:server :lp=/dev/null :sd=<i class="EMPHASIS">spooldir</i> :... :ifhp=model=printer,dev=10.0.0.1%9100,appsocket #path to ifhp filter :filter=/.../ifhp # Method b) Bounce Queue # this queue does the conversion if required lp:server :lpd_bounce :lp=real@localhost :sd=<i class="EMPHASIS">spooldir</i> :... :ifhp=model=printer #path to ifhp filter :filter=/.../ifhp # this queue does transmission raw:server :lp=10.0.0.1%9100 :sd=<i class="EMPHASIS">spooldir</i> :ifhp=model=printer #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> <p>For method a), the Appsocket protocol is used and the <b class="APPLICATION">ifhp</b> filter will be invoked before sending a job. For method b), you use two queues: a <i class="EMPHASIS">bounce</i> queue that does the format conversion and then sends the job to the real queue, and the real queue that actually talks to the printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1959">4.8. PS, PCL, PJL Printer with TPC/IP Network Interface</a></h1> <p>The most common TCP/IP protocols used for transferring jobs to network printers are <a href="#RFC1179PC">RFC 1179</a>, a direct TCP/IP <a href="#SOCKETPC">socket</a>, connection to the print engine, and the very odd <a href= "#APPSOCKETPC">Appsocket</a> protocol described in previous sections. Here is a reprise of the various printcaps and methods to use them.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # printer setup # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server :sd=<i class="EMPHASIS">spooldir</i> :... # No filtering, transfer using RFC1179, use: :lp=queue@10.1.1.1 # or :rp=queue:rm=10.1.1.1 # Filtering and then transfer using RFC1179, use: :lpd_bounce:lp=queue@10.1.1.1 # or :lpd_bounce:rp=queue:rm=10.1.1.1 :ifhp=model=<i class="EMPHASIS">name</i> :filter=/.../ifhp # Filter, transfer using socket, use: :lp=10.1.1.1%9100 :ifhp=model=<i class="EMPHASIS">name</i> :filter=/.../ifhp # Filter, transfer using Appsocket, use: :lp=/dev/null :ifhp=model=<i class= "EMPHASIS">name</i>,appsocket,dev=10.1.1.1%9100 :filter=/.../ifhp </pre> </div> <br> <br> <p>If your printer is a parallel port printer connected to an <i class="EMPHASIS">external</i> Network Print Spooler such as an HP JetDirect box, then while the network connection to the Network Print Spooler is bidirectional the connection from the Network Print Spooler to the printer may be unidirectional and no status information will be returned from the Network Print Spooler. In this case you <i class="EMPHASIS"> must</i> add the <tt class="LITERAL">status@</tt> option to tell <b class="APPLICATION">ifhp</b> not to expect status:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # Filter, transfer using socket :lp=10.1.1.1%9100 :ifhp=model=<i class="EMPHASIS">name</i>,status@ :filter=/.../ifhp # Filter, transfer using Appsocket :lp=/dev/null :ifhp=model=<i class= "EMPHASIS">name</i>,appsocket,status@,dev=10.1.1.1%9100 :filter=/.../ifhp </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1980">4.9. PS, PCL, PJL Printer with Parallel Port Connection</a></h1> <p>If your printer is connected to a <i class="EMPHASIS"> bidirectional</i> parallel port you may be able to read status from the printer. First, determine if your printer has bidirectional IO capability and if your operating system has support for it. If it does not, then do not use the <tt class="LITERAL">:rw</tt> (open connection read-write) option to open the printer device in read write mode.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # printer setup # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server # do now open read write :rw@ :sd=<i class="EMPHASIS">spooldir</i> :... # parallel port :lp=/dev/lpt #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> <p>If, on the other hand, your Operation system reports that the parallel port is bidirectional and is able to read the printer model information, then you can try opening the parallel port read-write and seeing if the <b class="APPLICATION">ifhp</b> filter can read status information:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # printer setup # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server # open read write :rw :sd=<i class="EMPHASIS">spooldir</i> :... # parallel port :lp=/dev/lpt #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN1993">4.10. PS, PCL, PJL Printer with Serial Port</a></h1> <p>It is strongly advised that serial ports not be used for high speed data transfers. The main problem is trying to configure them in such as way that they do not lose characters due to data overruns or parity errors. LPRng is strongly deprecating support for serial port printers.</p> <p>The <b class="APPLICATION">LPRng</b> print spooler will open and set the serial line characteristics, and pass the open connection to the <b class="APPLICATION"> ifhp</b> filter. The <tt class="LITERAL">tty</tt> connection must pass all 8 bits with no parity, and should use hardware flow control if at all possible. Unfortunately, the various <tt class="LITERAL">stty</tt> options needed to do this vary from system to system. Also, you may discover that your serial connection does not support hardware flow control. If this is the case, then you will have to use software flow control which is rather unreliable for high speed (over 9600) serial lines due to the timing latencies involved.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # printer setup # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server :sd=<i class="EMPHASIS">spooldir</i> :... # serial port :lp=<tt class="FILENAME">/dev/ttyxxx</tt> :stty=38400 -echo -crmod -raw -oddp -evenp \ ixon pass8 -ixany cbreak crtscts #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="PSONLY">4.11. PostScript Only Printer</a></h1> <p>The <tt class="LITERAL">model=ps</tt> entry supports PostScript only printers.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # printer setup # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server :sd=<i class="EMPHASIS">spooldir</i> :... :ifhp=model=ps #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> <p>If you have a <i class="EMPHASIS">unidirectional</i> or <i class="EMPHASIS">write only</i> (no status information) connection such as a parallel port you should use:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> :ifhp=model=ps,status@ </pre> </div> <br> <br> <p><a name="PS-EOJ-AT-START"></a> <a name= "PCL-EOJ-AT-START"></a> If your printer does not like PostScript EOJ (Control-D) flags at the start of a job, set <tt class="LITERAL">ps_eoj_at_start@</tt> flag to cause <b class="APPLICATION">ifhp</b> to remove them. Similarly, the <tt class="LITERAL">pcl_eoj_at_start@</tt> flag will not use the PCL EOJ (Esc E) command string at the start of a PCL job file.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> :ifhp=model=ps,ps_eoj_at_start </pre> </div> <br> <br> <p>See the section on <a href="#FILECONVERSION">File Conversion Support</a> for ways to print text and other files on a PostScript printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2027">4.12. GhostScript</a></h1> <p>Generating a raster image from a PostScript or PCL file in a timely manner requires a high speed processor and substantial amounts of memory. Many of the low cost printers require the user's system to do the raster conversion and the raster file is then transferred to the printer. The file format is usually a subset of PCL.</p> <p>The <a href="#GHOSTSCRIPT">GhostScript</a> program can process PostScript files and produce raster output for a wide range of devices. The <tt class="LITERAL"> ghostscript</tt> <tt class="LITERAL">pcl_gs</tt> printer configurations is used with these printers. See <a href= "#GHOSTSCRIPTCONFIG">GhostScript Printer</a> for details.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="PHASER">4.13. Tektronics Phaser, QMS, and Appsocket Protocol</a></h1> <p>The Tektronics Phaser, QMS Network Printers, and a few others use the <a href="#APPSOCKETPC">Appsocket</a> protocol described in a previous section. The Tektronics (<tt class="LITERAL">model=phaser</tt>) configuration entry has the required options for these printers:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> [ phaser qms ] appsocket ps pjl@ pcl </pre> </div> <br> <br> <p>The following shows a typical printcap entry:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server :sd=<i class="EMPHASIS">spooldir</i> :lp=/dev/null :... :ifhp=model=phaser,dev=10.1.1.1%35 #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="OPTIONS">Chapter 5. Options and Arguments</a></h1> <ul> <li> <p><tt class="LITERAL">model=</tt> emphasis/Model Information/</p> </li> <li> <p><tt class="LITERAL">model_from_option=</tt> emphasis/Option with model information/</p> </li> </ul> <p>The <b class="APPLICATION">ifhp</b> filter is designed to work with the <b class="APPLICATION">LPRng</b> print spooler and expects to be passed the standard set of filter options. These have the form:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> /.../ifhp [-c] [-X option]* accountingfile Example: /.../ifhp -n root -H hostname -P printer -s statusfile acct # - X is any letter except T </pre> </div> <br> <br> <p>All of the option letters except <tt class="LITERAL"> T</tt> are reserved by the <b class="APPLICATION">LPRng</b> program to pass information to the filter. For details about the options, please consult the <b class= "APPLICATION">LPRng</b> documentation.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2064">5.1. Command Line Options</a></h1> <p>The most important options that <b class= "APPLICATION">LPRng</b> passes and that uses are:</p> <div class="VARIABLELIST"> <dl> <dt>-s statusfile</dt> <dd> <p>The file where <b class="APPLICATION">ifhp</b> status information is placed.</p> </dd> <dt>-Z useroptions</dt> <dd> <p>The <tt class="COMMAND">lpr -Z</tt> options passed by the user, and are discussed in the <a href="#OPTIONS">options</a> section.</p> </dd> <dt>-T options</dt> <dd> <p>These are usually options specified in the printcap entry and are discussed in the <a href= "#OPTIONS">options</a> section.</p> </dd> <dt>accountingfile</dt> <dd> <p>The file where accounting information is written.</p> </dd> </dl> </div> <br> <br> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Examples: ifhp "-Tmodel=ps,status@" "-Za4,landscape" </pre> </div> <br> <br> <p>Since commas are used to separate options, whitespace is used to separate multiple values for a particular option. You will need to quote this on a command line. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ifhp "-Tfont=elite greek1 dingbat" </pre> </div> <br> <br> <p>The <b class="APPLICATION">ifhp</b> program first checks to see if the <span class="ACRONYM"> PRINTCAP</span> environment variable is defined. By convention, <b class="APPLICATION">LPRng</b> will place the printer printcap entry in this variable when it starts the <b class="APPLICATION">ifhp</b> filter. The printcap <tt class="LITERAL">:ifhp=options</tt> value is extracted and used as the default <tt class="OPTION"> -T</tt> options. After getting the options from the printcap, the <tt class="OPTION">-Toptions</tt> command line options are appended to the list of <tt class= "OPTION">-T</tt> options. The single letter command line options are also made available to the <b class= "APPLICATION">ifhp</b> programs as shown below:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> PRINTCAP=lp:ifhp=model=this,status@:... ifhp -n root -h localhost -Tmodel=that,debug=1 Concatenated -T options: model=this,status@,n=root,h=localhost,model=that,debug=1 Resulting -T options: status@,n=root,h=localhost,model=that,debug=1 </pre> </div> <br> <br> <p>The <tt class="OPTION">-T</tt> option list is scanned from left to right, and later option values override earlier ones. The <tt class="OPTION">-T</tt> option values have priority over values that are obtained from the configuration file and cannot be overridden. There are several options that have important effects on the operation of the <b class="APPLICATION">ifhp</b> filter.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="CONFIG">5.2. General Configuration Options - config, trace, debug</a></h1> <ul> <li> <p><tt class="LITERAL">config=</tt> emphasis/Configuration file location/</p> </li> <li> <p><tt class="LITERAL">debug=</tt> emphasis/Debug options/</p> </li> <li> <p><tt class="LITERAL">trace</tt> FLAG emphasis/trace on <span class="ACRONYM">STDERR</span>/</p> </li> </ul> <p>These options are used to control the global operation of the <b class="APPLICATION">ifhp</b> filter, and are only available from the <tt class="OPTION">-T</tt> command line options.</p> <div class="VARIABLELIST"> <dl> <dt>config=pathname</dt> <dd> <p>The <tt class="LITERAL">config</tt> option specifies the location of the <tt class="FILENAME"> ifhp.conf</tt> file. This overrides the default location. The pathname can be a file name, list of filenames separated by spaces, or a filter. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ifhp '-Tconfig=/usr/local/etc/ifhp.conf' ifhp '-Tconfig=|/usr/local/bin/getconfig' </pre> </div> <br> <br> <p>The second example uses the <tt class="LITERAL"> getconfig</tt> program to obtain configuration information. The configuration information is read from the program's STDOUT. There program is invoked with no command line options and is passed the environment variables that were provided to <b class="APPLICATION">ifhp</b>.</p> </dd> <dt>model=MODEL</dt> <dd> <p>The <tt class="LITERAL">model</tt> option selects the portion of the ifhp configuration that will set values of configuration parameters. This is discussed in detail in the next section.</p> </dd> <dt>trace</dt> <dd> <p>As <b class="APPLICATION">ifhp</b> processes the print job, it produces tracing and error message information. By default this is written to the status file specified by the <tt class="OPTION"> -s</tt> command line option. The <tt class= "LITERAL">trace</tt> option will cause this information to be written to <span class="ACRONYM"> STDERR</span> (file descriptor 2). This is usually used in debugging.</p> </dd> <dt>debug=n</dt> <dd> <p>This option sets the debugging level to <tt class="LITERAL">n</tt>, where <i class="EMPHASIS"> n</i> is an integer number. Level 0 turns debugging off, level 1 produces a small amount of verbosity and increasing levels produce more verbose information.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="STATUSFILE">5.3. Status Messages</a></h1> <ul> <li> <p><tt class="LITERAL">statusfile=</tt> emphasis/statusfile/</p> </li> <li> <p><tt class="LITERAL">statusfile_max=</tt> emphasis/maximum status file size/</p> </li> <li> <p><tt class="LITERAL">statusfile_min=</tt> emphasis/minimum status file size/</p> </li> <li> <p><tt class="LITERAL">summaryfile=</tt> emphasis/one line summary file/</p> </li> </ul> <div class="VARIABLELIST"> <dl> <dt>statusfile=pathname or -s pathname</dt> <dd> <p>The status file pathname is set by the command line <tt class="OPTION">-s pathname</tt> or if it is not present then the <tt class="LITERAL"> statusfile=pathname</tt> configuration option. The file must exist and will not be created.</p> </dd> <dt>statusfile_max=n</dt> <dd> <p>If the status file is larger than <span class= "SYMBOL">statusfile_max</span> K bytes (default 8K), then it is truncated to <tt class="LITERAL"> statusfile_min=min</tt> K bytes.</p> </dd> <dt>statusfile_min=n</dt> <dd> <p>The minimum size in Kbytes of the status file after truncation (default 1K).</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="STATUS">5.4. Printer Status Available - status</a></h1> <ul> <li> <p><tt class="LITERAL">status</tt> FLAG emphasis/status available from device/</p> </li> </ul> <p>The <tt class="LITERAL">status</tt> option indicates that there is a bidirectional connection to the printer, and that status can be obtained from the connection. During initialization the <b class="APPLICATION">ifhp</b> filter will test the printer connection and determine if it supports reading. If it does not then <b class= "APPLICATION">ifhp</b> will set <tt class="LITERAL"> status@</tt>.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2202">5.5. Monitoring Options - sync, waitend, pagecount</a></h1> <p>The <tt class="LITERAL">sync</tt>, <i class= "EMPHASIS">waitend</i>, and <i class="EMPHASIS"> pagecount</i> options are ignored if no status is available from the printer. The <tt class="LITERAL"> sync</tt> option specifies the method to use to determine if the printer is ready and operational. The <tt class= "LITERAL">waitend</tt> option specifies the method used to determine when a print job is finished. The <tt class= "LITERAL">pagecount</tt> option specifies the method used to obtain pagecount or status information.</p> <div class="VARIABLELIST"> <dl> <dt>sync@, waitend@, pagecount@</dt> <dd> <p>This form of the tag indicates that the particular facility is disabled.</p> </dd> <dt>sync=pjl</dt> <dd> <p>PJL is used to determine if the printer is ready. This can be done by sending a <tt class= "LITERAL">PJL JOB</tt> or <i class="EMPHASIS">PJL ECHO</i> command to the printer and waiting for return status.</p> </dd> <dt>sync=ps</dt> <dd> <p>A small PostScript job which causes a status report to be returned is sent to the printer.</p> </dd> <dt>waitend=pjl, waitend=ps</dt> <dd> <p>This is similar to the <tt class="LITERAL"> sync</tt> operation, but is done at the end of a job in order to determine if the printer is busy.</p> </dd> <dt>pagecount=pjl</dt> <dd> <p>Many PJL capable printers support reporting total page usage by means of PJL. This option causes a PJL command to be sent requesting the total page usage by the printer.</p> </dd> <dt>pagecount=ps</dt> <dd> <p>A small PostScript job which causes a status report to be returned is sent to the printer.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2239">5.6. User -Z Option Support</a></h1> <p>The <b class="APPLICATION">ifhp</b> filter provides a simple way for users to request a particular printer facility or option. The <tt class="LITERAL">lpr -Zkey=value</tt> command causes the <b class= "APPLICATION">lpd</b> print spooler to pass the <tt class="OPTION">-Z</tt> options on the <b class= "APPLICATION">ifhp</b> command line.</p> <p>The <b class="APPLICATION">ifhp</b> filter implements these options by first determining if they are allowed, and then using them to select a set of strings that are sent to the printer. Since some options are implement by sending PJL strings to the printer, some by PostScript, and some by PCL commands, the method of specifying and generating them is a bit involved.</p> <p>The following facility is used to control the names and types of user options.</p> <div class="VARIABLELIST"> <dl> <dt>pjl_user_opts=[ ... ]</dt> <dd> <p>This tag specifies the list of user options that are implemented by sending PJL strings to the printer. This is available only if the printer is PJL capable.</p> </dd> <dt>pcl_user_opts=[ ... ]</dt> <dd> <p>This tag specifies the list of user options that are implemented by sending PCL strings to the printer. This is available only if the printer is PCL capable.</p> </dd> <dt>ps_user_opts=[ ... ]</dt> <dd> <p>This tag specifies the list of user options that are implemented by sending PostScript strings to the printer. This is available only if the printer is PostScript capable.</p> </dd> </dl> </div> <br> <br> <p>For each option, the actual string or set of strings is specified as follows.</p> <div class="VARIABLELIST"> <dl> <dt>pjl_<i class="EMPHASIS">key</i>= ...</dt> <dd> <p>The value of the PJL user option <tt class= "LITERAL">key</tt>. This value can be one or more lines; the lines are checked for correct PJL format and sent to the printer before any language specific information.</p> </dd> <dt>ps_<i class="EMPHASIS">key</i>= ...</dt> <dd> <p>The value of the PostScript user option <tt class="LITERAL">key</tt>. This value can be one or more lines; leading and trailing whitespace is removed and the lines are placed before the first lines of a PostScript job file.</p> </dd> <dt>pcl_<i class="EMPHASIS">key</i>= ...</dt> <dd> <p>The value of the PCL user option <tt class= "LITERAL">key</tt>. This value can be one or more lines; whitespace and new lines are removed and the characters are placed before the first characters of a PCL job file.</p> </dd> </dl> </div> <br> <br> <p>The following user options are predefined in the default <tt class="FILENAME">ifhp.conf</tt> file and are recommended for use.</p> <div class="VARIABLELIST"> <dl> <dt>a3, a4, a5</dt> <dd> <p>Use a3, a4, or a5 paper</p> </dd> <dt>copies=N</dt> <dd> <p>Print N copies of a page or job</p> </dd> <dt>duplex</dt> <dd> <p>Use duplex printing, tumble on. Pages will come out so that the margins are at opposite ends of a page.</p> </dd> <dt>duplexshort</dt> <dd> <p>Use duplex printing, tumble off. Pages will come out so that the margins are at the same ends of a page.</p> </dd> <dt>envelope</dt> <dd> <p>Select envelope media</p> </dd> <dt>inlower</dt> <dd> <p>Select media from lower input bin.</p> </dd> <dt>inupper</dt> <dd> <p>Select media from upper input bin.</p> </dd> <dt>landscape</dt> <dd> <p>Use Landscape orientation</p> </dd> <dt>lduplex</dt> <dd> <p>Alias for duplex</p> </dd> <dt>ledger</dt> <dd> <p>Select ledger size (11x15 inches) media</p> </dd> <dt>legal</dt> <dd> <p>Select legal size (8.5x15 inches) media</p> </dd> <dt>letter</dt> <dd> <p>Select letters size (8.5x11 inches) media</p> </dd> <dt>manual</dt> <dd> <p>Select media from manual feed</p> </dd> <dt>mediaselect=N</dt> <dd> <p>Select media number N</p> </dd> <dt>outlower</dt> <dd> <p>Put output in lower tray or bin</p> </dd> <dt>outupper</dt> <dd> <p>Put output in upper tray or bin</p> </dd> <dt>oversize</dt> <dd> <p>Select oversize media</p> </dd> <dt>portrait</dt> <dd> <p>Use Portrait orientation</p> </dd> <dt>sduplex</dt> <dd> <p>Alias for simplex. Print on the single side of the media.</p> </dd> <dt>simplex</dt> <dd> <p>Print on the single side of the media.</p> </dd> <dt>transparency</dt> <dd> <p>Select transparency media</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2370">5.7. Adding User Options</a></h1> <p>The following shows how to add a PJL option to an <tt class="FILENAME">ifhp.conf</tt> file. By convention, the configuration is added to the end of the ifhp.conf file.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> [ newprinter ] pjl_user_opts += [ screen ] pjl_screen = PJL SCREEN = ON ps_user_opts += [ fuzzy ] ps_fuzzy = <</Fuzzy (\%s{fuzzy})>> setpagedevice </pre> </div> <br> <br> <p>In the first example we define the <tt class= "LITERAL">screen</tt> option. The <tt class="COMMAND">lpr -Zscreen</tt> option will cause the PJL command <tt class="LITERAL">PJL SCREEN = ON</tt> to be put into the output to the printer.</p> <p>Similarly, the <tt class="LITERAL">lpr -Zfuzzy=5</tt> option will cause the PostScript command <tt class= "LITERAL"><</Fuzzy (\%s{fuzzy})>> setpagedevice</tt> to be sent to the printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2383">5.8. Initialization and Setup Control</a></h1> <p>Several options are used during the processing steps discussed in <a href="#DETAILS">Filter Operation Details</a> to control what setup is done for the printer.</p> <div class="VARIABLELIST"> <dl> <dt>pjl_init = [ ... ]</dt> <dd> <p>If PJL is enabled on this printer, options in this list are expanded and the resulting values are sent to the printer. After this, the -Z options are expanded and any options which are listed in the <span class="SYMBOL">pjl_user_opts</span> are processed.</p> </dd> <dt>ps_init = [ ... ]</dt> <dd> <p>If PostScript is enabled on this printer and a PostScript file is being processed, then the options in this list are expanded and the resulting values are sent to the printer. After this, the -Z options are expanded and any options which are listed in the <span class="SYMBOL"> ps_user_opts</span> are processed.</p> </dd> <dt>pcl_init = [ ... ]</dt> <dd> <p>If PCL is enabled on this printer and a PCL file is being processed, then the options in this list are expanded and the resulting values are sent to the printer. After this, the -Z options are expanded and any options which are listed in the <span class="SYMBOL">pcl_user_opts</span> are processed.</p> </dd> </dl> </div> <br> <br> <p>These initialization options are very useful in order to set up information controlling the default format or options for a print job. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pcl_init = [ normalpage ] pcl_normalpage=[ letter crlf linewrap portrait clearmargins fixed pitch=10 courier ] </pre> </div> <br> <br> <p>When processing a PCL job, <tt class="LITERAL"> normalpage</tt> is expanded by searching first for <tt class="LITERAL">normalpage</tt> and then for <span class= "SYMBOL">pcl_normalpage</span>; this in turn results in the expansion of the list of values. For example, <span class="SYMBOL">pcl_crlf</span> is usually defined as <tt class="LITERAL">pcl_crlf=\033&k2G</tt>, which is the PCL command to translate a New Line (<tt class= "LITERAL">\015</tt>) character as a Carriage Return/New Line. The other entries have similar definitions that produce the desired effects.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN2413">Chapter 6. Configuration File</a></h1> <p>This section will cover the <tt class="FILENAME"> ifhp.conf</tt> file and the various options and configuration methods used to control the operation of the <b class="APPLICATION">ifhp</b> filter.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2418">6.1. Configuration File Entries</a></h1> <p>The <b class="APPLICATION">ifhp</b> filter uses a simple text based configuration file, usually <tt class= "FILENAME">/usr/local/etc/ifhp.conf</tt> or <tt class= "FILENAME">/etc/ifhp.conf</tt> to get a set of configuration values which control its operation. The following sample configuration file segment shows how information is specified.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # comment line - first non-blank character is a # #---- DEFAULTS ---- # we first have the default section # - a flag option whose value is 1 on_flag # - a flag option whose value is 0 off_flag@ # - a flag option whose value is a string (single line) # its value will be 'this is a string' strval = this is a string # - a flag option whose value is multiple lines # each additional line starts with whitespace # value is 'this\nis1\na\nstring' longstrval = this is\061 a string # - and a list that gets expanded - # '[ this ] [ is a\nlist ]' -> [ this is a list ] longlist = [ this ] [ is a list ] # we can extend a string. # strval will now be 'this is a string added' strval += added # and we can expand a list # '[ this ] [ is a\nlist ] [ more ]' -> [ this is a list more ] longlist += [ more ] # a printer specific section # ---- PRINTER ---- [ hp hp4* ] # this match model=hp, model=hp4, model=hp4x # override the default onflag@ include /usr/local/etc/ifhp.conf.local [ entry1 ] value [ entry2 ] tc=entry1 </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2426">6.2. Comments</a></h1> <p>Comments are lines whose first non-whitespace character is<tt class="LITERAL">#</tt>. Use <tt class= "LITERAL">\#</tt> if the first non-whitespace character must be <i class="EMPHASIS">#</i>.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2432">6.3. Option Setting</a></h1> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Syntax Equivalent To option option=1 option@ option=0 option=val option=[ v1 v2 ... ] value contains all whitespace option=[ v1 up to the next option entry v2 blank lines and comments v3 are not included ] option=v1 v2 v3 </pre> </div> <br> <br> <p>If an option's default value is the empty string (<tt class="LITERAL">''</tt>). The <b class="APPLICATION"> ifhp</b> program uses the Perl language convention that this value is equivalent to 0 when used in a numerical context or the empty string when used in a string context.</p> <p>In general when a string is used in an integer context it is converted to a the appropriate numerical type using the standard Perl/C numerical representation and conversion methods.</p> <p>The <tt class="LITERAL">flag</tt> syntax sets the value of <i class="EMPHASIS">flag</i> to the string <i class="EMPHASIS">'1'</i>, that is, the string with a 1 value, and <tt class="LITERAL">flag@</tt> sets it to <tt class="LITERAL">'0'</tt>.</p> <p>The <tt class="LITERAL">option = value</tt> syntax sets the option value to a string. The string can extend across multiple lines. A line starting with a space has its value appended to the previous option with a new line (<tt class="LITERAL">\n</tt>) separator.</p> <p>As shown in the example, the <tt class="LITERAL"> +=</tt> operator is used to append to a string value The <tt class="LITERAL">[ option option ...]</tt> syntax is used to specify that the value is list. Lists are used to specify a list of options which can be flags or string values. Lists have the property of <i class="EMPHASIS"> recursive evaluation</i> which means that the individual list items will be further processed during printing. This is discussed later in detail.</p> <p>The <tt class="LITERAL">include</tt> facility is currently deprecated, and may not be implemented in future releases. It will cause the specified file to be read and processed at that point in the configuration file.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2456">6.4. Option Use</a></h1> <p>Options and their values are used to control printer operation. There are two types of options: those with a predefined or <i class="EMPHASIS">builtin</i> meaning to the <b class="APPLICATION">ifhp</b> filter and those which have their values sent to the printer when appropriate. The builtin options are listed and their use is explained in later sections.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2461">6.5. List Expansion</a></h1> <p>The <b class="APPLICATION">ifhp</b> filter configures a printer by sending the values of options to the printer or performing built-in operations. An option can have a flag, string, or list value.</p> <p>A LIST value has the form <tt class="LITERAL">[ v1 v2 ... ]</tt>. When a list value is to be sent to the printer each of <tt class="LITERAL">v1</tt>, <i class= "EMPHASIS">v2</i>, etc. is expanded in turn and the corresponding string value or builtin action is carried out. If the string value of a term is itself a list, the list will be expanded in turn. Recursive list evaluation will result in an error. The following is an example of list expansion:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> t1=[ p1 p2 ] p1=this is p2=[ p3 p4 ] p3=a p4=test </pre> </div> <br> <br> <p>The option <tt class="LITERAL">t1</tt> is expanded by expanding <i class="EMPHASIS">p1</i> and then <i class= "EMPHASIS">p2</i>; The expansion of <tt class="LITERAL"> p1</tt> produces <tt class="LITERAL">"this is"</tt>, and <tt class="LITERAL">p2</tt> produces <tt class="LITERAL"> [p3 p4]</tt>. This list is then expanded to produce <tt class="LITERAL">"test"</tt> and <tt class="LITERAL"> "living end"</tt>.</p> <p>Some LIST options are used in printer language specific contexts and their values are processed appropriately. For example, pjl_init=[...] specifies a set of initialization operations for PJL printers, and pcl_init=[...] is used to specify the initialization needed for PCL printing. The expansion of the LIST entries is done in the language specific context. For PJL this requires that the output be well formed PJL commands, and for PCL that all whitespace be removed.</p> <p>The context dependent expansion is required because sometimes it is necessary to do operations both using PJL and PCL or PJL and PS combinations to ensure correct printer operation. During expansion the language name and an underscore is prefixed to the list entry name and this is used as the option name during expansion. If the prefixed name is not found then the unprefixed name will be used. For example, suppose that we have:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_init=[ initstr test ] pcl_init=[ initstr ] pjl_initstr=@PJL ECHO YES pcl_initstr=\033(*0V </pre> </div> <br> <br> <p>When PJL initialization is being done and we want string values for the <span class="SYMBOL"> pjl_init</span> LIST, we expand <tt class="LITERAL"> initstr</tt> and <i class="EMPHASIS">test</i> in the <span class="SYMBOL">pjl_</span> context. First a defined <span class="SYMBOL">pjl_initstr</span> value will be looked for and then a defined <tt class="LITERAL"> initstr</tt> value. Since there is a value of <span class="SYMBOL">pjl_initstr</span> it will be used.</p> <p>Similarly we will check for <span class="SYMBOL"> pjl_test</span> and <tt class="LITERAL">test</tt> values. Since <span class="SYMBOL">pjl_test</span> does not have a defined value the <tt class="LITERAL">test</tt> value <span class="ACRONYM">DONE</span> will be used.</p> <p>When PJC initialization is being done and we want string values for the <span class="SYMBOL"> pjc_init</span> LIST, then we expand <tt class="LITERAL"> initstr</tt> and <i class="EMPHASIS">test</i> in a similar way, resulting in <tt class="LITERAL"> \033(*0V</tt> and <span class="ACRONYM">DONE</span> values.</p> <p>We can use the list entry <tt class="LITERAL">[ option=value ]</tt> to temporarily specify the value of a variable which is then used during language specific expansion. For example, suppose that we have the following set of definitions:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_init=[ initstr=testing ] pjl_initstr=@PJL INIT=\%s%lcub;initstr%rcub;XQ </pre> </div> <br> <br> <p>As discussed in the next section, the <tt class= "LITERAL">\%s%lcub;initstr%rcub;</tt> will cause the value for the <i class="EMPHASIS">initstr</i> value to be substituted into the <span class="SYMBOL"> pjl_initstr</span> string. How this is done is discussed in the section on <a href="#STRINGESCAPE">String Escape Sequences</a>.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="STRINGESCAPE">6.6. String Escape Sequences</a></h1> <p>Strings values have a syntax similar to PERL or C. The <tt class="LITERAL">\</tt> (escape) character indicates the start of an escape sequence string. This has the syntax:</p> <div class="VARIABLELIST"> <dl> <dt>Standard Character Replacement</dt> <dd> <p><tt class="LITERAL">\f</tt>, <tt class= "LITERAL">\r</tt>, <tt class="LITERAL">\n</tt>, and <tt class="LITERAL">\t</tt> are replaced in turn by the Ascii character FF, CR, NL, and HT whose values are 014, 015, 012, and 011 respectively.</p> </dd> <dt>Octal Character Replacement</dt> <dd> <p><tt class="LITERAL">\nnn</tt> where nnn are 3 octal digits is replaced by the corresponding character with the specified value.</p> </dd> <dt>Option Value Replacement</dt> <dd> <p><tt class="LITERAL">\%format{option} OR \%format[option]</tt></p> <p>The value of the option will be determined and replaced by a formatted string. The option value is determined by the following algorithm.</p> <ol type="1"> <li> <p>When expanding a list value, the <tt class= "LITERAL">option=word</tt> will push the <tt class="LITERAL">option=word</tt> combination onto an evaluation stack, and then the <tt class="LITERAL">option</tt> value is expanded in the current language context.</p> </li> <li> <p>When starting a search for <tt class= "LITERAL">{option}</tt> in a language context <span class="SYMBOL">lang_</span>, the stack of list values is searched in oldest to newest order for a match for <span class="SYMBOL"> lang_option</span> and then for <tt class= "LITERAL">option</tt>. The first one found is used as the option value.</p> </li> <li> <p>After searching the evaluation stack for <tt class="LITERAL">{option}</tt> and no match was found then the <tt class="OPTION">-Z</tt> command line option values are searched for a matching entry.</p> </li> <li> <p>If none is found, then the <tt class= "OPTION">-T</tt> command line option values and next the printer configuration will then be searched for <span class="SYMBOL"> lang_option</span> and then for <tt class= "LITERAL">option</tt>. If no match is found, then the empty string will be the result if a string is wanted or the value 0 if a number is wanted.</p> </li> <li> <p>If the result of this lookup is a list then the list will be expanded in turn, and the concatenating values of the expansion will be used.</p> </li> <li> <p>When starting a search for <tt class= "LITERAL">[option]</tt> the <tt class="OPTION"> -T</tt> command line options will be first and next the printer configuration will then be searched for <span class="SYMBOL"> lang_option</span> and then for <tt class= "LITERAL">option</tt>. If no match is found, then the empty string will be the result if a string is wanted or the value 0 if a number is wanted.</p> </li> <li> <p>If the result of this lookup is a list If no match was found, then the search rules for <tt class="LITERAL">{option}</tt> will be used, and the list expansion will be done as described above. If no match was found a null (empty string) value will be used.</p> </li> </ol> <br> <br> </dd> <dt>Option Value Format</dt> <dd> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> %[-][0][length[.precision]][format] %d{1} => '1' %s{1} => '1' %3d{1} => ' 1' %3s{1} => ' 1' %03d{1} => '0001' %-3s{1} => '1 ' %4.2f{1} => '1.00' </pre> </div> The format specifies how the value is to appear, and is similar to the printf format usage.<br> <br> <p>Depending on the format type, a value will be converted and used appropriately. The empty string or null value (<tt class="LITERAL">''</tt>) will be treated as a <i class="EMPHASIS">'0'</i> value when used in an numeric context.</p> <p>The default format is %d, ie, \%{val} would be \%d{val}. The numerical formats supported are: %d, %o, %x, %X, %e, %f, and %g; The %s format use the string value of the result.</p> </dd> </dl> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2580">6.7. Language Context and Value Expansion</a></h1> <p>The <b class="APPLICATION">ifhp</b> filter sends initialization and configuration commands to the printer. Depending on the type of language of a print file (i.e. - PostScript or PCL), different command formats would need to be used to implement different options. For example, to implement a <i class="EMPHASIS">landscape</i> option for a PJL aware printer you would need to send the PJL command <tt class="LITERAL">@PJL SET ORIENTATION=LANDSCAPE</tt>. For a PostScript printer you would need to send a very strange string which would depend on the actual printer mode.</p> <p>Our language context also includes various checks for language specific dependencies. This section refers to material that is discussed in depth in later sections of this document, and on first reading may be a little confusing. However, if you are not aware of some of these restrictions then much of the information in the configuration files may be very confusing.</p> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="AEN2587">6.7.1. PJL Language</a></h2> <p>A PJL command has the form <tt class="LITERAL">@PJL OPCODE ...</tt>, and PJL commands must be sent as a block before any other commands. In order to assist with this, the <b class="APPLICATION">ifhp</b> filter provides the following assistance. When expanding a list value, each list entry is expected to form a well formatted PJL command.</p> <ol type="1"> <li> <p>Before sending any PJL command to the printer, the PJL Universal Exit Command (<tt class= "LITERAL">\033%-12345X</tt>) string is sent to the printer. This is automatically done if <tt class= "LITERAL">pjl</tt> is enabled for the printer.</p> </li> <li> <p>The list item is expanded, and all value substitutions are done. Leading and trailing whitespace is removed, all characters are converted to uppercase, and a new line (<tt class= "LITERAL">\n</tt>) value is appended to the command.</p> </li> <li> <p>Because not all printers support all PJL commands, the <b class="APPLICATION">ifhp</b> filter performs uses the <span class="SYMBOL"> pjl_only</span> and <span class="SYMBOL"> pjl_except</span> configuration lists to ensure that the options are allowed by the printer. The OPCODE must appear in the <span class="SYMBOL"> pjl_only</span> list and not in the <span class= "SYMBOL">pjl_except</span> list. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_only = [ JOB SET STATUS ] pjl_except = [ STATUS ] </pre> </div> <br> <br> <p>The <span class="SYMBOL">pjl_only</span> indicates that the printer supports the PJL JOB, SET, and STATUS commands, but the <span class= "SYMBOL">pjl_except</span> list removes the STATUS from this list. This means that only the JOB and SET commands will be allowed.</p> </li> <li> <p>If the command is a <span class="ACRONYM"> SET</span> command, then the PJL variable must appear in the <span class="SYMBOL"> pjl_vars_set</span> list and not in the <span class="SYMBOL">pjl_vars_except</span> list.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_vars_set = [ PAPER SIZE ORIENTATION ] pjl_vars_except = [ PAPER ] @PJL SET SIZE=A4 @PJL SET PAPER=LETTER </pre> </div> <br> <br> <p>In the above example, the <tt class="LITERAL"> SIZE=A4</tt> command would be allowed and sent while the <tt class="LITERAL">PAPER=LETTER</tt> command would be rejected and not sent.</p> </li> </ol> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="AEN2622">6.7.2. PCL Language</a></h2> <p>When sending PCL initialization strings to a printer, it is essential to send nothing that could cause a printable character to be sent before the actual file contents. Such output could cause the location and positioning of text to be altered in unexpected ways. To avoid this, the following steps are taken when expanding a list in a PCL language context.</p> <ol type="1"> <li> <p>Before any PCL string is sent to the printer, the PCL End of Job (<tt class="LITERAL">\033E</tt>) string is sent to the printer.</p> </li> <li> <p>All whitespace (blanks, tabs, etc) are removed from the string value.</p> </li> <li> <p>Next, all escaped values are substituted. At this point you can <i class="EMPHASIS">force</i> printable strings containing whitespace into the output by using the <tt class="LITERAL">\nnn</tt> escape mechanism.</p> </li> <li> <p>All list values are concatenated and then sent to the printer.</p> </li> </ol> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="AEN2637">6.7.3. PostScript Language</a></h2> <p>The PostScript language processing is very minimal, as there are few problems sending PostScript to a printer.</p> <ol type="1"> <li> <p>Before sending any PostScript initialization strings, the PostScript End of Job indicator (<tt class="LITERAL">\004</tt> or Control-D) is sent.</p> </li> <li> <p>Strings are then expanded and the escape sequences are substituted.</p> </li> <li> <p>Individual strings have a newline (<tt class= "LITERAL">\n</tt>) appended to them before being sent to the printer.</p> </li> </ol> <br> <br> </div> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2649">6.8. Printer Entries</a></h1> <p>The <tt class="FILENAME">ifhp.conf</tt> file is divided into printer entries by <tt class="LITERAL">[ pattern pattern ...]</tt> lines. Each pattern is glob matched against the <tt class="LITERAL">model</tt> option value, and if the match is successful then the options on the following lines until the next printer entry header are appended to the specific printer configuration entry.</p> <p>By convention, each configuration file is assumed to start with the header <tt class="LITERAL">[ default ]</tt>, and the initial set of lines are used to set default values for the various <b class="APPLICATION"> ifhp</b> options.</p> <p>The algorithm for scanning the configuration files first sets the <tt class="LITERAL">model</tt> value to <i class="EMPHASIS">default</i>, and extracts the default information. It then sets the <tt class="LITERAL"> model</tt> value to the user specified value, and rescans the configuration file information.</p> <p>If users need to add or modify the <tt class= "FILENAME">ifhp.conf</tt> file, then they should add their entries to the end of the file, and override any default options by specific values in their new entry. To aid with system configuration and maintenance, the distributed <tt class="FILENAME">ifhp.conf</tt> file has the following text at the end of the file:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ##### This is the end of the standard ifhp.conf file. ##### Add your local files after this ##### If you want to override some entries, simply change the names to ##### something different, i.e. hp4 hp4.old ##### Here is a script to do this and then append your local file to the ##### end of the ifhp.conf file: ##### ##### #!/bin/sh ##### for i in $* ; do ##### perl -spi.bak -e 's/ $i / $i.orig /g' ifhp.conf ##### done ##### ##### sed -n -e '1,/XXX END XXX/p' ifhp.conf >ifhp.conf.new ##### sed '1,/XXX END XXX/d' ifhp.old >> ifhp.conf.new ##### ##### You can probably improve on this. ##### #### XXX END XXX ##### # user adds new default values here for all printer entries [ default ] # set default value pcl_option= \033test [ mypcl_printer ] # override default value pcl_option= </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2667">6.9. Include Facility</a></h1> <p>The <tt class="LITERAL">include filename</tt> facility is similar to the standard compiler file inclusion facility. The specified file or list of files separated by commas or whitespace will be substituted for the indicated line.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2671">6.10. tc Entry Inclusion Facility</a></h1> <p>The <tt class="LITERAL">tc=entry</tt> facilty is similar to the printcap <tt class="LITERAL">tc</tt> facility used in the <b class="APPLICATION">LPRng</b> software other places. The specified entry or list of entries separated by commas or whitespace will be substituted for the indicated line.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="DETAILS">Chapter 7. Filter Operation Details </a></h1> <p>The <b class="APPLICATION">ifhp</b> filter operates by first reading a configuration file to determine the type of printer it is working with, and then proceeds to carry out operations requested by the values of option variables passed on the command line or found in the configuration files. In normal operation, input is read from <span class= "ACRONYM">STDIN</span> (file descriptor 0) and results written to <span class="ACRONYM">STDOUT</span> (file descriptor 1). Status reports are written to a status file or optionally to <span class="ACRONYM">STDERR</span> (file descriptor 2), together with any error messages or diagnostics.</p> <p>In addition to normal operation the filter can run in the <span class="ACRONYM">OF</span> mode and act as a printer initializer and job terminator. This is discussed in detail in the <b class="APPLICATION">LPRng</b> documentation. When in the OF mode the two character sequence <tt class="LITERAL">"\031\001"</tt> to the filter. will cause the filter to suspend itself by sending itself a <span class="ACRONYM">SIGSUSP</span> signal. The print spooler will detect this and then send job files to the same output device. After the files have been transferred the the filter will be restarted with a SIGCONT signal.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN2689">7.1. Filter Pseudo-Code</a></h1> <p>The details of the filter operations are described in the following <i class="EMPHASIS">pseudo-code</i>. The sections marked with <tt class="LITERAL">###</tt> are discussed later in this document in detail.</p> <p><tt class="FILENAME">///</tt> See: <a href="#SETUP"> Options, Initialization and Setup</a></p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ###+++ Initialization and Setup // get ifhp information from PRINTCAP_ENTRY environment variable if( PRINTCAP_ENTRY environment variable has a value ){ split printcap information into printcap fields if( :ifhp=options,options is present in printcap ){ split the options list and place in the Toptions list } } Add the -T command line options to the Toptions list Add the -Z command line options to the Zoptions list foreach option in -Toptions do if( option = "debug=level" ){ set Debuglevel = level; } if( option = "trace" ){ output error and trace on STDERR } if( option = "config=pathlist" ){ set configuration pathlist = pathlist; } if( option = "model=name" and model not set ){ set model = name; } } Read the configuration files from the config file list Prepend each file with a [ default ] header Scan the configuration files for [ default ] entries; later entry values will override earlier ones. Repeat the scan, but this time search for [ model ] entries matching the specified model. Put the command line options and -T options into configuration information, effectively overriding the information from the configuration files. // open a connection to the printer if required // usually only done when appsocket protocol is used if( device specified using -Tdev=device ){ // if device is host%port, we open TCP/IP connection fd = open(device); // Note - status opens RW // status@ opens WO dup fd to 1; close fd; } ###--- </pre> </div> <tt class="FILENAME">///</tt> See: <a href="#SYNCPAGE"> Synchronization and Pagecount</a> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ###+++ Synchronization and Pagecount if( status returned by printer and sync requested ){ do{ send command and wait for timeout; } while( no response ); if( appsocket ){ close and reopen TCP/IP connection; } } if( status and pagecount requested ){ // pagecount has the form pagecount@ (none), // pagecount=ps, pagecount=pjl, ... if( pagecount=language has value ) do { if( pagecount TRUE ){ set pagecount= pjl or ps depending on availability } if( pagecount = pjl and PJL INFO available ){ send PJL INFO PAGECOUNT command to printer } else if( pagecount = ps ){ send PS program to printer } else { terminate with error; } } while( no pagecount response ); if( appsocket ){ close and reopen TCP/IP connection; } } ###--- </pre> </div> <tt class="FILENAME">///</tt> See: <a href="#PJLINIT">PJL Initialization</a> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ### PJL INITIALIZATION if( PJL enabled ){ language = "pjl_" foreach option in pjl_init=[...] { expand the option using the language value #+++ PJL OPTION ACTIONS +++ if( option in pjl_vars_set=[ ... ] and option not in pjl_vars_except expand "@PJL SET OPTION=\%{option}" output = expanded string value } else { if( option value is a string ){ output = expanded string value; } } // output has the form @PJL COMMAND .... if( COMMAND is in pjl_only=[ ... ] and not in pjl_except=[ ... ] ){ send output to printer } #--- end PJL OPTION ACTIONS } if( !OF_mode ){ foreach option in -Toption=value { if( option in pjl_user_opts ){ #+++ USER PJL OPTIONS // join 'pjl_' and the option name expand 'pjl_' . option // perform PJL actions as above #+++ PJL OPTION ACTIONS +++ .... #-- PJL OPTION ACTIONS +++ #--- USER PJL OPTIONS } } foreach option in -Zoption=value { if( option in pjl_user_opts ){ // perform USER PJL actions as above #+++ USER PJL OPTIONS #--- USER PJL OPTIONS } } } } ###--- PJL INITIALIZATION </pre> </div> <tt class="FILENAME">///</tt> See: <a href="#CONVERSION"> File Conversion Support</a> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> // language is set to the type of job language // - PS, PCL, TEXT, RAW, UNKNOWN // the first part of the job file is read and the filter takes // a (wimpy) guess at the job file based only on the first couple // of characters; language is be PJL, PS, or TEXT, or RAW // This is the same algorithm as the UNIX FILE utility language = default_language (from configuration); if( command line -c (binary) option present ){ language = RAW; } else if( -Zlanguage=xxx option present ){ language=xxx } else if( forceconversion set ){ use UNIX file utility to get file type } else if( file is PS file ){ language=PS if( file starts with PS EOJ (CTRL-D) and ps_eoj_at_start is clear ){ remove the PS EOJ } else { send a PS EOJ first } } else if( file is PCL file ){ language=PCL if( file starts with PCL EOJ (ESC E) and pcl_eoj_at_start is clear ){ remove the PCL EOJ } } if( file conversion table specified then ){ look up file type in conversion table; if( conversion program specified ){ run input through conversion program } set file type to output type } if( language = TEXT and PCL allowed ){ language = PCL; } if( language not recognized by printer ){ exit with error; } if( PJL ENTER supported ){ use PJL ENTER command to select language; send nullpad NULLS to force full buffer condition } </pre> </div> <tt class="FILENAME">///</tt> See: <a href= "#LANGUAGEINIT">Language Specific Initialization</a> <a name="PCL-USER-OPTS"></a> <a name="PS-USER-OPTS"></a> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> // LANGUAGE SPECIFIC INITIALIZATIONS if( language = PCL ){ foreach option in pcl_init { ###+++ expansion do expansion similar to PJL OPTION actions using "pcl_" prefix for option lookup; ###--- } if( not in OF_MODE ){ foreach option in -Toption do { if( option in pcl_user_vars=[ ... ] ){ ###+++ expansion as above ###--- } foreach option in -Zoption do { if( option in pcl_user_opts=[ ... ] ){ ###+++ expansion as above ###--- } } remove whitespace and expand string results; } else if( language = PS ){ ###+++ language specific actions as above, using the ps_ prefix for lookup allow only user option in the ps_user_opts list expand string results but do not remove whitespace } </pre> </div> <tt class="FILENAME">///</tt> See: <a href= "#FILETRANSFER">File Transfer and Error Status Monitoring</a> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Transfer job to printer, reading error and other information back from the printer if enabled if( language = PCL ){ send PCL End of Job } else if( language = PS ){ send PS End of Job } // job termination ###+++ Synchronization and Pagecount as above finished = 0 while( waitend and not finished ){ // timeouts and retries are done here if( time taken is too long ){ give up and report an error } if( appsocket ){ send \r\n to get status reply } else if( waitend with PJL ){ wait for end of job using UINFO; } else if( waitend with PS ){ send PostScript echo program to printer if end_ctrl_t then add ^T } wait for response if( response has end of job indication ) { finished = 1; } } if( pagecount ){ if( appsocket ){ close and reopen connection; } get pagecount using previously described algorithm } ###--- exit </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="SETUP">7.2. Options, Initialization and Setup</a></h1> <p>During the setup step, the <b class="APPLICATION"> ifhp</b> system will extract command line options and scan configuration files for printer entries. These operations are covered in detail in other sections.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="LANGUAGES">7.3. Languages Supported- pjl, pcl, ps, and text</a></h1> <ul> <li> <p><tt class="LITERAL">pjl</tt> FLAG emphasis/PJL Supported/</p> </li> <li> <p><tt class="LITERAL">pcl</tt> FLAG emphasis/PCL Supported/</p> </li> <li> <p><tt class="LITERAL">ps</tt> FLAG emphasis/PostScript Supported/</p> </li> <li> <p><tt class="LITERAL">text</tt> FLAG emphasis/Text Supported/</p> </li> </ul> <p>These flags set the languages that are recognized or processed by the filter.</p> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="PJL-JOB">7.3.1. pjl_job FLAG</a></h2> <ul> <li> <p><tt class="LITERAL">pjl_job</tt> FLAG emphasis/Send PJL Job and EOJ/</p> </li> </ul> <p>If PJL is enabled and the <tt class="LITERAL"> pjl_job</tt> flag is SET a PJL JOB and PJL EOJ command will be generated and sent to the printer at the job start and end respectively. The <tt class="LITERAL"> JOB</tt> command has the form:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL JOB NAME = "..." [ START = nnn ] [ END = mmm ] </pre> </div> The START and END values can be specified by <tt class= "LITERAL">-Zstartpage=nnn</tt> and <tt class="LITERAL"> -Zendpage=mmm</tt> command line options. The EOJ command has must match the JOB command. <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL EOJ NAME = "..." [ START = nnn ] [ END = nnn ] </pre> </div> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="PJL-ENTER">7.3.2. pjl_enter FLAG</a></h2> <ul> <li> <p><tt class="LITERAL">pjl_enter</tt> FLAG emphasis/Send PJL ENTER /</p> </li> </ul> <p>If PJL is enabled and the <tt class="LITERAL"> pjl_enter</tt> flag is SET, a PJL ENTER LANGUAGE = xx command will be generated when PCL or PS files are sent to the printer.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL ENTER LANGUAGE = PCL @PJL ENTER LANGUAGE = POSTSCRIPT </pre> </div> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="NULLPAD">7.3.3. nullpad STRING</a></h2> <ul> <li> <p><tt class="LITERAL">nullpad=</tt> ephasis/null character count/</p> </li> </ul> <p>Some older model HP printers require receiving a large number of NULL (0) characters to force commands in the input buffer to be read. This can be done using the <tt class="LITERAL">nullpad</tt> option. In practice, this has turned out to be largely irrelevant as most newer printers and network interface printers do not have this problem.</p> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="PJL-CONSOLE">7.3.4. pjl_console FLAG</a></h2> <ul> <li> <p><tt class="LITERAL">pjl_console</tt> FLAG emphasis/printer console messages/</p> </li> </ul> <p>When this flag is set and PJL is available and the PJL <span class="ACRONYM">RDYMSG</span> command is supported, then a short message will be put on the console.</p> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="REMOVE-CTRL">7.3.5. remove_ctrl STRING</a></h2> <ul> <li> <p><tt class="LITERAL">remove_ctrl=</tt> emphasis/remove control characters /</p> </li> </ul> <p>The <span class="SYMBOL">remove_ctrl</span> string option species a list of (control) characters that will be removed from PostScript jobs. This solves the problem of jobs with embedded Control-T or Control-C characters causing abnormal printer operation. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> remove_ctrl=CT </pre> </div> would cause Control-C and Control-T characters to be removed.<br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="TBCP">7.3.6. tbcp FLAG</a></h2> <ul> <li> <p><tt class="LITERAL">tbcp</tt> FLAG emphasis/Use TBCP protocol/</p> </li> </ul> <p>The <tt class="LITERAL">tbcp</tt> flag can be specified as a user option as well as a configuration file option. If the file type is PostScript and this flag is set then the file is transferred using the Transparent Binary Communication Protocol. (See the Adobe PostScript Language Reference Manual for details on the protocol.)</p> <p>At the start of the PostScript job, the sequence <tt class="LITERAL">\001</tt> <i class="EMPHASIS">M</i> is sent. Afterwards, all control characters in the set <tt class="LITERAL">0x01, 0x03, 0x04, 0x05, 0x11, 0x13, 0x14, 0x1C,</tt> are replaced by the two character sequence <tt class="LITERAL">\001</tt> <tt class= "LITERAL">X+'@'</tt> or <tt class="LITERAL"> X+'\100'</tt> or is sent. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> C\001\003 -> \001\115\103\001\101\001\103 or \001MC\001A\001C </pre> </div> <br> <br> </div> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="SYNCPAGE">7.4. Synchronization and Pagecounts</a></h1> <ul> <li> <p><tt class="LITERAL">accounting=</tt> <i class= "EMPHASIS">accounting program</i></p> </li> <li> <p><tt class="LITERAL">accounting_info=</tt> <i class="EMPHASIS">accounting information</i></p> </li> <li> <p><tt class="LITERAL">pagecount</tt> FLAG or Option <i class="EMPHASIS">pagecounter available</i></p> </li> <li> <p><tt class="LITERAL">pagecount_interval=</tt> <i class="EMPHASIS">get pagecounter interval</i></p> </li> <li> <p><tt class="LITERAL">pagecount_timeout=</tt> <i class="EMPHASIS">get pagecounter timeout</i></p> </li> <li> <p><tt class="LITERAL">pagecount_start=</tt> <i class="EMPHASIS">get pagecounter at job start</i></p> </li> <li> <p><tt class="LITERAL">pagecount_end=</tt> <i class= "EMPHASIS">get pagecounter at job end</i></p> </li> <li> <p><tt class="LITERAL">pagecount_ps_code=</tt> <i class="EMPHASIS">PostScript to get pagecounter</i></p> </li> <li> <p><tt class="LITERAL">sync</tt> FLAG or Option <i class="EMPHASIS">sync required</i></p> </li> <li> <p><tt class="LITERAL">sync_interval=</tt> <i class= "EMPHASIS">do sync at interval</i></p> </li> <li> <p><tt class="LITERAL">sync_timeout=</tt> <i class= "EMPHASIS">sync timeout</i></p> </li> <li> <p><tt class="LITERAL">wait_for_banner</tt> FLAG <i class="EMPHASIS">wait for banner page</i></p> </li> </ul> <p>Many printers are able to provide status information back to the filter. It is assumed that in these circumstances file descriptor 1 (FD1) is <i class= "EMPHASIS">bidirectional</i> and status information can be read from it. When the <tt class="LITERAL">status</tt> option is TRUE, FD1 is readable and is a device or communications socket, then the filter assumes that it can read FD1.</p> <p>Synchronization is usually done in order to ensure that a previously spooled job or printer action has completed correctly, and the printer is ready to accept a new job. It is usually carried out by sending a request to the printer to echo a string back to the filter. Clearly, if the printer cannot provide status or echo values back, then synchronization is impossible.</p> <p>The value of the <tt class="LITERAL">sync</tt> option determines if a PJL ECHO command or simple PostScript program is used. The PostScript program has the form:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> \004%!PS-Adobe-2.0 ( %%[ echo: <span class= "ACRONYM">TODSTR</span> ]%% ) print () = flush \004 </pre> </div> where <span class="ACRONYM">TODSTR</span> is replaced with the current Time of Day.<br> <br> <p>To control obtaining synchronization, the and <tt class="LITERAL">sync_timeout=nnn</tt> options are used. The PJL or PS command is repeated at <tt class="LITERAL"> sync_interval=nnn</tt> second intervals; if nnn is 0, then it is sent only once. If synchronization is not obtained within <tt class="LITERAL">sync_timeout=nnn</tt> seconds, then the filter exits with an error status. A 0 value or <tt class="LITERAL">sync_timeout@</tt> disables timeouts.</p> <p>When the <b class="APPLICATION">ifhp</b> filter is operating in OF mode and the <tt class="LITERAL"> wait_for_banner</tt> option is true, the filter will wait until it determines that the banner page has been completely printed before carrying out other filter functions.</p> <p>Pagecounts are used to do accounting and report the number of pages used for a job. Most printer have a hardware based pagecounter mechanism whose value can be read by the appropriate PJL command or PostScript program. For example, if the PJL INFO command</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL INFO PAGECOUNT </pre> </div> is supported by a printer, the printer will return a status message containing the current pagecounter value. Printers that support PostScript may also be able to access the pagecounter value using a PostScript program. The exact details of the PostScript program vary from vendor to vendor and the <tt class="LITERAL"> pagecount_ps_code=...</tt> option specifies the PostScript program to use. For example: <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pagecount_ps_code= /p {print} def ( %%[ pagecount: ) p statusdict begin pagecount end 20 string cvs p ( ]%% ) p () = flush </pre> </div> <br> <br> <p>The <b class="APPLICATION">lpd</b> print server and the <b class="APPLICATION">ifhp</b> filter must act in coordination to do reliable pagecounting. The following options are used by the <b class="APPLICATION">ifhp</b> filter to assist with this:</p> <div class="INFORMALTABLE"> <a name="PAGECOUNTOPTIONS"></a> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Option</th> <th align="LEFT" valign="TOP">Purpose</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">accounting=</tt>.../</td> <td align="LEFT" valign="TOP">accounting program</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">accounting_info=AnPR</tt></td> <td align="LEFT" valign="TOP">accounting information</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount@</tt></td> <td align="LEFT" valign="TOP">do not get pagecounter value</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount</tt></td> <td align="LEFT" valign="TOP">get pagecounter using either PJL or PostScript if available on the printer (default)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount=pjl</tt></td> <td align="LEFT" valign="TOP">get pagecounter using PJL</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount=ps</tt></td> <td align="LEFT" valign="TOP">get pagecounter using PostScript</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount_start</tt></td> <td align="LEFT" valign="TOP">get pagecounter at job start (default)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount_end</tt></td> <td align="LEFT" valign="TOP">get pagecounter at job end (default)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount_poll=N</tt></td> <td align="LEFT" valign="TOP">if nonzero, poll printer and conclude pagecounter value is nonzero when identical N times (default 1)</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">pagecount_interval</tt></td> <td align="LEFT" valign="TOP">if polling more than once, then leave this interval (in seconds) between polls.</td> </tr> <tr> <td align="LEFT" valign="TOP"><tt class= "LITERAL">of_options=...</tt></td> <td align="LEFT" valign="TOP">Use these option values when running in OF Mode</td> </tr> </tbody> </table> </div> <br> <br> <p>The following options are used in the <b class= "APPLICATION">LPRng</b> printcap entry to assist with getting the pagecounter values:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: # run at job start :as=/.../accounting_at_start # run at job end :ae=/.../accounting_at_end # -a filter option value or last command line argument :af=/.../acct # default filter :filter=/.../ifhp # of filter - run before and after job, can be suspended # desperation flag for desperate situations #:suspend_of_filter@ :of=/.../ifhp #options :ifhp=...,of_options=pagecount waitend </pre> </div> <br> <br> <p>The <tt class="LITERAL">:as</tt> program is run at the start of a print job, and is used to determine if the user has sufficient resourses to print a job. The <tt class="LITERAL">:ae</tt> program is run at the end of a print job and is used to collect the accounting statistics. The <b class="APPLICATION">ifhp</b> filter will write accounting information to the accounting file specified by the command line <tt class="OPTION">-a</tt> option or the last command line argument. When both the <tt class="LITERAL">:of</tt> filter and normal filters are used together, the accounting information will be nested as shown.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Normal Mode: start '-qProcessID' '-pPagecounter' \ '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo' end '-bPages' '-Telapsed' '-qProcessID' '-pPagecounter' '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo' OF Mode: filestart '-qProcessID' '-pPagecounter' \ '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo' fileend '-bPages' '-Telapsed' '-qProcessID' '-pPagecounter' '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo' Sample Accounting File Entry: start '-q10699' '-p234' '-t2000-05-24-09:27:47.784' \ -Plp -Hh4.private -npapowell filestart '-q10700' '-p234' '-t2000-05-24-09:27:47.784' \ -Plp -Hh4.private -npapowell fileend '-b0' '-T1' '-q10700' '-p235' '-t2000-05-24-09:27:47.863' \ -Plp -Hh4.private -npapowell end '-b1' '-T1' '-q10699' '-p235' '-t2000-05-24-09:27:47.863' -Plp -Hh4.private -npapowell </pre> </div> <br> <br> <p>The format of the information written to the accounting file is controlled by the <tt class="LITERAL"> accounting_info=AHPn</tt> <b class="APPLICATION">ifhp</b> configuration value. If they are present, the specified <b class="APPLICATION">ifhp</b> command line flags are appended to the end of the standard accounting information. The <tt class="LITERAL">accounting=...</tt> option specfies a program to run at then end of the job. This program has all of the accounting information passed as command line options. The program should exit with a 0 exit code otherwise the results are undefined.</p> <p>The printcap <span class="SYMBOL"> :suspend_of_filter</span> controls how the <b class= "APPLICATION">lpd</b> spooler manages the <tt class= "LITERAL">of</tt> filter. When a file is to be printed normally a special two character suspend message (<tt class="LITERAL">\031\001</tt>) is written to the filter STDIN. When the <b class="APPLICATION">ifhp</b> filter detects this string in the input it is required to suspend itself by sending itself a <tt class="LITERAL"> SIGSUSP</tt> signal. The <tt class="LITERAL"> :suspend_of_filter@</tt> flag causes the <b class= "APPLICATION">lpd</b> process to close the <tt class= "LITERAL">:of</tt> filter rather than suspending it, and to start a new <tt class="LITERAL">:of</tt> filter process when it needs one. This option is used when there can be at most one process communicating with the printer, or when the <b class="APPLICATION">ifhp</b> filter must totally reinitialize the printer at job end.</p> <p>The <tt class="LITERAL">pagecount</tt> option controls if and how the pagecounter value will be fetched. Currently <tt class="LITERAL">pagecount=ps</tt> (PostScript) and <tt class="LITERAL">pagecount=pjl</tt> (PJL) are supported. The <tt class="LITERAL"> pagecount</tt> form will use PJL if it is available otherwise PostScript if it is available. The <tt class= "LITERAL">pagecount@</tt> suppresses pagecount operation. The <span class="SYMBOL">pagecount_start</span> and <span class="SYMBOL">pagecount_end</span> flags control if the pagecounter will be obtained at the start and end of the print job.</p> <p>One of the major problems with getting printcounter values is that the print job must be totally finished or at least have all of its pages run through the paper feed stream when the pagecounter value is reported. Unfortunately, most manufacturers do not provide accurate ways to coordinate the two activities. The <tt class= "LITERAL">waitend</tt> option is used to enable the <b class="APPLICATION">ifhp</b> filter to send special command sequences to the printer which will detect the true end of job, but this may not be possible on many printers.</p> <p>The <tt class="LITERAL">printcounter_poll=N</tt> (default 1) option provides a method to deal with these type of printers. Commands to get the printcounter value are sent to the printer, and repeated at <span class= "SYMBOL">printcap_interval</span> second intervals until the printcounter value has been stable for <tt class= "LITERAL">N</tt> readings.</p> <p>The PJL TEOJ (True End Of Job) command has been used with only limited success to force End of Job reporting only when the job has finished. This can be sent to the printer during PJL initialization but specifying it as one of the PJL initialization strings:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_init=[ ... teoj ... ] pjl_teoj=@PJL TEOJ=ON </pre> </div> <br> <br> <p>The <a href="#OFOPTIONS"><span class="SYMBOL"> of_options</span></a> are used to modify the actions of the <b class="APPLICATION">ifhp</b> filter when it is running in OF Mode.</p> <p>The <span class="SYMBOL">pagecount_start</span> and <span class="SYMBOL">pagecount_end</span> (both default to TRUE or ON) control if pagecounter values are obtained at the start or end respectively of the job.</p> <p>The pagecount request is sent to the printer every <tt class="LITERAL">pagecount_interval=nnn</tt> second intervals; if nnn is 0, then it is sent only once. If no pagecount value is obtained within <tt class="LITERAL"> pagecount_timeout=nnn</tt> seconds then the filter exits with an error.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="PJLINIT">7.5. PJL Initialization</a></h1> <ul> <li> <p><tt class="LITERAL">pjl_init</tt> emphasis/pjl initialization/</p> </li> <li> <p><tt class="LITERAL">startpage=</tt> emphasis/ start page to print/</p> </li> <li> <p><tt class="LITERAL">endpage=</tt> emphasis/ end page to print/</p> </li> <li> <p><tt class="LITERAL">pjl_only</tt> emphasis/pjl commands supported/</p> </li> <li> <p><tt class="LITERAL">pjl_except</tt> emphasis/pjl commands not to be used/</p> </li> <li> <p><tt class="LITERAL">pjl_vars_set</tt> emphasis/pjl variables supported/</p> </li> <li> <p><tt class="LITERAL">pjl_vars_except</tt> emphasis/pjl variables not to be used/</p> </li> <li> <p><tt class="LITERAL">pjl_user_opts</tt> emphasis/pjl options available to user/</p> </li> </ul> <p>If a printer supports PJL, the many printer operations can be initiated and controlled using PJL commands. Unfortunately, not all printers support the same set of commands. In addition, not all printers support the same set of operations or options. A PJL command has the form:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL COMMAND OPTION OPTION ... </pre> </div> A PJL variable is set using: <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL SET <i class="EMPHASIS">var</i> = <i class= "EMPHASIS">value</i> ... </pre> </div> The <tt class="LITERAL">pjl_only=[ ... ]</tt>, <tt class= "LITERAL">pjl_except=[ ... ]</tt>, <tt class="LITERAL"> pjl_vars_set=[ ... ]</tt>, and <tt class="LITERAL"> pjl_vars_except=[ ... ]</tt> options are used to control which PJL commands and which PJL variables can be set. The <span class="SYMBOL">pjl_only</span> variable lists the commands supported by the printer, and the <span class="SYMBOL">pjl_except</span> lists commands <i class= "EMPHASIS">not</i> supported by the printer. Before sending a PJL command, the <b class="APPLICATION"> ifhp</b> filter checks to make sure that the command name is in <span class="SYMBOL">pjl_only</span> and not in <span class="SYMBOL">pjl_except</span>. If the tests fail, then tne command is not sent.<br> <br> <p>Similarly, when sending a command to set a PJL variable, the <span class="SYMBOL">pjl_vars_set</span> and <span class="SYMBOL">pjl_vars_except</span> lists are checked to determine if the variable name is in <span class="SYMBOL">pjl_vars_set</span> and not in <span class="SYMBOL">pjl_except</span> list. If the tests fail, then tne command is not sent.</p> <p>If PJL is enabled, then the following actions are taken.</p> <ol type="1"> <li> <p>PJL Universal Exit Language (UEL) <tt class= "LITERAL">\033%-12345X</tt> is sent to the printer.</p> <p>This is required to ensure that the following PJL commands are accepted.</p> </li> <li> <p>PJL JOB command is sent at the start of job. The JOB command can be used to select pages or impressions to be printed. If the <tt class= "LITERAL">-Zstartpage=nnn</tt> or <tt class= "LITERAL">-Zendpage=mmm</tt> option is present, then the PJL JOB command has the form:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL JOB START=nnn END=mmm </pre> </div> <br> <br> </li> <li> <p>The <tt class="LITERAL">pjl_init=[ ... ]</tt> value option is expanded using the PJL (<tt class= "LITERAL">"pjl_"</tt>) language context as described above.</p> </li> <li> <p>The <tt class="LITERAL">-Toption=value</tt>s and <tt class="LITERAL">-Zoption=value</tt>s are scanned for matching option names in the <tt class="LITERAL"> pjl_user_opts=[ ... ]</tt> list. If they are found, then the options are recursively evaluated in the PJL language context. The expansion algorithm will cause the option value to be used to set PJL variables. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> Configuration: pjl_vars_set=[ OUTBIN AUTOSELECT JAM=YES ] Command ifhp -Zoutbin=upper,autoselect,jam PJL command generated: @PJL SET OUTBIN=UPPER @PJL SET AUTOSELECT=ON @PJL SET JAM=YES </pre> </div> <br> <br> </li> </ol> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="FILECONVERSION">7.6. File Conversion Support</a></h1> <ul> <li> <p><tt class="LITERAL">forceconversion</tt> FLAG emphasis/force use of file utility /</p> </li> <li> <p><tt class="LITERAL">default_language</tt> emphasis/default job language /</p> </li> </ul> <p>The <tt class="COMMAND">lpr -l</tt> or <tt class= "COMMAND">lp -b</tt> flags indicate that the spooled files are not to be processed by an output file. The <b class="APPLICATION">LPRng</b> spooler recognizes this option and passes the <tt class="OPTION">-c</tt> command line option to suppress any language specific processing for files.</p> <p>However, many PostScript printers cannot handle text files, and produce many hundreds of pages of garbage output if they are sent to the printer without being translated into PostScript, and some printers require language specific setup in order to print PCL, PostScript or text files correctly.</p> <p>The <b class="APPLICATION">ifhp</b> filter has builtin tests for PJL, PCL, and PostScript files. These tests are almost identical to those used by many printers which do <i class="EMPHASIS">autodetection</i>. If you need to recognize a wider range of file types, you can configure <b class="APPLICATION">ifhp</b> to use the UNIX <tt class="LITERAL">file</tt>(1) program.</p> <p>Finally, some printers have a very specialized job format that requires conversion to by a <tt class= "LITERAL">rasterizer</tt> program. This is handled as detailed in the following sections.</p> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="FILE-UTIL-PATH">7.6.1. File Type Detection</a></h2> <ul> <li> <p><tt class="LITERAL">file_util_path</tt> emphasis/file utilty path /</p> </li> </ul> <p>The <b class="APPLICATION">ifhp</b> filter has a set of built-in tests to determine if the input job file is PJL, PostScript, and PCL, or (default) text, and flags the file with language types <tt class="LITERAL"> pjl</tt>, <tt class="LITERAL">ps</tt>, <tt class= "LITERAL">pcl</tt>, and <tt class="LITERAL">text</tt> respectively.</p> <p>You can also use the UNIX <a href="#FILEUTIL">file utility</a> utility to determine type as well. The <tt class="LITERAL">file</tt> utility is invoked with it <span class="ACRONYM">STDIN</span> attached to the file and <b class="APPLICATION">ifhp</b> uses the information it writes to <span class="ACRONYM"> STDOUT</span> as the raw file type. The <b class= "APPLICATION">ifhp</b> program will convert the output to lowercase, remove multiple whitespace characters, and replace the remaining whitespace characters with underscores <span class="SYMBOL">_</span>.</p> <p>By default, <b class="APPLICATION">ifhp</b> will first try to use its builtin tests and then will use the <tt class="LITERAL">file</tt> utility. You can set the <span class="SYMBOL">force_conversion</span> flag to force <b class="APPLICATION">ifhp</b> to only use the <tt class="LITERAL">file</tt> utility. The following shows the information in the <tt class= "FILENAME">ifhp.conf</tt> file used to configure the file type detection.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ## default default_language=text ## force only use of file program ## default is to let ifhp try first, then try file forceconversion@ ## file utility path file_util_path=/usr/bin/file - </pre> </div> <br> <br> <p>The output of the file utility is converted to lower case and used as the language type for further processing.</p> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="CONVERSION">7.6.2. Conversion</a></h2> <ul> <li> <p><tt class="LITERAL">file_output_match=</tt> TABLE emphasis/file utility output match list /</p> </li> <li> <p><tt class="LITERAL">language=</tt> emphasis/language type override /</p> </li> </ul> <p>Once the language type has been determined, the <b class="APPLICATION">ifhp</b> filter then decides if a conversion program needs to be run and will convert the input file to a required file type. This activity is controlled by the <span class="SYMBOL"> file_output_match</span> table.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> file_output_match = [ *postscript* ps \%s{ps_converter} *pcl* pcl \%s{pcl_converter} *pjl* pjl \%s{pjl_converter} *printer*job*language* pjl *text* pcl \%s{pcl_converter} *gzip_compressed* filter \%s{gzip_decompresser} ] </pre> </div> Each line of the <span class="SYMBOL"> file_output_match</span> table contains a (URL encoded) <i class="EMPHASIS">glob</i> pattern, the language type (<tt class="LITERAL">ps</tt>, <i class="EMPHASIS"> pcl</i>, etc.) produced by the conversion program, and the (optional) conversion program.<br> <br> <p>The format:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> file_output_match = </pathname </pre> </div> <br> <br> <p>will cause <b class="APPLICATION">ifhp</b> to open and read the specified file for the <span class= "SYMBOL">file_output_match</span> table. The file's contents must have the same format as the <span class= "SYMBOL">file_output_match</span> table but without the <tt class="LITERAL">[</tt> or <i class="EMPHASIS">]</i> delimiters.</p> <p>The <span class="SYMBOL">file_match_table</span> is scanned from first to last entry for a <tt class= "LITERAL">glob</tt> pattern that matches the file type determined by the <b class="APPLICATION">ifhp</b> program or the output of the <span class="SYMBOL"> file_util_path</span> program. If no match is found, then the language is set to the <span class="SYMBOL"> default_language</span> value.</p> <p>The output language of the conversion program is set to the second entry. The conversion program will be run with its STDIN set to the input file and its STDOUT used as the converted output. If there is no conversion program then the original file is used and only the language type is modified.</p> <p>The <tt class="LITERAL">filter</tt> language type causes the specified conversion program to be run and then the output of the program to be reprocessed. As shown above, this allows file decompression routines to be used to expand the files.</p> <p>The following are some short samples of what can be done with the conversion facility.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> gs_device=epsonc gs_options=-r1440 gs=/usr/bin/gs gs_converter= [ \%s{gs} -dBATCH -q -sOutputFile=- \ -sDEVICE=\%s{gs_device} \%s{gs_options} - ] text_converter= [/usr/bin/a2ps -q -B -1 -M Letter \ --borders=no -o- \%s{ps_converter} ] gzip_decompresser = [ /usr/bin/gzip -c -d ] [ ghostscript gs ] file_output_match = [ *postscript* ps \%s{ps_converter} *text* pcl \%s{pcl_converter} *gzip_compressed* filter \%s{gzip_decompresser} ] Printcap entry: pr: :ifhp=model=ghostscript,gs_device=laserjet,gs_options=-r300x300 </pre> </div> <br> <br> <p>In this example, we have shown a very interesting device - the GhostScript device. We use the <tt class= "LITERAL">gs</tt> (GhostScript) program to do the conversion, and specify the <span class="SYMBOL"> gs_device</span> and <span class="SYMBOL"> gs_options</span> values in the printcap entry. There are a few details that should be observed when using this facility.</p> <ol type="1"> <li> <p>The output from the <tt class="LITERAL"> file</tt> program has spaces converted to underscores. If you need to match spaces then use the underscore in the pattern. For example, <tt class="LITERAL">ascii text</tt> would be matched by <i class="EMPHASIS">*ascii_text*</i>.</p> </li> <li> <p>If the conversion program contains a shell meta character such as <tt class="LITERAL">|</tt>, <tt class="LITERAL">;</tt>, <tt class="LITERAL"> ></tt>, <tt class="LITERAL"><</tt>, etc, then it will be executed using <tt class="LITERAL"> /bin/sh -c 'command'</tt>. This allows a pipe of conversion commands to be constructed. This is discussed in detail below.</p> </li> <li> <p>The most commonly used conversion programs are <a href="#GHOSTSCRIPT">GhostScript</a>, used to convert PostScript to a format compatible with a non-PostScript printer, and the <a href="#A2PS"> a2ps</a>, <a href="#ENSCRIPT">enscript</a>, and <a href="#TEXTPS">textps</a> Text to PostScript conversion programs which convert text into PostScript for a non-text supporting printer. The use of a <tt class="LITERAL">wrapper</tt> program with these utilities is discussed below.</p> </li> <li> <p>All of the command line options can be substituted on the command line using <tt class= "LITERAL">\%{X}</tt>, where <i class="EMPHASIS"> X</i> is the single letter command line option flag.</p> </li> <li> <p>The <tt class="LITERAL">\%s{ARGV}</tt> value is replaced by the command line arguments.</p> </li> <li> <p>The conversion program must exit with a 0 error code or an error is assumed to have occurred.</p> </li> </ol> <br> <br> <p>The <tt class="LITERAL">enscript</tt> program will exit with a non-zero error codes even for successful conversions and we need to use a <tt class="LITERAL"> wrapper</tt> script that will run them and then return the correct error code as shown below.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh # /usr.../wrapper path [options] # wrapper script for a2ps, enscript and others # path is the path to the program and options are the # options to pass. The program is run and then the exit # code is corrected "$@" status=$? case "$status" in 1 ) exit $status ;; esac exit 0 </pre> </div> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="CRLF">7.6.3. LF to CR/LF Conversion</a></h2> <ul> <li> <p><tt class="LITERAL">crlf</tt> FLAG emphasis/LF to CR-LF conversion/</p> </li> </ul> <p>When processing <tt class="LITERAL">text</tt> or <i class="EMPHASIS">pcl</i> files, the <tt class= "LITERAL">crlf</tt> option will enable translation of LF (<tt class="LITERAL">\n</tt>) to CR/LF (<i class= "EMPHASIS">\r\n</i>) sequences. If you are using <b class="APPLICATION">ifhp</b> to simply do LF to CR/LF translation, then you can use:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ifhp -Tcrlf </pre> </div> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="AEN3212">7.6.4. Text Treated Like PCL</a></h2> <p>Text is simply PCL with no special formatting codes. However, you will still need to send the PCL initialization strings to the printer. You can do this by using the following entry in the <span class= "SYMBOL">file_output_match</span> table:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> file_output_match = [ *text* pcl ] </pre> </div> <br> <br> </div> <div class="SECT2"> <hr> <h2 class="SECT2"><a name="AEN3218">7.6.5. Default to Passthrough</a></h2> <p>Your printer may be capable of handling a wide variety of job formats. If you want to simply pass through files of unknown type or language then use the following entry in the <span class="SYMBOL"> file_output_match</span> table:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> file_output_match = [ * raw ] </pre> </div> <br> <br> </div> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="GHOSTSCRIPTCONFIG">7.7. GhostScript Printer</a></h1> <p>Generating a raster image from a PostScript or PCL file in a timely manner requires a high speed processor and substantial amounts of memory. Many of the low cost printers require the user's system to do the raster conversion, and a raster file is then transferred to the printer. These files are usually in a proprietary format. The <a href="#GHOSTSCRIPT">GhostScript</a> program can process PostScript files and produce raster output for a wide range of devices. See the GhostScript documentation for details. Some printers have PCL support but do not support PostScript. The <tt class="LITERAL">gs</tt> and <tt class="LITERAL">pcl_gs</tt> printer configuration support these printers.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # PRINTER ghostscript - Printer with GhostScript conversion to raster files gs_converter= [ /usr/bin/gs -dSAFER -dBATCH -q -sOutputFile=- -sDEVICE=\%s{gs_device} \%s{gs_options} - ] text_converter= [ /usr/bin/a2ps -q -B -1 -M Letter --borders=no -o- ] [ ghostscript gs ] pcl@ pjl@ ps text@ file_output_match = [ # PostScript to Raster *postscript* raw \%s{gs_converter} # text to PostScript to Raster conversion *text* filter \%s{text_converter} ] # PRINTER pcl_gs - PCL Printer with GhostScript conversion to raster files [ pcl_gs ] pcl pjl@ ps text@ file_output_match = [ # PostScript to Raster *postscript* raw \%s{gs_converter} *pcl* pcl # text to PostScript to Raster conversion *text* filter \%s{text_converter} ] </pre> </div> <br> <br> <p>The <tt class="LITERAL">\%s{gs_device}</tt> and <tt class="LITERAL">\%s{gs_options}</tt> parameters can now be specified in the printcap. The following shows a typical printcap entry for use with this entry.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # force clients (lpr, lpq, to use server) lp:lp=lp@serverhost # server information lp:server :sd=<i class="EMPHASIS">spooldir</i> :lp=/dev/lpt0 :... :ifhp=model=gs,gs_device=epson,gs_options=-r240x72 #path to ifhp filter :filter=/.../ifhp </pre> </div> <br> <br> <p>The <b class="APPLICATION">ifhp</b> configuration entry uses GhostScript to do the rasterization of the PostScript file, and the <tt class="LITERAL">a2ps</tt> program to do a text to PostScript conversion.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="LANGUAGEINIT">7.8. Language Specific Initialization</a></h1> <ul> <li> <p><tt class="LITERAL">ps_init=</tt> <i class= "EMPHASIS">PostScript initialization steps</i></p> </li> <li> <p><tt class="LITERAL">pcl_init=</tt> <i class= "EMPHASIS">PCL initialization steps</i></p> </li> </ul> <p>After determining the output file language type, language specific operations are then carried out by expanding the <span class="SYMBOL">language_</span><tt class="LITERAL">_init=[ ... ]</tt> options in the language context, and then the options in the <tt class= "LITERAL">-Toption=value</tt> and <tt class="LITERAL"> -Zoption=value</tt> command line options. The <tt class= "OPTION">-T</tt> options are expanded before the <tt class="OPTION">-Z</tt>, allowing the <tt class="OPTION"> -Z</tt> actions to override any set by the <tt class= "OPTION">-T</tt> actions.</p> <p>As mentioned elsewhere, the reason for the language specific processing is to allow different actions for the same command line option, depending on the file type that is being processed. For example, when processing a PCL file it might be necessary to send PCL command strings and when processing a PostScript file, you would need to send PostScript commands.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="FILETRANSFER">7.9. File Transfer and Error Status Monitoring</a></h1> <ul> <li> <p><tt class="LITERAL">logall</tt> FLAG emphasis/log all printer status/</p> </li> <li> <p><tt class="LITERAL">pjl_error_codes</tt> TABLE <i class="EMPHASIS">PJL error code translations</i></p> </li> <li> <p><tt class="LITERAL">pjl_quiet_codes</tt> TABLE <i class="EMPHASIS">ignore these PJL error codes</i></p> </li> <li> <p><tt class="LITERAL">pjl_alert_codes</tt> TABLE <i class="EMPHASIS">alert operation on these PJL error codes</i></p> </li> <li> <p><tt class="LITERAL">pjl_alert_handler</tt> TABLE <i class="EMPHASIS">program to alert operator</i></p> </li> </ul> <p>If the printer can return status, i.e., the <tt class= "LITERAL">status</tt> option is on, the filter will read status information from the printer.</p> <p>If the <tt class="LITERAL">logall</tt> flag is SET, then all error messages will be written to the status or log file.</p> <p>If the printer is returning PJL status information, then this has a specific format:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> @PJL UINFO DEVICE CODE=nnnn DISPLAY="value" ... @PJL UINFO JOB START ... @PJL UINFO JOB END ... </pre> </div> <br> <br> <p>The <b class="APPLICATION">ifhp</b> program will extract the <span class="ACRONYM">CODE</span> and job start and end flags, and log these as appropriate.</p> <p>Unfortunately, some PJL based printers are extremely verbose in their generation of status messages. In order to reduce the amount of logging of redundant information, <b class="APPLICATION">ifhp</b> will only record when a device status has <i class="EMPHASIS">changed</i>, rather than when it has been reported.</p> <p>The pjl_quiet_codes=[ code code code ] value is used to suppress reporting of selected error codes. If the error code is in the pjl_quiet_codes list, then the error status will not be reported to the user unless the <tt class="LITERAL">logall</tt> option is set. The list of values are used as <i class="EMPHASIS">glob</i> patterns. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_quiet_codes=[ 10000 10001 10003 10023 10024 35078 41* ] </pre> </div> <br> <br> <p>Also, there may be error codes which does not have a builtin error message available. New messages can be added using the <span class="SYMBOL"> pjl_error_codes</span> option. Its value is a list of lines, each line consisting of an error code followed by the corresponding error message:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_error_codes=[ code=msg code=msg ... ] Example: pjl_error_codes=[ 10000=powersave mode 10001=Ready Online 10002=Ready Offline 10003=Warming Up 10004=Self Test 10005=Reset ] </pre> </div> <br> <br> <p>Finally, there are codes or classes of codes that require operator intervention. These are specified using the <span class="SYMBOL">pjl_alert_codes</span>, and the <span class="SYMBOL">pjl_alert_handler</span> program will be invoked to send them to the appropriate destination. The formated error message will be available on STDIN for the handler. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> pjl_alert_codes=[ 41* 42* 23* ] pjl_alert_handler=/usr/local/libexec/filters/alert_handler </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="WAITEND">7.10. End of Job</a></h1> <ul> <li> <p><tt class="LITERAL">waitend</tt> OPTION emphasis/wait for job completion status/</p> </li> <li> <p><tt class="LITERAL">waitend_interval=</tt> emphasis/query for end at this interval/</p> </li> <li> <p><tt class="LITERAL">waitend_ctrl_t_interval=</tt> emphasis/send CTRL-T at this interval/</p> </li> </ul> <p>The <tt class="LITERAL">waitend</tt> option controls the job termination sequence. By default, this will do the same work as the <tt class="LITERAL">sync</tt> operation, and the option takes the same set of values.</p> <p>If <tt class="LITERAL">waitend</tt> is suppressed using <tt class="LITERAL">waitend@</tt>, then as soon as a job has been transferred, the next step, <tt class= "LITERAL">pagecount</tt>, will be attempted. If the print job has not finished at this point, then erroneous page counts will be reported.</p> <p>When using the <tt class="LITERAL">appsocket</tt> protocol, then suppressing <tt class="LITERAL"> waitend</tt> will cause no error messages from the printer to be reported.</p> <p>Some printers do not have a True End Of Job reporting capability using PJL. This means that the job will be reported as done, but paper is still moving through the print engine. If you try to get pagecounts at this point you will get the wrong value. An alternative method is to set <tt class="LITERAL">waitend=ps</tt> and The <tt class="LITERAL">end_ctrl_t=word:word:...</tt> This will cause a CONTROL-T to be sent to the printer, a PostScript convention that will cause the PostScript interpreter to return the actual printing status. In most printers this will be <tt class="LITERAL">printing</tt> or something other than <tt class="LITERAL">idle</tt> or <i class= "EMPHASIS">busy</i> as long as paper is moving in the print engine. When status is returned, the words in the <tt class="LITERAL">end_ctrl_t=word:word:...</tt> list value are examined for a match. If the status word is present then the end of job condition is assumed.</p> <p>The <span class="SYMBOL">waitend_interval</span> value controls how often the waitend operation is repeated. This is usually set to a fairly large value, as it is normally used only to recover from printer failures such as users turning the printer on and off.</p> <p>The <span class="SYMBOL"> waitend_ctrl_t_interval</span> controls how often the printer is queried for status using CTRL-T and is usually set to a short (2 or 3 second) value.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="APPSOCKET">7.11. Tektronix Phaser, QMS and AppSocket Support</a></h1> <ul> <li> <p><tt class="LITERAL">appsocket</tt> FLAG emphasis/connect to printer and use AppSocket Protocol/</p> </li> </ul> <p>The <tt class="LITERAL">appsocket</tt> flag is used to specify that data transfer will be done using the <a href="#APPSOCKETPC">AppSocket</a> protocol. The <b class= "APPLICATION">ifhp</b> filter will open a connection to the ip address and port specified by the <tt class= "LITERAL">dev=host%port</tt> option and carry out the various operations that it needs to do.</p> <p>Rather than closing a connection, <b class= "APPLICATION">ifhp</b> will <i class="EMPHASIS"> half-close</i> it, that is the <tt class="FUNCTION"> shutdown()</tt> system call is used to to close the connection for transmission but leave it open for receiving. The printer will send status information until the job is completed, and then close the connection.</p> <p>If page count information is needed, the <b class= "APPLICATION">ifhp</b> filter will then reopen the connection and get the page count information.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN3361">Chapter 8. Banners and OF Mode Operation</a></h1> <p>One of the more difficult administrative issues is whether to print banners (job separators) or to save the large amount of wasted paper, time and effort. The <b class="APPLICATION">LPRng</b> and <b class="APPLICATION"> ifhp</b> combination provide a rather esoteric set of methods to generate banners, at least one of which should be suitable for your application.</p> <p>You should be aware that some printers have the obnoxious habit of generating their own banner pages when jobs are transferred via the RFC1179 protocol. You should consult the manufacturers documentation and take the necessary steps to turn printer banner page generation off. It may turn out that this is impossible to do, and in that case the only option is to use the Socket or Appsocket connection methods.</p> <p>By the original BSD print spooler, the <tt class= "LITERAL">:of</tt> print filter was responsible for banner generation. The print server would send it a <i class= "EMPHASIS">magic string</i> that the filter would recognize as a <i class="EMPHASIS">print a banner</i> request, and it would then generate a banner. After this, another special <tt class="LITERAL">magic cookie</tt> string, the character sequence <tt class="LITERAL">0x19,0x01</tt>, was sent to cause the <tt class="LITERAL">:of</tt> filter to suspend itself. This allowed the print spooler to hold the connection to the printer open while it started another filter to transfer a file. Finally, after all the jobs were sent the <tt class="LITERAL">:of</tt> filter was sent a <span class="ACRONYM">SIGCONT</span> signal to wake up and perform whatever closing operations were necessary.</p> <p>This mixing of functionality causes horrible problems when special setup strings must be sent to printers in order to configure them for various operation. In order to avoid these problems, the banner printing and filter functions have been separated in the <b class= "APPLICATION">ifhp</b> filter. If a banner is needed, then <b class="APPLICATION">LPRng</b> will use a special banner generating program to generate the banner. The output of this program is then sent to the <tt class="LITERAL"> :of</tt> filter, or directly to the printer if there is no <tt class="LITERAL">:of</tt> filter.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3381">8.1. No Banner</a></h1> <p>Here is a typical printcap entry when banner printing is not wanted:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :sh :filter=/.../ifhp </pre> </div> <br> <br> <p>The <tt class="LITERAL">:sh</tt> (suppress headers or banners) explicitly disables banner printing, and the <b class="APPLICATION">lpd</b> server will not even attempt to print a banner.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3389">8.2. Banner Printing and No OF Filter</a></h1> <p>This printcap entry specifies a banner generator program and and banner generation. There is no <tt class= "LITERAL">:of</tt> filter specified, so the banner is sent directly to the printer. In such a case the banner printing program should make sure that it generates output with the appropriate set of initialization strings. The <tt class="LITERAL">pclbanner</tt>, <tt class="LITERAL">psbanner</tt>, and <tt class="LITERAL"> lpbanner</tt> programs produce PCL, PostScript, and text banners suitable for a wide range of printers. The code for these banner generators is part of the <b class= "APPLICATION">LPRng</b> distribution.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :bp=/.../pclbanner :of=/.../ifhp :filter=/.../ifhp # or :bp=/.../psbanner :of=/.../ifhp :filter=/.../ifhp # or :bp=/.../lpbanner :of=/.../ifhp :filter=/.../ifhp </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3399">8.3. Banner Printing With OF Filter</a></h1> <p>Finally, we may want banner printing together with the <tt class="LITERAL">:of</tt> filter. This is usually the case when we need to perform special printer setups or require the <b class="APPLICATION">ifhp</b> filter to do accounting. In this case we need to make sure that the banner page is counted as part of the job:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :bp=/.../pclbanner <i class= "EMPHASIS">or</i> :bp=/.../psbanner <i class= "EMPHASIS">or</i> :bp=/.../lpbanner :of=/.../ifhp :filter=/.../ifhp </pre> </div> <br> <br> <p>When invoked as an <tt class="LITERAL">:of</tt> filter, the <b class="APPLICATION">lpd</b> server passes a <tt class="OPTION">-Fo</tt> option on the command line, so that the <b class="APPLICATION">ifhp</b> filter knows what mode it is operating in.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3413">8.4. <b class= "APPLICATION">LPRng</b> Options Controlling Banner Printing</a></h1> <p>The <tt class="COMMAND">lpr -h</tt> (no header or banner) option suppresses putting <i class="EMPHASIS"> banner name</i> (<tt class="LITERAL">L</tt> line) into the control file. The <b class="APPLICATION">LPRng</b> <span class="SYMBOL">:ab</span> (always banner) overrides this, and will print a banner using the user name information. The <tt class="LITERAL">:sh</tt> (suppress header) option will override everything and prevent banners from being generated.</p> <p>Banners are generated by the <tt class="LITERAL"> :bp=/...</tt> (banner program) program; different banners at start and end can be generated by using the <tt class= "LITERAL">:bs=/...</tt> (banner start) and <tt class= "LITERAL">:be=/...</tt> (banner end) options, which override the <tt class="LITERAL">:bp=</tt> option.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="OFOPTIONS">8.5. of_options option</a></h1> <p>This option, usually used on the command line or in the <tt class="LITERAL">printcap</tt> file as part of the <tt class="LITERAL">:ifhp</tt> information, specifies a set of options to use when the filter is running in OF mode. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lp: :ifhp=sync@,pagecount@,waitend@,of_options=sync pagecount waitend :filter=/usr/local/libexec/filtes/ifhp :of=/usr/local/libexec/filtes/ifhp same as: lp: :filter=/usr/local/libexec/filtes/ifhp -Tsync@,pagecount@,waitend@ :of=/usr/local/libexec/filtes/ifhp -Tsync,pagecount,waitend </pre> </div> <br> <br> <p>In this printcap entry, the <b class="APPLICATION"> ifhp</b> filter is invoked normally with the <tt class= "LITERAL">sync@</tt>, <tt class="LITERAL">pagecount@</tt> and <tt class="LITERAL">waitend@</tt> options. This causes it to send jobs as fast as possible to the output device and only monitor the device for error status. The <tt class="LITERAL">of=</tt> entry causes the <b class= "APPLICATION">lpd</b> print spooler to start <b class= "APPLICATION">ifhp</b> in OF mode, and the <span class= "SYMBOL">of_options</span> are used to override the other ones.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN3444">Chapter 9. Font Download Support</a></h1> <p>For historical reasons, there is support for downloading a font or other file to the printer. A large amount of the necessary operations are now in the <tt class="FILENAME"> ifhp.conf</tt> file.</p> <p>The <span class="SYMBOL">font_download</span> built-in option supports downloading as described below.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3450">9.1. PCL Font Downloading</a></h1> <p>The following shows the a typical <tt class= "FILENAME">ifhp.conf</tt> file which has PCL font downloading enabled.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # # Fonts and Font Downloading # fontid is used to set the current font pcl_init=[ ... font ... ] # combination command pcl_font=[ delete_fonts font_id font_download font_primary ] # font control # font_op=0 pcl_font_op=\033*c\%{font_op}F pcl_delete_fonts=\033*c0F font_id=1 pcl_font_id=\033*c\%{font_id}D # set primary font font_primary=1 pcl_font_primary=\033(\%{font_primary}X # font directory pcl_fontdir=/usr/local/lib/fonts #default font file font=c1201b.10 </pre> </div> <br> <br> <p>To allow users to download a font and have it set up for PCL use, the <span class="SYMBOL">pcl_init</span> option should include the <tt class="LITERAL">font</tt> option in an appropriate position in the initialization sequence. As shown above, this will get expanded into the <span class="SYMBOL">pcl_delete_fonts</span>, <span class="SYMBOL">pcl_font_id</span>, <span class="SYMBOL"> pcl_font_download</span> (which is has built-in support), and the <span class="SYMBOL">pcl_font_primary</span> options, which are expanded in order.</p> <p>The <span class="SYMBOL">pcl_font_download</span> is supported by the builtin operation which will find the <span class="SYMBOL">pcl_fontdir</span> directory value and a value for the <tt class="LITERAL">font</tt> variable, using values from the <tt class="OPTION"> -Z</tt> and <tt class="OPTION">-T</tt> and configuration information in that order. If no <tt class="LITERAL"> font</tt> value is found, no font will be downloaded. For example:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lpr -Tfont=font1,font2 </pre> </div> <br> <br> <p>When the <span class="SYMBOL">pcl_font_download</span> option is expanded, it will generate the pathnames <tt class="FILENAME">/usr/local/lib/fonts/font1</tt> and <tt class="FILENAME">/usr/local/lib/fonts/font2</tt>, open these files, and send their contents directly to the printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3476">9.2. PS Font Downloading</a></h1> <p>PostScript font downloading is supported in a similar manner to PCL font downloading.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # # Fonts and Font Downloading # ps_init=[ ... font ... ] # combination command pcl_font=[ font_download ] # font directory ps_fontdir=/usr/local/lib/fonts #default font file font=font.ps.10 </pre> </div> <br> <br> <p>In a similar manner to the PCL font downloading, when the <span class="SYMBOL">ps_init</span> list is expanded, the <span class="SYMBOL">ps_font</span> entry will be expanded in turn. If the <tt class="LITERAL"> -Zfont=ZapDingbat.ps</tt> is specified, then the <tt class="FILENAME">/usr/local/lib/fonts/ZapDingbat.sp</tt> file will be opened and downloaded to the printer.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3486">9.3. PJL File Downloading</a></h1> <p>In a similar manner to the above font downloading, you can specify a configuration or other setup file that should be sent to the printer as part of the PJL setups. The following configuration shows how to set this up.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # # PJL Initialization File Downloading # fontid is used to set the current font pjl_init=[ ... setup ... ] setup=initval font=\%s{setup} # setup directory pjl_fontdir=/usr/local/lib/fonts pjl_setup=[ font_download ] </pre> </div> <br> <br> <p>The above configuration will cause the value of the <tt class="LITERAL">setup</tt> <tt class="OPTION"> -Z</tt>, <tt class="OPTION">-T</tt> or configuration option to be used.</p> </div> </div> <div class="CHAPTER"> <hr> <h1><a name="AEN3495">Chapter 10. Debugging and Problem Solving</a></h1> <p>If you are reading this section, then most likely you have had a problem using <b class="APPLICATION">ifhp</b> with <b class="APPLICATION">LPRng</b>. Before going any further, please read <a href="#RFC1179PC">RFC1179 (BSD or TCP/IP) Job Transfer Printcap Entry</a>, and make sure that your printcap entry has the <span class="SYMBOL"> lpd_bounce</span> flag set. This is the <i class= "EMPHASIS">Most Frequently Asked Question</i> and the <i class="EMPHASIS">Most Frequently Provided Answer</i> on the <b class="APPLICATION">LPRng</b> mailing list.</p> <p>The following section outlines a method to debug problems with the <b class="APPLICATION">ifhp</b> filter. It will make use of some <tt class="LITERAL"> diagnostic</tt> options that are normally not used in a printcap entry. First, let us start with a typical printcap entry and a problem.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lw4: :lp=10.0.0.14%9100 :sd=/var/spool/lpd/%P :ifhp=/usr/local/lib/filters/ifhp Command: lpr -Plw4 -V /etc/motd LPR output: sending job 'papowell@h4+223' to lw4@localhost connecting to 'localhost', attempt 1 connected to 'localhost' requesting printer lw4@localhost sending control file 'cfA223h4.private' to lw4@localhost completed sending 'cfA223h4.private' to lw4@localhost sending data file 'dfA223h4.private' to lw4@localhost completed sending 'dfA223h4.private' to lw4@localhost done job 'papowell@h4+223' transfer to lw4@localhost Version LPRng-3.6.14 </pre> </div> <br> <br> <p>When trying to print to the print queue, the user discovers that no output comes out of the printer. The immediate suspicion is that the filter is not working. You should make sure that the <tt class="LITERAL">lpr</tt> command is actually sending the job to the print queue. You can then use <tt class="LITERAL">lpq</tt> to discover what happened:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # lpq -llll Printer: lw4@h4 'Hp : Laserwriter' Queue: no printable jobs in queue Status: subserver pid 27251 starting at 15:34:09.350 Status: accounting at start at 15:34:09.357 Status: opening device 'h14.private%9100' at 15:34:09.366 Status: printing job 'root@h4+223' at 15:34:09.375 Status: printing data file 'dfA223h4.private', size 3, IF filter 'ifhp' at 15:34:09.376 Status: IF filter finished at 15:34:35.012 Status: printing done 'root@h4+223' at 15:34:35.012 Status: accounting at end at 15:34:35.014 Status: finished 'root@h4+223', status 'JSUCC' at 15:34:35.014 Status: subserver pid 27251 exit status 'JSUCC' at 15:34:35.018 Status: lw4@h4.private: job 'root@h4+223' printed at 15:34:35.020 Status: job 'root@h4+223' removed at 15:34:35.101 Filter_status: accounting at start, pagecount 89696, pages 0 at 15:34:13.304 Filter_status: sending job file at 15:34:13.306 Filter_status: starting transfer at 15:34:13.306 Filter_status: initial job type 'text' at 15:34:13.306 Filter_status: job type 'pcl' at 15:34:13.306 Filter_status: transferring 3 bytes at 15:34:13.308 Filter_status: 100 percent done at 15:34:13.308 Filter_status: finished writing file, cleaning up at 15:34:13.308 Filter_status: sent job file at 15:34:13.308 Filter_status: doing cleanup at 15:34:13.308 Filter_status: getting end using 'pjl job/eoj' at 15:34:13.309 Filter_status: end of job detected at 15:34:33.219 Filter_status: getting pagecount using 'pjl info pagecount' at 15:34:33.219 Filter_status: final pagecount 89697 at 15:34:35.009 Filter_status: accounting at end, pagecount 89697, pages 1 at 15:34:35.010 Filter_status: done at 15:34:35.010 </pre> </div> <br> <br> <p>As you can see from the <tt class="LITERAL">lpq</tt> output, the <tt class="LITERAL">Status</tt> section shows the <b class="APPLICATION">lpd</b> activities and the <span class="SYMBOL">Filter_status</span> section shows what <b class="APPLICATION">ifhp</b> is doing. This is the first line of defence - make sure that the information and errors reported here are for the correct filter.</p> <p>If this does not help, then we will start with the basic filter tests and work our way <i class="EMPHASIS">back</i> to the print server. First, you will need a couple of test files. If you have a PostScript printer, find a simple PostScript file - the <tt class="FILENAME">ellipse.ps</tt> file is included in the <b class="APPLICATION">ifhp</b> distribution in the <span class="ACRONYM">UTILS</span> directory. You will also need a short text file - <tt class="FILENAME">/etc/motd</tt> is usually handy to use.</p> <p>Create the <tt class="FILENAME">/tmp/send</tt> file with the following contents:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh cp /dev/null /tmp/t /usr/local/libexec/filters/ifhp -Tdev=/tmp/t,trace,debug=1 </etc/motd 2>/tmp/trace </pre> </div> <br> <br> <p>This will create the <tt class="FILENAME">/tmp/t</tt> file, run the <b class="APPLICATION">ifhp</b> filter, and put the trace and debugging information into the <tt class= "FILENAME">/tmp/trace</tt> file. Run this command using:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh sh -x /tmp/send </pre> </div> <br> <br> <p>Examine the output in <tt class="FILENAME"> /tmp/trace</tt>. It will look like:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> ifhp 15:46:14.402 [27307] main: Debug '1' ifhp 15:46:14.403 [27307] main: dump <NULL> ifhp 15:46:14.403 [27307] main: Model_id '<NULL>' ifhp 15:46:14.440 [27307] main: scanning Raw for default, then model '<NULL>' ifhp 15:46:14.441 [27307] Select_model_info: id 'default', list->count 1940, model->count 0, init 0 ifhp 15:46:14.448 [27307] Dump_line_list: main: Model information - count 156, max 204, list 0x806e000 ifhp 15:46:14.448 [27307] [ 0]='T=dev=/tmp/g,trace,debug=1' ifhp 15:46:14.448 [27307] [ 1]='banner@' ifhp 15:46:14.448 [27307] [ 2]='banner_file=/usr/local/libexec/filters/psbanner.ps' ifhp 15:46:14.448 [27307] [ 3]='converter=' ifhp 15:46:14.448 [27307] [ 4]='debug=1' ifhp 15:46:14.449 [27307] [ 5]='default_language=text' ifhp 15:46:14.449 [27307] [ 6]='dev=/tmp/g' ifhp 15:46:14.449 [27307] [ 7]='duplex_select=1' </pre> </div> <br> <br> <p>Most of the information with debug level 1 is simply showing the details of options, command execution, and error status. This will, however, help with the majority of problems.</p> <p>You can now modify the <tt class="FILENAME"> /tmp/send</tt> file to better reflect your printer.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh cp /dev/null /tmp/t # substitute your ifhp options here ifhp=model=hp4,status@ /usr/local/libexec/filters/ifhp -Tdev=/tmp/t,trace,debug=1,${ifhp} </etc/motd 2>/tmp/trace </pre> </div> Now run this again and examine the trace and output in <tt class="FILENAME">/tmp/t</tt>. If this looks correct, we move on to the interactive tests.<br> <br> <p>If your printer is a network based printer and you are using RFC1179 transfers, then you can use the following <tt class="LITERAL">lpr</tt> command to send the <tt class= "FILENAME">/tmp/t</tt> file directly to the printer:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> lpr -Ppr@host /tmp/t Example: print queue 'raw' lpr -Praw@10.1.1.1 /tmp/t </pre> </div> <br> <br> <p>This form of the command causes <tt class="LITERAL"> lpr</tt> to send the job directly to the printer. If this works correctly then we know that there is no problem with <b class="APPLICATION">ifhp</b> formatting the file, and that the problem must be with the <b class="APPLICATION"> lpd</b> print spooler.</p> <p>If your printer is network based and uses a socket connection, then you can have <b class="APPLICATION"> ifhp</b> connect to the printer by using the <tt class= "LITERAL">dev=host%port</tt> connection option. This is only used for testing or when you want to use the AppSocket protocol.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh # substitute your ifhp options here # this should always work #ifhp=model=hp4,status@ # this does status checking, no pagecount #ifhp=model=hp4,pagecount@ # this does status checking and pagecount #ifhp=model=hp4 /usr/local/libexec/filters/ifhp -Tdev=10.1.1.1%9100,trace,debug=1,${ifhp} </etc/motd 2>/tmp/trace </pre> </div> <br> <br> <p>If you have a windowing system, run this command from one window and in another window use the <tt class= "COMMAND">tail -f /tmp/trace</tt> command to view status. Most of the time you will discover that the system is failing to print because either the <tt class="LITERAL"> sync</tt>, <tt class="LITERAL">pagecount</tt>, or <tt class="LITERAL">waitidle</tt> step of the printing process is not completing correctly. If there is insufficient detail for you to decide the failure mechanism, set <tt class="LITERAL">debug=3</tt>, or even <tt class="LITERAL"> debug=4</tt> and explore what is happening.</p> <p>If you have a parallel port connected printer on <tt class="FILENAME">/dev/lptxx</tt>, then you can simply use <tt class="COMMAND">cat /tmp/t /dev/lptxx</tt> and see what happens. If this works, then use:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh # substitute your ifhp options here ifhp=model=hp4,status@ /usr/local/libexec/filters/ifhp -Tdev=/dev/lptxxx,trace,debug=1,${ifhp} </etc/motd 2>/tmp/trace </pre> </div> <br> <br> <p>If you have a serial port printer, then you can use a similar method for setting up a connection. You will need to use the undocumented <tt class="LITERAL">stty</tt> option to set the speed and other parameters. These are identical to those used by <b class="APPLICATION"> LPRng</b>, so you should have no problems.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> #!/bin/sh # substitute your ifhp options here # this should always work #ifhp=model=hp4,status@ # this does status checking, no pagecount #ifhp=model=hp4,pagecount@ # this does status checking and pagecount #ifhp="model=hp4,stty= 9600 -parity crtscts raw" stty="9600 -parity crtscts raw" /usr/local/libexec/filters/ifhp -Tdev=/dev/tty00,trace,debug=1,${ifhp},stty=\"${stty}\" </etc/motd 2>/tmp/trace </pre> </div> <br> <br> <p>If all this does not help, then subscribe to the <b class="APPLICATION">LPRng</b> mailing list and ask for help.</p> </div> <div class="APPENDIX"> <hr> <h1><a name="IFHPOPTIONS">Appendix A. Index to Options</a></h1> <p> </p> <div class="TABLE"> <a name="IFHPOPTIONSTABLE"></a> <p><b>Table A-1. <tt class="LITERAL">ifhp.conf</tt> - ifhp Options</b></p> <table border="1" class="CALSTABLE"> <thead> <tr> <th align="LEFT" valign="TOP">Option</th> <th align="LEFT" valign="TOP">Purpose</th> </tr> </thead> <tbody> <tr> <td align="LEFT" valign="TOP"><a href= "#MODELSELECTION"><tt class="LITERAL"> default</tt></a></td> <td align="LEFT" valign="TOP">HP 4M Plus, PostScript, PJL, PCL, status, pagecount support</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#APPSOCKET"> <tt class="LITERAL">appsocket FLAG</tt></a></td> <td align="LEFT" valign="TOP">Use Tektronix AppSocket Protocol</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#CONFIG"><tt class="LITERAL">config=PATHNAMES</tt></a></td> <td align="LEFT" valign="TOP">Configuration file pathnames</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#CRLF"><tt class="LITERAL">crlf FLAG</tt></a></td> <td align="LEFT" valign="TOP">Do LF to CRLF translation</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#CONFIG"><tt class="LITERAL">debug FLAG</tt></a></td> <td align="LEFT" valign="TOP">Debugging level</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#CONVERSION"><tt class="LITERAL"> default_language=LANGUAGE</tt></a></td> <td align="LEFT" valign="TOP">Default job file language (ps, pcl, raw, text, etc)</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">endpage=NNN</tt></a></td> <td align="LEFT" valign="TOP">PJL JOB command END = NNN value</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILECONVERSION"><tt class="LITERAL"> forceconversion FLAG</tt></a></td> <td align="LEFT" valign="TOP">Force conversion using UNIX file(1) utility</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#CONVERSION"><tt class="LITERAL"> file_output_match=LIST</tt></a></td> <td align="LEFT" valign="TOP">File type and conversion matching</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILE-UTIL-PATH"><tt class="LITERAL"> file_util_path=PATHNAME</tt></a></td> <td align="LEFT" valign="TOP">Pathname of the UNIX file(1) utility</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#CONVERSION"><tt class="LITERAL"> language=LANGUAGE</tt></a></td> <td align="LEFT" valign="TOP">Specify job file language to be used (ps, pcl, raw, text, etc)</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILETRANSFER"><tt class="LITERAL">logall FLAG</tt></a></td> <td align="LEFT" valign="TOP">Log all status reports from printer if set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#NULLPAD"> <tt class="LITERAL">nullpad=COUNT</tt></a></td> <td align="LEFT" valign="TOP">Send COUNT nulls to force full buffer condition</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#OPTIONS"> <tt class="LITERAL">model=NAME</tt></a></td> <td align="LEFT" valign="TOP">Specify model name for configuration selection</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#OPTIONS"> <tt class="LITERAL"> model_from_option=X</tt></a></td> <td align="LEFT" valign="TOP">Specify model name using a command line option value</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> pagecount=LANGUAGE</tt></a></td> <td align="LEFT" valign="TOP">Get pagecount using pjl, ps or default</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> pagecount_interval=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">Send pagecount command at SECONDS interval</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> pagecount_ps_code=STRING</tt></a></td> <td align="LEFT" valign="TOP">PostScript code to get pagecount information</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> pagecount_timeout=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">Timeout getting pagecount after SECONDS</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#LANGUAGES"> <tt class="LITERAL">pcl FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supports PCL if set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#PCL-EOJ-AT-START"><tt class="LITERAL"> pcl_eoj_at_start FLAG</tt></a></td> <td align="LEFT" valign="TOP">PCL EOJ (CTRL-D) at start of job</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#LANGUAGEINIT"><tt class="LITERAL"> pcl_init=LIST</tt></a></td> <td align="LEFT" valign="TOP">PCL initializations to be done</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#PCL-USER-OPTS"><tt class="LITERAL"> pcl_user_opts=LIST</tt></a></td> <td align="LEFT" valign="TOP">User PCL options supported</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#LANGUAGES"> <tt class="LITERAL">pjl FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supports PJL if set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILETRANSFER"><tt class="LITERAL"> pjl_alert_codes=LIST</tt></a></td> <td align="LEFT" valign="TOP">alert operator on these PJL error codes</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILETRANSFER"><tt class="LITERAL"> pjl_alert_handler=STRING</tt></a></td> <td align="LEFT" valign="TOP">program to alert operator on PJL error</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#PJL-CONSOLE"><tt class="LITERAL">pjl_console FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supports messages on console</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILETRANSFER"><tt class="LITERAL"> pjl_error_codes=LIST</tt></a></td> <td align="LEFT" valign="TOP">PJL error messages for error codes</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">pjl_except=LIST</tt></a></td> <td align="LEFT" valign="TOP">Do not allow these PJL commands</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">pjl_init=LIST</tt></a></td> <td align="LEFT" valign="TOP">PJL initializations to be done</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJL-JOB"> <tt class="LITERAL">pjl_job FLAG</tt></a></td> <td align="LEFT" valign="TOP">PJL JOB and EOJ supported</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">pjl_only=LIST</tt></a></td> <td align="LEFT" valign="TOP">Allow only these PJL commands</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#FILETRANSFER"><tt class="LITERAL"> pjl_quiet_codes=LIST</tt></a></td> <td align="LEFT" valign="TOP">ignore these PJL error codes</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL"> pjl_user_opts=LIST</tt></a></td> <td align="LEFT" valign="TOP">Allow only these user PJL commands or variables to be set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL"> pjl_vars_except=LIST</tt></a></td> <td align="LEFT" valign="TOP">Do not allow these PJL variables to be set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">pjl_vars_set=LIST</tt></a></td> <td align="LEFT" valign="TOP">Allow these PJL variables to be set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#LANGUAGES"> <tt class="LITERAL">ps FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supports PostScript (ps)</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#PS-EOJ-AT-START"><tt class="LITERAL"> ps_eoj_at_start FLAG</tt></a></td> <td align="LEFT" valign="TOP">PostScript EOJ (CTRL-D) at start of job</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#LANGUAGEINIT"><tt class="LITERAL"> ps_init=LIST</tt></a></td> <td align="LEFT" valign="TOP">PS initializations to be done</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#PS-USER-OPTS"><tt class="LITERAL"> ps_user_opts=LIST</tt></a></td> <td align="LEFT" valign="TOP">Support these PostScript user options</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#REMOVE-CTRL"><tt class="LITERAL"> remove_ctrl=LIST</tt></a></td> <td align="LEFT" valign="TOP">Remove these characters from PostScript jobs</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#PJLINIT"> <tt class="LITERAL">startpage=NNN</tt></a></td> <td align="LEFT" valign="TOP">PJL JOB command START = NNN value</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#STATUS"><tt class="LITERAL">status FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supplies status information</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#STATUSFILE"><tt class="LITERAL"> statusfile=PATHNAME</tt></a></td> <td align="LEFT" valign="TOP">Status file pathname</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#STATUSFILE"><tt class="LITERAL"> statusfile_max=NNN</tt></a></td> <td align="LEFT" valign="TOP">Status file has maximum size of NNN Kbytes</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#STATUSFILE"><tt class="LITERAL"> statusfile_min=NNN</tt></a></td> <td align="LEFT" valign="TOP">Status file has truncated size of NNN Kbytes</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href= "#STATUSFILE"><tt class="LITERAL"> summaryfile=PATHNAME</tt></a></td> <td align="LEFT" valign="TOP">Summary file pathname</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL">sync FLAG</tt></a></td> <td align="LEFT" valign="TOP">Synchronize printer if set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> sync_interval=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">Send synchronization request at SECONDS interval</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#SYNCPAGE"> <tt class="LITERAL"> sync_timeout=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">Timeout synchronization request after SECONDS</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#TBCP"><tt class="LITERAL">tbcp FLAG</tt></a></td> <td align="LEFT" valign="TOP">Use Transparent Binary Communications Protocol for PostScript files</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#LANGUAGES"> <tt class="LITERAL">text FLAG</tt></a></td> <td align="LEFT" valign="TOP">Printer supports text mode</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#CONFIG"><tt class="LITERAL">trace FLAG</tt></a></td> <td align="LEFT" valign="TOP">Put error and trace messages on STDERR if set</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#WAITEND"> <tt class="LITERAL">waitend=METHOD</tt></a></td> <td align="LEFT" valign="TOP">How to wait for printer to end printing</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#WAITEND"> <tt class="LITERAL"> waitend_interval=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">How often to query printer for end of printing</td> </tr> <tr> <td align="LEFT" valign="TOP"><a href="#WAITEND"> <tt class="LITERAL"> waitend_ctrl_t_interval=SECONDS</tt></a></td> <td align="LEFT" valign="TOP">How often to send CTRL-T for end of printing status</td> </tr> </tbody> </table> </div> <br> <br> </div> <div class="APPENDIX"> <hr> <h1><a name="AEN3873">Appendix B. HP JetDirect Card Support</a></h1> <p>The HPJetDirect card or external JetDirect box can be configured through the printer front panel or through a set of network files. Here is a summary of the methods used from UNIX systems, or when you are desperate, to configure the printer.</p> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3876">B.1. MicroSoft JetDirect Support</a></h1> <p>There is limited support from HP for non-MicroSoft configuration tools. However, the tools that are provided are simple and easy to use, especially for the initial configuration.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3879">B.2. TCP/IP Address</a></h1> <p>You can set the TCP/IP address from the front panel. Reset the printer and then use the MENU, +-, SELECT keys as follows:</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> MENU -> MIO MENU (use MENU to display MIO MENU) ITEM -> CFG NETWORK=NO* + -> CFG NETWORK=YES ENTER -> CFG NETWORK=YES* ITEM -> TCP/IP=OFF* (use ITEM to display TCP/IP) + -> TCP/IP=ON ENTER -> TCP/IP=ON* ITEM -> CFG TCP/IP=NO* (use ITEM to display TCP/IP) + -> CFG TCP/IP=YES ENTER -> CFG TCP/IP=YES* ITEM -> BOOTP=NO* (Enable BOOTP if you want to - see below) ITEM -> IP BYTE 1=0* This is IP address MSB byte. Use +- keys to change value, and then ENTER to change Use ITEM keys to get IP BYTE=2,3,4 ITEM -> SM BYTE 1=255* This is the subnet mask value Use +- keys to change value, and then ENTER to change Use ITEM keys to get IP BYTE=2,3,4 ITEM -> LG BYTE 1=255* This is the Syslog server (LoGger) IP address Use +- keys to change value, and then ENTER to change Use ITEM keys to get IP BYTE=2,3,4 ITEM -> GW BYTE 1=255* This is the subnet gateway (router) IP address Use +- keys to change value, and then ENTER to change Use ITEM keys to get IP BYTE=2,3,4 ITEM -> TIMEOUT=90 This is the connection timeout value. It puts a limit on time between connections. A value of 10 is reasonable. </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3884">B.3. Web Server Configuration</a></h1> <p>Many of the newer releases of HP JetDirect firmware have a Web Server configuration capability. Unfortunately, the web pages assume that you have JavaScript support for the browser, and not all of the facilities used are supported by all browsers. However the configuration information and pages presented are extremely simple to use and understand.</p> <p>The major problem with the Web Server configuration is that not all of the options can be set through the Web Server pages.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3888">B.4. Telnet Configuration</a></h1> <p>Once you have assigned an IP address to the JetDirect Box you can telnet to the box and configure it through a simple command line interface. When you first connect to the box, hit <tt class="LITERAL">RETURN</tt> a couple of times, followed by <tt class="LITERAL">?</tt> (Question Mark) <tt class="LITERAL">RETURN</tt> and you should get a simple help menu. This help information usually scrolls off a small (25 line) screen so a buffer that allows you to see all of the information is advisable.</p> <p>The major problem with the telnet configuration is that not all of the options can be set through the command line facilties.</p> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3895">B.5. BOOTP Information</a></h1> <p>If you have a bootp server, you can put this information in the bootptab file. To use this, you must enable the bootp option on the printer. The T144 option specifies a file to be read from the bootp server. This file is read by using the TFTP protocol, and you must have a TFTPD server enabled. Here is a sample bootptab entry.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # Example /etc/bootptab: database for bootp server (/etc/bootpd). # Blank lines and lines beginning with '#' are ignored. # # Legend: # # first field -- hostname # (may be full domain name) # # hd -- home directory # bf -- bootfile # cs -- cookie servers # ds -- domain name servers # gw -- gateways # ha -- hardware address # ht -- hardware type # im -- impress servers # ip -- host IP address # lg -- log servers # lp -- LPR servers # ns -- IEN-116 name servers # rl -- resource location protocol servers # sm -- subnet mask # tc -- template host (points to similar host entry) # to -- time offset (seconds) # ts -- time servers # # Be careful about including backslashes where they're needed. Weird (bad) # things can happen when a backslash is omitted where one is intended. # peripheral1: :hn:ht=ether:vm=rfc1048: :ha=08000903212F: :ip=190.40.101.22: :sm=255.255.255.0: :gw=190.40.101.1: :lg=190.40.101.3: :T144="hpnp/peripheral1.cfg": </pre> </div> <br> <br> <p>If you are using the T144 option, you will need to create the configuration file. The sample configuration file from the HP Direct distribution is included below.</p> <div class="INFORMALEXAMPLE"> <pre class="SCREEN"> # # Example HP Network Peripheral Interface configuration file # # Comments begin with '#' and end at the end of the line. # Blank lines are ignored. Entries cannot span lines. # Name is the peripheral (or node) name. It is displayed on the peripheral's # self-test page or configuration plot, and when sysName is obtained through # SNMP. This name can be provided in the BOOTP response or can be specified # in the NPI configuration file to prevent the BOOTP response from overflowing # the packet. The domain portion of the name is not necessary because the # peripheral does not perform Domain Name System (DNS) searches. Name is # limited to 64 characters. name: picasso # Location describes the physical location of the peripheral. This is the # value used by the interface for the MIB-II sysLocation object. The default # location is undefined. Only printable ASCII characters are allowed. # Maximum length is 64 characters. location: 1st floor, south wall # Contact is the name of the person who administers or services the peripheral # and may include how to contact this person. It is limited to 64 characters. # This is the value used by the interface for the MIB-II sysContact object. # The default contact is undefined. Only printable ASCII characters are # allowed. Maximum length is 64 characters. contact: Phil, ext 1234 # The host access list contains the list of hosts or networks of hosts # that are allowed to connect to the peripheral. The format is # "allow: netnum [mask]", where netnum is a network number or a host IP # address. Mask is an address mask of bits to apply to the network number # and connecting host's IP address to verify access to the peripheral. # The mask usually matches the network or subnet mask, but this is not # required. If netnum is a host IP address, the mask 255.255.255.255 can # be omitted. Up to ten access list entries are permitted. # to allow all of network 10 to access the peripheral: allow: 10.0.0.0 255.0.0.0 # to allow a single host without specifying the mask: allow: 15.1.2.3 # Idle timeout is the time (in seconds) after which an idle # print data connection is closed. A value of zero disables # the timeout mechanism. The default timeout is 90 seconds. idle-timeout: 120 # A community name is a password that allows SNMP access to MIB values on # the network peripheral. Community names are not highly secure; they are # not encrypted across the network. The get community name determines which # SNMP GetRequests are responded to. By default, the network peripheral # responds to all GetRequests. The get community name is limited to 32 # characters. # # For hpnpstat and hpnpadmin, the community name can be stored in # /usr/lib/hpnp/hpnpsnmp. get-community-name: blue # The set community name is similar to the get community name. The set # community name determines which SNMP SetRequests are responded to. In # addition, SetRequests are only honored if the sending host is on the # host access list. By default, the network peripheral does not respond # to any SetRequests. The set community name is limited to 32 characters. # # The set community name can come from /usr/lib/hpnp/hpnpsnmp # if it is the same as the get community name. We recommend that the # set community name be different from the get community name though. set-community-name: yellow # SNMP traps are asynchronous notifications of some event that has occurred. # SNMP traps are useful only with network management software. Traps are # sent to specific hosts and include a trap community name. Up to four # hosts can be sent SNMP traps. The trap community name is limited to # 32 characters. The default name is public. trap-community-name: red # The SNMP trap destination list specifies systems to which SNMP # traps are sent. Up to four IP addresses are allowed. If no # trap destinations are listed, traps are not sent. trap-dest: 15.1.2.3 trap-dest: 15.2.3.4 # The SNMP authentication trap parameter enables or disables the sending # of SNMP authentication traps. Authentication traps indicate that an SNMP # request was received and the community name check failed. By default, # the parameter is off. authentication-trap: on # The syslog-facility parameter sets the source facility identifier that the # card uses when issuing syslog messages. Other facilities, for example, # include the kernel (LOG_KERN), the mail system (LOG_MAIL), and the spooling # system (LOG_LPR). The card only allows its syslog facility to be configured # to one of the local user values (LOG_LOCAL0 through LOG_LOCAL7). The # selectable option strings, local0 through local7 (configured to LOG_LOCAL0 # through LOG_LOCAL7, respectively) are case insensitive. The default # syslog-facility for the card is LOG_LPR. syslog-facility: local2 # This parameter allows the card to treat hosts on other subnets as if the # hosts were on the card's subnet. This parameter determines the TCP # Maximum Segment Size (MSS) advertised by the card to hosts on other subnets # and affects the card's initial receive-window size. The card will use a # TCP MSS of 1460 bytes for local hosts, and 536 bytes for a non-local host. # The default is off, that is, the card will use the maximum packet sizes # only on the card's configured subnet. # # The configuration utility does not allow access to this parameter. If you # want to configure it, you must manually edit the NPI configuration file # and add it to the bottom of the entry for the network peripheral. subnets-local: on # This parameter affects how the card handles TCP connection requests from # the host. By default, the JetDirect MPS card will accept a TCP connection # even if the peripheral is off-line. If this parameter is set to "on", then # the card will only accept a TCP connection when the peripheral is on-line. old-idle-mode: off </pre> </div> <br> <br> </div> <div class="SECT1"> <hr> <h1 class="SECT1"><a name="AEN3903">B.6. Timeouts</a></h1> <p>You should be aware that the <tt class="LITERAL"> idle-timeout</tt> value in the configuration file will override the value entered on the control panel of the printer.</p> <p>Also, the <tt class="LITERAL">@PJL SET TIMEOUT = NNN</tt> command will override this value as well.</p> </div> </div> </div> <hr> <br align="center"> <br> </body> </html>