1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
|
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
|