                      README for IFHP
                    ===================

                Patrick Powell <papowell@astart.com>
                Original Sun Oct 29 06:25:05 PST 1995
                 Revised Sat Dec 19 17:14:25 PST 1998
                 Revised Tue Aug 24 14:58:09 PDT 1999

ifhp is a highly versatile print filter for BSD based print spoolers.
It can be configured to handle text,  PostScript, PJL, PCL, and raster
printers, supports conversion from one format to another, and can be used
as a stand-alone print utility.

It is the primary supported print filter for the LPRng print spooler.

1.  Problems, Questions, and Answers

    The best place to get answers is the LPRng mailing list.
    To subscribe, send mail to: lprng-request@iona.ie
    with the word
         subscribe 
    in the body.

    Patrick Powell                 Astart Technologies,
    papowell@astart.com            9475 Chesapeake Drive, Suite D,
    Network and System             San Diego, CA 92123
      Consulting                   619-874-6543 FAX 619-279-8424 
    LPRng - Print Spooler (http://www.astart.com)

2. You will need to:

   Use GNU Make.  Don't even think about trying to use another
     make unless you are a Wizard.  And even the Wizards would
     download the GNU Make.  If you insist,  on using a BSD Make,
     try make -f Makefile.bsd.  Tested on FreeBSD only.

   Use an ANSI C compiler.  GCC is preferred.

   READ the README file.  All the way through... Come on now,
   it's not THAT long.

   THEN do the install.

3. Utilities

   If you want to do text to postscript or whatever conversions,
   you will need a converter and program to determine input file type.

	A2PS - Ascii Text to PostScript Converter
	   http://www-inf.enst.fr/~demaille/a2ps
	   ftp://ftp.enst.fr/pub/unix/a2ps/

	file - utility to determine file type
	   ftp://ftp.astron.com/pub/file/
	   ftp.deshaw.com/pub/file/
	   Also available from the RedHat.com SRPMS in (of course) rpm format

    Install these and update the ifhp.conf file with the correct paths to their
    locations.

    You have been warned.

4. Super Express Install For The Pathologically Impatient

   configure sets and uses the following shell and Makefile
   variables using the indicated options:

    ${prefix}       -   default /usr/local
    ${exec_prefix}  -   default ${prefix}  (/usr/local)
    ${libexecdir}   -   default ${exec_prefix}/libexec  (/usr/local/libexec)
                        ifhp filter executables installed here by default
                        over-ride --with-filterdir
    ${sysconfdir}   -   default ${prefix}/etc   (/usr/local/etc)
                        ifhp.conf, ifhp.conf.sample installed here
                        override location and name --with-configfile

    The following options to configure allow you to override or specify
    these value:
      --prefix=PREFIX         install architecture-independent files in PREFIX
      --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
      --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
      --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
      --with-configfile=path   ifhp.conf explicit locations, override defaults
      --with-filterdir=DIR    override for filter directory ${libexecdir}/filters)

   To do the install in /usr/local/libexec, /usr/local/etc use:
        configure
   To do the install in /usr/libexec, /usr/local/etc use:
        configure --prefix=/usr --sysconfdir=/etc
    
   The Express Install:
   
   configure      [ with options as shown above ]
   make all install
     (this installs ifhp.conf in /usr/local/etc/ifhp.conf.sample)

   If you are upgrading,  then upgrade your existing ifhp.conf file
   with the new one in ifhp.conf.sample.

5.  IFHP-HOWTO

    This is now the repository for all information on the IFHP filter.
    It is in the docs/IFHP-HOWTO directory,  and in several formats.
    Please read at least the part on printer configurations.

    There is even a simple tutorial section, explaining how
    to debug your printer setup.

6.  Run time options are provided by the /usr/local/etc/ifhp.conf file.
    This file is extremely complex,  as it has the ability to configure
    just about any option that you can think of.  See the IFHP-HOWTO
    file in the docs directory for details.

    Do NOT change any of the contents of this file unless you are aware
    of the details.  You can OVERRIDE any of the values by adding sections
    at the end.  You can override the default values by adding a
    [ default ]  section,  and add your own entries.  See comments in the
    ifhp.conf file, and please read the HOWTO document.

7. Printcap Entry

    If you have printers that supports PJL, PCL, and PS, on a
    network connection, then simply change your printcap entries
    to have the form:
   lp: ...
      :if=/usr/local/libexec/ifhp

    By default, the if filter will check the job files for printability
    and/or postscript format.  If it is PostScript,  it will set the
    printer to PostScript mode using the PJL commands,  otherwise it
    will set the printer to PCL.  If you do not want this to happen,
    then print the job as a binary file;  this suppresses the checks.
    Some LPR spoolers use the 'v' format to indicate a binary file; If
    this is the case you will need to use the following printcap:

    printer:
        :of=/usr/local/libexec/filters/ofhp:
        :if=/usr/local/libexec/filters/ifhp:
        :vf=/usr/local/libexec/filters/ifhp -c:

    If your LPD server does not allow options in the filter spec,
    use the following entry and the following shell script:
        :vf=/usr/local/libexec/filters/vfhp.sy:
    vfhp.sh -
        #/bin/sh
        /usr/local/libexec/filters/ifhp -c  $*

    In addition, you can 'suggest' a language using lpr -Zlanguage=xxx;
    this will prove helpful for those difficult files.
 
    See the comments above about 'file' and 'a2ps' - you may need to use this
    if users keep sending garbage files to the printer.

8. ifhp accepts the full range of LPD filter options, and uses or
    or ignores them as applicable. The following command line options
    are used:
    -c  cleartext - dump file this directly to the printer, no fonts,
        no nothing done.  For those desperate people trying to
        find a way to print those obnoxious files.
        This is caused by lpr -b  or lpr -l depending on the software
        version.

    -sstatusfile    - the name of a status file that is updated with
        'rolling status' - i.e. - the last few log messages.
        The statusfile value is set from the 'ps=statusfile' printcap
        option

    -nuser, -hhost, -Jjob  - used by ofhp for banner printing defaults
    -T[filteroptions,]* - filter options
    -Z[filteroptions,]* - filter options
        See the ifhp man page for filteroption details.

9.  pclbanner
    This is a banner program that produces a PCL banner.  You should set this
    up using:

    lp:bp=/usr/local/libexec/filters/pclbanner
      :of=/usr/local/libexec/filters/ifhp
      :if=/usr/local/libexec/filters/ifhp
      # let PCL banner get the 'short banner' info and
      # generate a long banner
      #   (no form feeds though)
      :sb:sf

$Id: README,v 1.7 1999/09/03 17:27:21 papowell Exp papowell $
