summary refs log tree commit diff
path: root/pbmtoppa.html
blob: 50e9ce4cc4a7b3a27a3b717157f4f6e45dbe57d4 (plain) (blame)
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pbmtoppa User Manual</title></head>
<body>
<h1>pbmtoppa</h1>
Updated: 01 May 2005
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
pbmtoppa - convert PBM image to HP Printer Performance Architecture (PPA)

<h2 id="synopsis">SYNOPSIS</h2>

<b>pbmtoppa</b>
[<i>pbm_file</i>
[<i>ppa_file</i>]]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<b>pbmtoppa</b> converts page images in PBM format to Hewlett
Packard's PPA (Printer Performance Architecture) format, which is the
data stream format expected by some HP "Windows-only"
printers including the HP Deskjet 820C series, the HP DeskJet 720
series, and the HP DeskJet 1000 series.

<p><i>pbm_file</i> is the file specification of the input file or
<b>-</b> for Standard Input.  The default is Standard Input.

<p>The input file contains one or more PBM images, with each one
being a single page.  Each image must have the exact dimensions of a
page (at 600 pixels per inch in both directions).  Significantly, this
is the format that Ghostscript produces.

<p><i>ppa_file</i> is the file specification of the output file or
<b>-</b> for Standard Output.  The default is Standard Output.

<p>To print Postscript on an HP PPA printer, just use Ghostscript with
the <b>pbmraw</b> (or <b>pbm</b>) device driver.

<p>You can generate a test page for use with this program with
<b>pbmpage</b>.

<p>You can also set up a printer filter so you can submit PBM input
directly to your print queue.  See the documentation for your print
spooler for information on how to do that, or look in hp820install.doc
for an example lpd print filter for Postscript and text files.

<p>Sometimes, <b>pbmtoppa</b> generates a file which the printer will
not print (because <b>pbmtoppa</b>'s input is unprintable).  When this
happens, all three lights blink to signal the error.  This is usually
because there is material outside of the printer's printable area.  To
make the file print, increase the margins via <b>pbmtoppa</b> options
or a configuration file.  See <a href="#calibration">the section on
calibration </a> below.

<h3>About PPA</h3>

<p>The PPA printer language is a far lower level language than most.
When you use a PPA printer, most of the processing that a conventional
printer does is done instead on the computer end of the wire.  In
particular, <b>pbmtoppa</b> has to do "swath cutting," and
"sweep formatting," which other printers do themselves.
There is very little intelligence inside a PPA printer;
<b>pbmtoppa</b> generates direct controls for the printer's hardware.

<p>The design goal of PPA was to reduce the cost of a printer by exploiting
computing resources already present in the computer that requests the
printing.  CPU power, ROM, and RAM requirements inside the printer are all
reduced compared to a conventional printer.

<p>PPA was new in 1997.  It was preceded by Hewlett Packard's PCL
(Printer Control Language) language.  HP manufactured PPA printers for only
a few years, and no one else ever did.

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pbmtoppa</b> recognizes the following
command line options:

<dl compact>
<dt><b>-v</b> <i>version</i>

<dd>
printer version (720, 820, or 1000)

<dt><b>-x</b> <i>xoff</i>

<dd>
horizontal offset adjustment in 1/600 inches.

<dt><b>-y</b> <i>yoff</i>

<dd>
vertical offset adjustment in 1/600 inches.

<dt><b>-t</b> <i>topmarg</i>

<dd>
top margin in 1/600 inches    (default: 150 = 0.25 inch)

<dt><b>-l</b> <i>leftmarg</i>

<dd>
left margin in 1/600 inches   (default: 150 = 0.25 inch)

<dt><b>-r</b> <i>rightmarg</i>

<dd>
right margin in 1/600 inches (default: 150 = 0.25 inch)

<dt><b>-b</b> <i>botmarg</i>

<dd>
bottom margin in 1/600 inches (default: 150 = 0.25 inch)

<dt><b>-s</b> <i>paper</i>

<dd>paper size: <b>us</b> or <b>a4</b>.  Default is <b>us</b>.

<dt><b>-d</b> <i>dpi</i>
<dd>
Print resolution in dots per inch.

<dt><b>-f</b> <i>cfgfile</i>

<dd>Read parameters from the configuration file named <i>cfgfile</i>.
See <a href="#configfile">CONFIGURATION FILES</a>

</dl>

<p>The offset adjustments you specify with <b>-x</b> and <b>-y</b>
accumulate.  I.e. if you specify them multiple times, the total offset
adjustment is the sum of the adjustments you specify.  <b>-x 60 -x 120</b>
is the same as <b>-x 180</b>.

<p>The <b>-v</b> option undoes any preceding <b>-x</b> and <b>-y</b>
options, leaving the horizontal and vertical adjustments their
default values.


<h2 id="configfile">CONFIGURATION FILES</h2>

<p>You can use a configuration file to specify parameters rather than
use invocation options.  <b>pbmtoppa</b> processes the file
<b>/etc/pbmtoppa.conf</b>, if it exists, before processing any
options.  It then processes each configuration file named by a
<b>-f</b> option in order, applying the parameters from the
configuration file as if they were invocation options used in the
place of the <b>-f</b> option.

<p>Configuration files have the following format:

<pre>
<b>#</b><i>Comment</i>
<i>key1</i> <i>value1</i>
<i>key2</i> <i>value2</i>
[etc.]
</pre>

<p>Valid <i>key</i>s are <b>version</b>, <b>xoffset</b>,
<b>yoffset</b>, <b>topmargin</b>, <b>leftmargin</b>,
<b>rightmargin</b>, <b>bottommargin</b>, <b>papersize</b>, or any
non-null prefix of these words.  Valid values are the same as with the
corresponding invocation parameters.

<h2 id="examples">EXAMPLES</h2>

<p>Print a test pattern: 
<pre>
<b>pbmpage | pbmppa &gt;/dev/lp1</b>
</pre>

<p>
Print three pages:
<pre>
<b>cat page1.pbm page2.pbm page3.pbm | pbmppa &gt;/dev/lp1</b>
</pre>
<p>
Print the Postscript file myfile.ps:
<pre>
gs -sDEVICE=rawpbm -q -dNOPAUSE -r600 \
   -sOutputFile=- myfile.ps ;\
| pbmtoppa | lpr
</pre>

<h2 id="calibration">CALIBRATION</h2>

<p>To be able to print successfully and properly, you need to tell
<b>pbmtoppa</b> an X and a Y offset appropriate for your printer to
use when generating the page.  You can specify these offsets with the
<b>-x</b> and <b>-y</b> invocation options or with the <b>xoff</b> and
<b>yoff</b> parameters in a <b>pbmtoppa</b> configuration file.

<p>To determine the correct offsets, use the <b>pbmpage</b> program.

<p>If while trying to do this calibration, the printer refuses to
print a page, but just blinks all three lights, specify large margins
(e.g. 600 pixels -- one inch) via <b>pbmpage</b> invocation options
while doing the calibration.

<p>For example:
<pre>
<b>pbmpage | pbmtoppa &gt;/dev/lp1</b>
</pre>
or
<pre>
<b>pbmpage | pbmtoppa | lpr -l</b>
</pre>

(if your printer filter recognizes the '-l' (direct output) parameter).

<p>In the test pattern, the grid is marked off in pixel coordinate
numbers.  Unfortunately, these coordinates are probably cut off before
the edge of the paper.  You'll have to use a ruler to estimate the
pixel coordinate of the left and top edges of the actual sheet of
paper (should be within +/- 300, may be negative; there are 600 pixels
per inch).

<p>Add these coordinates to the X and Y offsets by either editing the
configuration file or using the <b>-x </b> and <b>-y</b> command-line
parameters.

<p>When <b>pbmtoppa</b> is properly calibrated, the center mark should
be in the center of the paper.  Also, the margins should be able to be
as small as 1/4 inch without causing the printer to choke with
'blinking lights syndrome'.

<h2 id="redhat">RED HAT LINUX INSTALLATION</h2>

<p>RedHat users may find the following tip from Panayotis Vryonis
&lt;<a href="mailto:vrypan@hol.gr">vrypan@hol.gr</a>&gt; helpful.  The
same should work for the 820 and 1000, but it hasn't been tested.
Also, use the pbmraw GSDriver if you have it; it's faster.

<p>Here is a tip to integrate HP720C capability in RedHat's printtool:

<p>Install pbmtoppa. Copy pbmtoppa to /usr/bin.

<p>Edit "printerdb" (in my system it is found in
/usr/lib/rhs/rhs-printfilters ) and append the following lines:

<pre>
<code>
  
----------------------Cut here-----------------------

StartEntry: DeskJet720C
  GSDriver: pbm
  Description:&nbsp;{HP&nbsp;DeskJet&nbsp;720C}
  About: { \
        This driver drives the HP DeskJet 720C \
        inkjet printer. \
        It cannot do color printing. \
        IMPORTANT! Insert \
           "- | pbm2ppa -" \
        in the "Extra GS Options " field.\
      }

  Resolution: {600} {600} {}

EndEntry
----------------------------------------------------
  </code>
</pre>

<p>Now you can add an HP720C printer just like any other, using
printtool.

<h2 id="seealso">SEE ALSO</h2>

<b><a href="pbmpage.html">pbmpage</a></b>,
<b><a href="pstopnm.html">pstopnm</a></b>,
<b><a href="pbm.html">pbm</a></b>

<p>This program was derived from <b>pbm2ppa</b>.  <b>pbm2ppa</b> is obsolete 
and has been replaced by <b>pnm2ppa</b>, which does the same things as 
<b>pbmtoppa</b> except it also works with color and has lots more features.  See 
<a href="http://pnm2ppa.sourceforge.net">http://pnm2ppa.sourceforge.net</a> 
for more information about the PPA protocol and the separately distributed 
<b>pnm2ppa</b> program.

<p>The file INSTALL-MORE in the pbmtoppa directory of the Netpbm
source code contains detailed instructions on setting up a system to
use pbmtoppa to allow convenient printing on HP PPA printers.  It was
written by Michael Buehlmann.

<h2 id="author">AUTHOR</h2>

<p>Tim Norman.  Copyright (C) 1998.  Licensed under GNU General Public License

<p>Manual page by Bryan Henderson, May 2000.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#configfile">CONFIGURATION FILES</a>
<li><a href="#examples">EXAMPLES</a>
<li><a href="#calibration">CALIBRATION</a>
<li><a href="#redhat">RED HAT LINUX INSTALLATION</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>