README for HPTools Version 1.2.3
---------------------------------

1. Contents
----------

	2. Compile and install 
	3. How to use
	4. Options
	5. Commands
		5.1 Printer steering
		5.2 Page steering
		5.3 Types
	6. Remote printer
	7. Using in printcap filters
	8. Prompt
	9. Bugs
	10. Thanks to		
			
2. Compile and install
----------------------

	HPTools gives you the possibility to manage the printer settings for HP 
	Printers. HPTools is written for the HP560C, but I think it will work 
	with most HP Printers.

	To compile this program you have first to edit the 'Makefile' in
	this package. In the line

	DEVICE='"/dev/lp0"'

	you have to replace 'lp0' with your printer device or '/dev/lp0'
	with a filename. This device is used as standard device. But you are
	able to give other devices by using the '-o' option. In the line

	HPPATH=/usr/bin

	replace "/usr/bin" with the path you want to install hpset into, and
	in

	MANPATH=/usr/man

	put in your location of the manages.
	After doing this type

	make all

	in the directory containing hp.c. You will get an executable named 
 	'hpset'. Start it without any arguments, and you will get a list of 
	options.

3. How to use
-------------

	To send commands to the printer you only have to type 'hpset' followed 
	by the commands (explained later in this document) you choose.
	
	hpset [options] [command1 command2 ...]

	As you can see later in this document, some commands have to be
	placed in the right order. Maybe I will change that in one of the
	following versions. 
	 

4. Options
----------

	-c		Write the output to stdout (similar to -o stdout).
	-o name		Write the output into the specified file or device.
	-h 		Print the help message.
	  
5. Commands
-----------

5.1 Printer steering
--------------------

	back			puts all settings back to the standard
				(Don't confound it with the printer reset)
	test			starts the self test (maybe only working on 
				HP560C)
	out 			Eject the paper if one is inside
	cr			After this command the printer is able to print 
				text on Linuxsystems without resulting in 
				rubbish. It sets the line closing to :
					CR => CR 
					LF => CR + LF
					FF => CR + FF
	lbon			enables the line break. (if the  printer 
				reaches the end of the paper he continues at the
		 		beginning of the paper)
	lboff			disables line break (lines with more characters 
				than place in line will loose text)
	leftright		force the printer to print from left to
				right
	rightleft		force the printer to print from right to
				left
	bidirect		force the printer to print bidirectional
	execoff			force the printer to do not execute the
				following commands but print them as
				ESC-Codes (good for testing)
	execon			force the printer to execute the 
				commands
	nice			enables high quality printing
	econo			enables fast printing

	
5.2 Page steering
-----------------

	landscape		prints in landscape format
	portrait		prints in portrait format
	lpi#			Lines per inch. For # choose one of (6,8)
		

5.3 Types
---------

	The following commands have to be sent in a sequence in the listed 
	order. Notice, if you don't send these commands in a sequence, the 
	printer may print trash. The sequence has to look like this :
	
	hpset [characterset] [character distance] [character density] 
	[point size] [type position] [line strength] [type]
	
		[characterset]:		english         (ISO 4)
					ansi 		(ANSI ASCII ISO 6)
					sweden		(ISO 10)
					italian		(ISO 15)
					spain		(ISO 17)
					german		(ISO 21)
					france		(ISO 69) ;)

		[character distance]:	prop		proportional
					fix		fixed
		
		If 'prop' is set, you don't have to set the character
		density
						
		[character density]:	cpi#		for # choose one of
							(5,6,10,12,16,16.67,20,
							24)
		
		[point size]:		point#		for # choose one of
							(4.75,5,6,7,8,9.5,10,12,
							14,19,24)
		
		[type position]		italic
					upright
							
		[line strength] 	bold
					normal
							
	 	[type]			courier		Courier
	 				times		CG Times
	 				gothic		Letter Gothic
	 				univers		Univers
	 							
	 It is not possible to use every combination of the commands above. See
	 the table below what combinations are allowed.

	strength___________________________________________
	type position___________________________           \
	point size____________________          \           \
	character density__	      \		 \	     \
        page steering      \           \          \           \
	type	  \	    \		\	   \	       \					 
	    \	   \	     \		 \	    \	        \	 
	---------------------------------------------------------------
	|courier portrait 5;10;16.67;20	6;12	  upright  normal;bold|
	|-------------------------------------------------------------|
	|courier landscape 5;10;20	6;12	  italic   normal;bold|
	|-------------------------------------------------------------|
	|courier landscape 10;16.67;10	6;12;24	  upright  normal;bold|
	|-------------------------------------------------------------|
	|times	 portrait  prop		5;6;7;8	  upright  normal;bold|
	|				10;12;	  italic              |
	|				14	  		      |
	|-------------------------------------------------------------|
	|gothic	 portrait  6;12;24	6;12	  upright  normal;bold|
	|					  italic	      |
	|-------------------------------------------------------------|
	|gothic	 landscape 12;24	6;12;24	  upright  normal;bold|
	|-------------------------------------------------------------|
	|gothic	 landscape 16.67	4.75;	  upright  normal;bold|
	|				9.5;19	       		      |
	|-------------------------------------------------------------|
	|univers  portrait prop		5;6;7;	  upright  normal;bold|
	|				8;10;	   		      |
	|				12;14	  		      |
	|-------------------------------------------------------------|
	|univers  portrait prop		5;6;10;	  italic   normal;bold|
	|				12			      |
	---------------------------------------------------------------
	

6.Remote printer
----------------

If you decide to use hpset on a remote printer you have to go through the
stdout and lpr or some other printer manager. For example we take a remote 
printer called 'rhp'. Then you can use hpset as followed.

hpset -c [commands] |lpr -Prhp -l

or 

hpset -o stdout [commands] |lpr -Prhp -l

7.Using in printcap filters
---------------------------

It is also possible to use hpset in filters of the printcap. You only have
to use the '-c' or '-o stdout' option to write in the stdout which will be
the printer in filters. For further information look into the man page of
printcap and into the postscript or tex documentation of hpset, located in
'./doc'.

8.Prompt
--------

By starting hpset without commands you will get into the prompt mode where
you can type in the available commands. To leave the prompt you have to type
in the 'quit' or 'exit' command.

9.Bugs
------

Please report bugs to michael.janson@stud.uni-karlsruhe.de	

10.Thanks to
-----------

Stephan Fuhrmann (stephan.fuhrmann@stud.uni-karlsruhe.de) and Claudio Matsuoka
(claudio@brasil.enemy.org) for testing this stuff, and giving a helping hand
in C programming. BTW check out Claudios Extended Module Player
(http://www.merdre.net/~claudio/xmp/)

greetings

Michael
