=head1	NAME

klpr - Krause's lpr clone

=head1	SYNOPSIS

  klpr [<options>] [<file(s)>]

=head1	DESCRIPTION

The klpr programs sends a file to a print server. Depending
on the print server type (LPR, LPRng or raw socket) the file is either
spooled for printing or printed directly.

=head1	OPTIONS

=over	4

=item	B<-S> I<server>

connects to the specified print server host. The server can be specified
either by hostname or IP address. If this option is not used and there
is no host name given using the B<-P> option the program tries to find
a default print host in the following places:

=over	8

=item	the "PRINTHOST" environment variable,

=item	the "/yalc/print-host" user preference

=item	the "/print-host" registry entry in HKCU/Software/DKrause/Yalc

=item	the "/yalc/print-host" system preference

=item	the "/print-host" registry entry in HKLM/Software/DKrause/Yalc

=back

Alternative option: B<-H> I<server>

Long option: B<--server=>I<server>

=item	B<-P> I<printer>

chooses a print queue. The print queue can be specified as alias, or
using queue@host or host%port.

If the B<-P> option is not used the program searches for a printer
name in the following places:

=over	8

=item	the "NGPRINTER", "NPRINTER", "LPDEST" and "PRINTER" environment
variables,

=item	the "/yalc/default-printer" user preference,

=item	the "/default-printer" registry entry in HKCU/Software/DKrause/Yanolc,

=item   the "/yalc/default-printer" system preference,

=item   the "/default-printer" registry entry in HKLM/Software/DKrause/Yanolc.

=back

If the queue name doest not contain a host information, the print
server host information is retrieved from the B<-S> option.

Long option: B<--printer=>I<printer>

=item	B<-U> I<user>

assigns the specified user name to the print job. This option can only
be used by users listed in the "xusers" section for the printer or
the print server.

Long option: B<--username=>I<user>

=item	B<-C> I<class>

specifies a print job class.

Long option: B<--class=>I<class>

=item	File type options:

=over	8

=item	B<-l>

Literal file (binary file, raw print data), print "as is".

Long option: B<--literally>

=item	B<-c>

Cifplot file.

Long option B<--cifplot>

=item	B<-d>

DVI file (created by LaTeX or troff).

Long option: B<--dvi>

=item	B<-g>

Plot file.

Long option: B<--plot>

=item	B<-n>

Device-independent troff file.

Long option: B<--dvi-troff>

=item	B<-p>

Output file created by troff.

Long option: B<--troff>

=item	B<-r>

Raster file.

Long option: B<--raster>

=back

=item	B<-e>

enable banner page printing.

Long option: B<--header=>I<boolean>

=item	B<-j> I<width>

indent all lines by I<width> spaces.

Long option: B<--indent=>I<width>

=item	B<-J> I<job-name>

specifies a job name for banner page printing.

Long option: B<--jobname=>I<name>

=item	B<-K> I<number>

specifies the number of copies.

Alternative option: B<-#> I<number>

Long option: B<--copies=>I<number>

=item	B<-m> I<mail-address>

sends e-mail to the specified address after printing.

Long option: B<--mail=>I<address>

=item	B<-Q> I<queue-name>

uses the queue-name for the control file.

This option is not implemented here. In LPRng this option adds a control
file entry ``original queue name''.

=item	B<-R> I<user-name>

uses the specified name for accounting.

This option is not implemented here. In LPRng this option would charge
the named user for the print job.

=item	B<-T> I<job-title>

specifies the job title for the banner page.

Long option: B<--jobtitle=>I<title>

=item	B<-V>

switches the program to verbose output (this option is not
implemented here, it is ignored silently).

Long option: B<--verbose=>I<boolean>

=item	B<-w> I<width>

specifies the line length for the C<pr> filter.

Long option: B<--width=>I<width>

=item	B<-o> I<options>

adds further filter options.

=back

=head1	RETURN VALUE

On success the program returns exit code 0, a positive value
is returned on errors.

=head1	FILES

The I<yanolc.cfg> file is used to configure print queues.

=head1	RESTRICTIONS

Some options (encryption, authentication...) found in LPRng are
not implemented in yanolc. There are no plans to do so.

=head1	NOTES

Users should not rely on automatic conversions for the different
file types.

Print server administrators might have turned automated conversions
off for security reasons.

=head1	SEE ALSO

http://dktools.sourceforge.net/yanolc.html

=head1	AUTHOR

Dirk Krause

=head1	COPYRIGHT AND LICENSE

Copyright (c) 2001-2008, Dirk Krause
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above
   copyright notice, this list of conditions and the
   following disclaimer.

 * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials
   provided with the distribution.

 * Neither the name of the Dirk Krause nor the names of
   contributors may be used to endorse or promote products
   derived from this software without specific prior written
   permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
