about summary refs log tree commit diff
path: root/pbmtoppa.html
blob: c4ec7d92fe831aeaf2e2155877970354be2abd44 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//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>

<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 support 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 does not support 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="seealos">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 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">REDHAT LINUX INSTALLATION</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#author">AUTHOR</A>
</UL>
</BODY>
</HTML>