Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/sys/doc/netpbm/ms/pbmtoppa.ms

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TL
Pbmtoppa User Manual
.SH 1
pbmtoppa
.LP
Updated: 01 May 2000
.br
Table Of Contents
.SH 2
NAME
.LP
pbmtoppa - convert PBM image to HP Printer Performance Architecture (PPA)
.SH 2
SYNOPSIS
.LP
\fBpbmtoppa\fR
[\fIpbm_file\fR
[\fIppa_file\fR]]
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
\fBpbmtoppa\fR 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.
.LP
\fIpbm_file\fR is the file specification of the input file or
\fB-\fR for Standard Input.  The default is Standard Input.
.LP
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.
.LP
\fIppa_file\fR is the file specification of the output file or
\fB-\fR for Standard Output.  The default is Standard Output.
.LP
To print Postscript on an HP PPA printer, just use Ghostscript with
the \fBpbmraw\fR (or \fBpbm\fR) device driver.
.LP
You can generate a test page for use with this program with
\fBpbmpage\fR.
.LP
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.
.LP
Sometimes, \fBpbmtoppa\fR generates a file which the printer will
not print (because \fBpbmtoppa\fR'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 \fBpbmtoppa\fR options
or a configuration file.  See the section on
calibration  below.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-v\fR \fIversion\fR"
printer version (720, 820, or 1000)
.IP "\fB-x\fR \fIxoff\fR"
horizontal offset adjustment in 1/600 inches.
.IP "\fB-y\fR \fIyoff\fR"
vertical offset adjustment in 1/600 inches.
.IP "\fB-t\fR \fItopmarg\fR"
top margin in 1/600 inches    (default: 150 = 0.25 inch)
.IP "\fB-l\fR \fIleftmarg\fR"
left margin in 1/600 inches   (default: 150 = 0.25 inch)
.IP "\fB-r\fR \fIrightmarg\fR"
right margin in 1/600 inches (default: 150 = 0.25 inch)
.IP "\fB-b\fR \fIbotmarg\fR"
bottom margin in 1/600 inches (default: 150 = 0.25 inch)
.IP "\fB-s\fR \fIpaper\fR"
paper size: \fBus\fR or \fBa4\fR.  Default is \fBus\fR.
.IP "\fB-d\fR \fIdpi\fR"
Print resolution in dots per inch.
.IP "\fB-f\fR \fIcfgfile\fR"
Read parameters from the configuration file named \fIcfgfile\fR.
See CONFIGURATION FILES
.RE
.LP
The offset adjustments you specify with \fB-x\fR and \fB-y\fR
accumulate.  I.e. if you specify them multiple times, the total offset
adjustment is the sum of the adjustments you specify.  \fB-x 60 -x 120\fR
is the same as \fB-x 180\fR.
.LP
The \fB-v\fR option undoes any preceding \fB-x\fR and \fB-y\fR
options, leaving the horizontal and vertical adjustments their
default values.
.SH 2
CONFIGURATION FILES
.LP
.LP
You can use a configuration file to specify parameters rather than
use invocation options.  \fBpbmtoppa\fR processes the file
\fB/etc/pbmtoppa.conf\fR, if it exists, before processing any
options.  It then processes each configuration file named by a
\fB-f\fR option in order, applying the parameters from the
configuration file as if they were invocation options used in the
place of the \fB-f\fR option.
.LP
Configuration files have the following format:
.DS L
\fB#\fR\fIComment\fR
\fIkey1\fR \fIvalue1\fR
\fIkey2\fR \fIvalue2\fR
[etc.]
.DE
.LP
Valid \fIkey\fRs are \fBversion\fR, \fBxoffset\fR,
\fByoffset\fR, \fBtopmargin\fR, \fBleftmargin\fR,
\fBrightmargin\fR, \fBbottommargin\fR, \fBpapersize\fR, or any
non-null prefix of these words.  Valid values are the same as with the
corresponding invocation parameters.
.SH 2
EXAMPLES
.LP
.LP
Print a test pattern: 
.DS L
\fBpbmpage | pbmppa >/dev/lp1\fR
.DE
.LP
Print three pages:
.DS L
\fBcat page1.pbm page2.pbm page3.pbm | pbmppa >/dev/lp1\fR
.DE
.LP
Print the Postscript file myfile.ps:
.DS L
gs -sDEVICE=rawpbm -q -dNOPAUSE -r600 \
   -sOutputFile=- myfile.ps ;\
| pbmtoppa | lpr
.DE
.SH 2
CALIBRATION
.LP
.LP
To be able to print successfully and properly, you need to tell
\fBpbmtoppa\fR an X and a Y offset appropriate for your printer to
use when generating the page.  You can specify these offsets with the
\fB-x\fR and \fB-y\fR invocation options or with the \fBxoff\fR and
\fByoff\fR parameters in a \fBpbmtoppa\fR configuration file.
.LP
To determine the correct offsets, use the \fBpbmpage\fR program.
.LP
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 \fBpbmpage\fR invocation options
while doing the calibration.
.LP
For example:
.DS L
\fBpbmpage | pbmtoppa >/dev/lp1\fR
.DE
or
.DS L
\fBpbmpage | pbmtoppa | lpr -l\fR
.DE
(if your printer filter recognizes the '-l' (direct output) parameter).
.LP
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).
.LP
Add these coordinates to the X and Y offsets by either editing the
configuration file or using the \fB-x \fR and \fB-y\fR command-line
parameters.
.LP
When \fBpbmtoppa\fR 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'.
.SH 2
REDHAT LINUX INSTALLATION
.LP
.LP
RedHat users may find the following tip from Panayotis Vryonis
<vrypan@hol.gr> 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.
.LP
Here is a tip to intergrate HP720C support in RedHat's printtool:
.LP
Install pbmtoppa. Copy pbmtoppa to /usr/bin.
.LP
Edit "printerdb" (in my system it is found in
/usr/lib/rhs/rhs-printfilters ) and append the following lines:
.DS L
----------------------Cut here-----------------------
StartEntry: DeskJet720C
GSDriver:pbm
Description:{HPDeskJet720C}
About:{\
ThisdriversupportstheHPDeskJet720C\
inkjetprinter.\
Itdoesdoesnotsupportcolorprinting.\
IMPORTANT!Insert\
"-|pbm2ppa-"\
inthe"ExtraGSOtions"field.\
}
Resolution:{600}{600}{}
EndEntry
----------------------------------------------------
.DE
.LP
Now you can add an HP720C printer just like any other, using
printtool.
.SH 2
SEE ALSO
.LP
\fBpbmpage\fR,
\fBpstopnm\fR,
\fBpbm\fR
.LP
\fBpnm2ppa\fR is not part of Netpbm, but does the same things as
\fBpbmtoppa\fR except it also works with color and has lots more
features.  See <http://sourceforge.net/projects/pnm2ppa>.
.LP
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.
.LP
For information about the PPA protocol and the separately
distributed pbm2ppa program from which \fBpbmtoppa\fR was derived,
see <http://www.httptech.com/ppa>.
.SH 2
AUTHOR
.LP
.LP
Tim Norman.  Copyright (C) 1998.  Licensed under GNU Public License
.LP
Manual page by Bryan Henderson, May 2000.
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
CONFIGURATION FILES
.IP \(bu
EXAMPLES
.IP \(bu
CALIBRATION
.IP \(bu
REDHAT LINUX INSTALLATION
.IP \(bu
SEE ALSO
.IP \(bu
AUTHOR
.LP

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.