################*################*################*################*
Attention:
Before you start any of the programs 

You must edit the files:

- lpr
- lpqu, lpqlu
- lprm

and change the marked lines
################*################*################*################*



Documentation of lpr utilities:
===============================

A. Overview:
------------

All utilities are an arexx hack for AmiTCP.

1) lpr enables printing files from your host to a remote host with a printer queue.
2) lpq list the remote queue status. variations are lpql(ong) lpqu(ser)
3) lpsync sends the resynchronisation command to the printer daemon.
4) lprm removes files from the printer queue.

B. Installation:
----------------

1. Edit the files lpr, lpq#?u, lprm and change myhostname and username
2. type execute preparefiles in a shell if the script flag of the files is not set
3. Copy lp~(#?.doc) to Amitcp:bin
4. Copy the documentation to AmiTPC:

C. Usage:
---------

- lpr    hostname printername filename
  example:
  lpr zorro.ethz.ch ln09ps Amiga.ps

- lpq    hostname printername
- lprm   hostname printername [usernames] [jobnumbers]
- lpsync hostname printername

Do not send binary files that contain ascii(0,1,2,3). 
These are control codes for the remote lpd.

D. Implementation:
------------------

The  code  is  an arexx program.  So any one is able to edit and modify it.
However the arexx routine writech is not very fast.

E. Copyright:
-------------

No  copyright,  but you are encouraged to upload any changes to the aminet.
You use this software at your own risk.

F. ToDo:
--------

Send multiple files

G. Further reading:
-------------------

All   source   files  in  the  networking/print  directory  of  the  NetBSD
distribution.   You  will  need  lpr  and lpd to fully understand the remote
printing mechanism.

* 1) start printer
*    lets the line printer daemon rescan the spooler directory
*    syntax: \1printer\n 
*            ack
* 2) print  a file
*    send the file and a control file
*    syntax: \2printer\n
*            ack
*            \3size_in_bytes datafilename
*            ack
*            send datafile
*            ack
*            \2size_in_bytes coontrolfilename
*            ack
*            send controlfile
*
*            \1 reset or abort
*            datafilename:    dfA || 3 digits || hostname
*            controlfilename: cfA || 3 digits || hostname
*
* 3) display queue (short)
*    display que
*    syntax: \3printer [users ...] [jobs ...]\n
*            read from tcp
* 4) display queue (long)
*    display que
*    syntax: \3printer [users ...] [jobs ...]\n
*            read from tcp
* 5) remove job
*    remove by user or by job number
*    syntax: \5printer person [users ...] [jobs ...]\n
*
* users is string
* jobs are integers
*
* The control file consits of:
*
* H || myhostname
* P || username
* J || file
* C || myhostname
* L || username
* fdfA || num || myhostname
* UdfA || num || myhostname
* N || file)
*
* all available commands for lpd are
*
*	S -- "stat info" for symbolic link protection
*	J -- "job name" on banner page
*	C -- "class name" on banner page
*	L -- "literal" user's name to print on banner
*	T -- "title" for pr
*	H -- "host name" of machine where lpr was done
*	P -- "person" user's login name
*	I -- "indent" amount to indent output
*       f -- "file name" name of text file to print
*	l -- "file name" text file with control chars
*	p -- "file name" text file to print with pr(1)
*	t -- "file name" troff(1) file to print
*	n -- "file name" ditroff(1) file to print
*	d -- "file name" dvi file to print
*	g -- "file name" plot(1G) file to print
*	v -- "file name" plain raster file to print
*	c -- "file name" cifplot file to print
*	1 -- "R font file" for troff
*	2 -- "I font file" for troff
*	3 -- "B font file" for troff
*	4 -- "S font file" for troff
*	N -- "name" of file (used by lpq)
*	U -- "unlink" name of file to remove
*	     (after we print it. (Pass 2 only)).
*	M -- "mail" to user when done printing
*

H. Autor:
---------

Urs  Utzinger-Brunner,  Institute  of  Biomedical  Engineering  and Medical
Informatics, ETH & University of Zurich:         utzinger@biomed.ee.ethz.ch

I. Problems:
------------

Problems have been reported with

- Winsock Print Manager.
Suggestion: Do not use printernames longer than 3 characters

- Codonics np1600 network printer
No suggestion yet.
