From: bt@irfu.se (Bo Thide')
Subject: dvi2pcl v0.5 available for ftp.
Date: Mon, 9 Nov 1992 17:06:51 GMT
Organization: Swedish Institute of Space Physics, Uppsala, Sweden


The version 0.5 of the dvi to HP PCL printer driver 'dvi2pcl' is now available
for anonymous ftp from

Name:    hybrid.irfu.se
Address:  130.238.30.23

The main change from version 0.4 is a rewrite of dospecial.c with
cleaner code and direct support for HP-GL/2 graphics and more.  The man
page is enclosed below.  The code was developed on an HP9000/720 but has
been tested on a HP9000/300 and 400, HP9000/800 (cc, HP-UX).  An earlier
version was tested on a 386/PC (Linux 0.96c, gcc).  The PCL code
produced has been printed succesfully on a HP LaserJet+, a HP LaserJet
II, a HP LaserJet IIIP, a QMS PS 815 (PCL emulation) and a Panasonic
KX-P4420 (PCL emulation).

Running 'dvi2pcl -f 0' with 300 dpi fonts leads to moderate success when
printing on an HP PaintJet XL.  This gives me hope that only small
changes are needed for 'dvi2pcl' to work also for this printer if correct
180 dpi fonts are used.

Any feedback most welcome.


Bo

------------------------Cut here and feed into 'nroff -man'-------------------

.TH DVI2PCL 1 "" "" 
.UC 4
.SH NAME
dvi2pcl \- process a TeX \fIfile\fB.dvi\fR file to produce HP PCL code.
.SH SYNOPSIS
\fBdvi2pcl\fR  [-12345jlmrtv] [-c \fInnn\fR] [-f \fInnn\fR] 
[-o \fIoutfile\fR[\fB.pcl\fR]] [-p \fInnn\fR]
.br
[-s \fInnn\fR]
[-x \fIfffdim\fR] [-X \fIfffdim\fR] [-y \fIfffdim\fR] [-Y \fIfffdim\fR]
\fIfile\fR[\fB.dvi\fR]
.TP
.SH DESCRIPTION
.PP
\fIdvi2pcl\fR reads the TeX device independent file
\fIfile\fB.dvi\fR created by \fItex(1)\fR or \fIlatex(1)\fR and sends
the output to standard output or, if the \fB-o\fR option is used,
to the file \fIoutfile\fB.pcl\fR.  If \fIfile\fR is not specified,
\fIdvi2pcl\fR reads from standard input.

.TP
.SH OPTIONS
.PP
.PD 0
.TP 12
.BI - n
Produces code for HP Printer Command Language (PCL) level \fIn\fR =
1, 2, 3, 4, or 5. Only PCL 4 and 5 currently supported.  Default = 4.
.TP
.BI -c \ nnn
Prints \fInnn\fR < 100 copies.  Note that the copies will not be
collated.  Thus, a two page document with a request for ten copies will be
printed as ten copies of page one followed by ten copies of page two.
.TP
.BI -f \ nnn
Maximum number of fonts that can be downloaded.  This option
can be used to overcome a Laserjet+ restriction: Although the
Laserjet+ allows to download up to 32 fonts, only 16 different
fonts can be used on a single page.  If the maximum number of
downloadable fonts is restricted to 16, all remaining fonts
will be drawn in graphics mode, which is restricted only by
the printers memory.  But it is not wise to use this option in
general for the whole document, since unnecessary time consum-
ing graphic drawing might occur.  Instead, use this option just
for the special pages on which this restriction will be rele-
vant and print them seperately by using the \fB-s \fInnn\fR and
\fB-p\ 1\fR option.
.TP
.BI -j \ model 
Produces optimized \fB.pcl\fR code for the PCL printer type \fImodel\fR.
Not implemented yet.
.TP
.B -l
Print the whole document in the landscape mode (with the text running
parallel to the longest side of the page.)
.TP
.B -m
Manual page feed.
.TP
.BI -o \ outfile
Send the output to the output file \fIoutfile\fB.pcl\fR.  If \fB-o\fR is not
invoked, the output will be sent to standard output.
.TP
.BI -p \ nnn
Sets the maximum number \fInnn\fR of pages to be printed.
.TP
.BI -r
Output the \fB.pcl\fR pages in reverse order.
.TP
.BI -s \ nnn
Selects a starting page. Here \fInnn\fR can be a number, or, if the parameter is
enclosed in quotes, a splat.  There can be up to ten fields, each one
corresponding to one of the count values in TeX.  The first is normally the
page number.
.TP
.BI -t
Two sided printing.  First, all even pages are printed with a left
offset chosen by the \fBx\fR option.  The output package of the even
pages occur in natural order, \fIi.e.\fR the last even page is on the
top of the package or it is a blank sheet if the last page of the
document has an odd number.  You have two choices in printing the odd
pages:  After the first path, the printer is switched into 'manual
feeding mode', so you could print the odd pages by manual feeding.  Or
flip the stack of paper back into the paper cassette (with the printed
side of paper facing up and the top at the end of the cassette that
enters the printer first).  Take the printer off line, press the
'Manual Feed' switch to exit the manual feed mode and return to
on line again.  After this procedure the printer starts immediately
printing the odd pages by feeding them from the cassette.  The final
output is in natural order:  \fIi.e.\fR the first page is facing up and
on the top of the output package.  The left offset of the odd pages is
determined by the \fBX\fR value.
.TP
.B -v
Enable verbose mode. 
.TP
.BI -x \ fffdim
Horizontal [left] offset for odd sides.  \fIfff\fR can be any float
format and the allowed dimensions are:  \fBi\fR[\fBn\fR] for inches,
\fBc\fR[\fBm\fR] for centimeter, \fBm\fR[\fBm\fR] for millimeter,
\fBp\fR[\fBt\fR] for points, and \fBd\fR[\fBot\fR] for dots.  No space
may occur between \fIfff\fR and \fIdim\fR.
.TP
.BI -X \ fffdim
Horizontal [left] offset for even sides.
.TP
.BI -y \ fffdim 
Vertical [top] offset for odd sides.
.TP
.BI -Y \ fffdim 
Vertical [top] offset for even sides.
.PD
.PP
The following \fB\\special\fR commands are supported:
.PD
.TP
.BI file=\fIfile\fR
Directly include \fIfile\fR into the bit file.  Tries to emulate the
command with the same name in Gustaf Neumann's \fBdvi2xx\fR driver.
Full path name required.
.TP
.BI grafix(\fIrasterfile\ [resolution]\fB)
Include a graphic pixel file at the current location into the bit file.
The first argument \fIrasterfile\fR (required) is the external file
name.  Arguments are separated by spaces. The \fIresolution\fR can be any of
600, 300, 180, 150, 90, and 75 dpi.  The default resolution is 300 dpi.
The raster file must have the following format:
.br
short = number of pixel rows
.br
byte  = flag (0 or 1)
.br
byte = number of pixel bytes per row if flag is 0 followed by the pixel
byte stream.  If flag is 1, the next byte gives the length for the first
row, followed by the pixel bytes for the first row.  The next byte then
is interpreted as the length of the second row followed by the pixel
bytes for the second row and so on.  This restricts the max row length
to 255 bytes, but for the default resolution this is actually 13.6
inches and still 6.8 inches for full resolution.
.TP
.BI hpgl:\fIstring\fR
Directly include the HP/GL-2 string \fIstring\fR into the bit file.  Works
only for PCL5 or higher.
.TP
.BI include(\fIfile\fB)
Directly include \fIfile\fR into the bit file. Full path name required.
.TP
.BI landscape
The result will be the same as produced by the \fB-l\fR option, but the
request for this mode is made already in the \fB.tex\fR file instead
by the driver option.  No arguments.
.TP              
.BI move(\fIarguments\fB)
Move the current cursor position.  Allowed \fIarguments\fR are
\fBh\fR[\fB=\fR]\fIfffdim\fR, \fBv\fR[\fB=\fR]\fIfffdim\fR,
\fBr\fR[\fBel\fR], and \fBa\fR[\fBbs\fR].  No space may occur between
\fBh\fR, \fBv\fR and \fB=\fR and between \fB=\fR and \fIfff or \fBh\fR,
\fBv\fR and \fIfff\fR as between \fIfff\fR and \fIdim\fR.  Allowed
dimensions are the same as for the offset options.  Positioning is done
relative (\fBrel\fR) to the current cursor or absolute (\fBabs\fR) to
the upper left page corner.
.TP
.BI orientation=\fInnn
Change the print direction of an arbitrary part of a page.  The
following values of \fInnn\fR are supported:  \fB0\fR to rotate 0
degrees, \fB1\fR or \fB90\fR to rotate 90 degrees, \fB2\fR or \fB180\fR
to rotate 180 degrees, \fB3\fR or \fB270\fR to rotate 270 degrees.
Tries to emulate the command with the same name in Gustaf Neumann's
\fBdvi2xx\fR driver.  Works only for PCL5 or higher.
.TP
.BI pcl:\fIstring\fR
Directly include the PCL string \fIstring\fR into the bit file.
.TP
.BI ps:\fIstring\fR
Directly include the raw PostScript string \fIstring\fR (including PS language
enable and disable commands) into the bit file.  Requires PostScript support
in the printer.
.TP
.BI rasterfile\ \fIstring\fR
Directly include the PCL string \fIstring\fR into the bit file. Tries to
emulate the command with the same name in Parag Patel's \fBdvi\fR.
.SH AUTHOR
.PP
\fIdvi2pcl\fR was written by Bo Thid\o'e\(aa' (bt@irfu.se) and is based on
\fIpkdvilj\fR written by Helmut Kopka (hk@linhp.gwdg.de).
.SH HARDWARE DEPENDENCIES
.PP
\fIdvi2pcl\fR generates specific bit raster code for HP PCL printers.  It has
been tested on HP LaserJet printers and compatibles.
.SH FILES
.PP
/usr/local/bin/dvi2pcl
.br
/usr/local/bin/[la]tex 
.SH SEE ALSO
.PP 
/usr/local/lib/tex/reslj.fnt
.SH CAVEATS
.PP
This is an alpha version!
.SH WARNINGS AND BUGS
.PP
Bugs are expected to be present. Comments to bt@irfu.se.
-- 
   ^   Bo Thide'--------------------------------------------------------------
  |I|        Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden
  |R|      Phone: (+46) 18-303671.  Fax: (+46) 18-403100.  IP: 130.238.30.23
 /|F|\          INTERNET: bt@irfu.se      UUCP: ...!mcvax!sunic!irfu!bt  
 ~~U~~ ----------------------------------------------------------------sm5dfw-
Newsgroups: comp.text.tex