summaryrefslogtreecommitdiff
path: root/dviware/dvi2pcl/dvi2pcl.1
blob: 8e46b3e2764f904e75cf14996b4fc15296b6841a (plain)
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
.TH DVI2PCL 1 "" "" 
.UC 4
.SH NAME
dvi2pcl \- translate TeX DVI code to HP PCL printer code.
.SH SYNOPSIS
\fBdvi2pcl\fR  [-12345lmrtv] [-c \fInnn\fR] [-d \fIdevice\fR] [-f \fInnn\fR] 
[-o \fIoutfile\fR]
.br [-p \fInnn\fR] [-R \fIPCLresolution\fR] [-s \fInnn\fR]
[-x \fIfffdim\fR] [-X \fIfffdim\fR] [-y \fIfffdim\fR]
\fIfile\fR[\fB.dvi\fR]
.PP
.SH DESCRIPTION
\fIdvi2pcl\fR reads the TeX device independent file \fIfile\fB.dvi\fR
created by \fItex(1)\fR or \fIlatex(1)\fR, translates the device
independent (DVI) code to Printer Command Language (PCL) code, and sends
the output to standard output or, if the \fB-o\fR option is used, to the
file \fIoutfile\fR.  If \fIfile\fR[\fB.dvi\fR] is not specified,
\fIdvi2pcl\fR reads from standard input.
.PP
.SH OPTIONS
.PD 0
.TP 12
.BI - n
Produces code for HP Printer Command Language (PCL) level \fIn\fR =
1, 2, 3, 4, or 5. 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 -d \ device 
Produce optimized \fB.pcl\fR code for the PCL printer \fIdevice\fR.
Rudimentary support is included for the following \fIdevice\fRs:
\fBlj+\fR (HP LaserJet+), \fBlj2\fR (HP LaserJet II), \fBlj2d\fR (HP
LaserJet IID),\fBlj2p\fR (HP LaserJet IIP),\fBlj3si\fR (HP LaserJet
IIISi), \fBlj3p\fR (HP LaserJet IIIP),\fBpj\fR (HP PaintJet), and
\fBpjxl\fR (HP PaintJet XL).  In fact, only \fBlj+\fR has any effect.  This
flag overcomes certain hardware limitations (missing transparency mode)
in the LaserJet+.  It is the user's responsibility to add the \fB-f\fR
flag to limit the number of soft fonts for the particular printer used.

.TP
.BI -f \ nnn
Maximum number of soft fonts that can be downloaded.  This option can be used
to overcome printer limitations.  If the maximum number of downloadable
fonts is \fInnn\fR, all remaining fonts will be drawn in raster graphics
mode, restricted only by the printer memory.  Avoid this option in
general for the whole document, since raster graphics drawing can be
very time consuming.  Instead, use this option just for the special
pages on which this restriction will be relevant and print them
seperately by using the \fB-s \fInnn\fR and \fB-p\ 1\fR option.

.TP
.B -l
Print the whole document in 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\fR.  If \fB-o\fR is not
specified, the output will be sent to standard output.

.TP
.BI -p \ nnn
Set the maximum number \fInnn\fR of pages to be printed.

.TP
.BI -r
Toggle the sense of page output order (reverse/no reverse).

.TP
.BI -R \ nnn
Set the PCL printer resolution to \fInnn\fR.

.TP
.BI -s \ nnn
Select 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
Select twosided printing.  First, all even pages are printed with a
left offset chosen by the \fB-x\fR option.  The output stack of paper
with the even pages occur in natural order, \fIi.e.\fR, the last even
page is on the top of the stack or it is a blank sheet if the last page
of the document has an odd number.  There are two ways to print the odd
pages:  (1) After the first pass, the printer is switched to `Manual
Feed' mode, so odd pages can be printed by feeding the sheets, with the
even pages printed on them, into the printer.  (2) 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 put the printer on line again.  After this
procedure the printer starts immediately, printing the odd pages from
the cassette.  The final output is in natural order, \fIi.e.\fR, the
first page is facing up and is on the top of the output stack.  The left
offset of the odd pages is determined by the \fB-X\fR option.

.TP
.B -v
Enable verbose mode. 

.TP
.BI -x \ fffdim
Set the 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
Set the horizontal [left] offset for even sides.

.TP
.BI -y \ fffdim 
Set the vertical [top] offset.

.SH TeX \\\\special COMMANDS
.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 \fIdvi2xx\fR driver.
Full path name required.

.TP
.BI grafix(\fIrasterfile\ [resolution]\fB)
Include a graphics 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
Produce vector graphics by inserting the HP/GL-2 command string
\fIstring\fR into the bit file.  Terminate with a `;'.  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 printer 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, or 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 \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
\fIdvi2xx\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 pjxl:\fIcolor\fR
Set the color of the printed text to \fIcolor\fR where \fIcolor\fR is any of
\fBblack\fR, \fBred\fR, \fBgreen\fR, \fByellow\fR, \fBblue\fR, \fBmagenta\fR,
\fBcyan\fR or \fBwhite\fR.  Requires color printer (PaintJet XL or compatible).

.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/lib/tex/reslj.fnt
.SH SEE ALSO
/usr/local/bin/[la]tex 
.PP 
.SH CAVEATS
.PP
This is an alpha version!
.SH WARNINGS AND BUGS
.PP
Bugs are expected to be present. Comments to bt@irfu.se.