1DVILJ(1)                           TeX Live                           DVILJ(1)
2
3
4

NAME

6       dvilj4, dvilj4l, dvilj2p, dvilj - convert a TeX DVI file to PCL, for HP
7       LaserJet printers
8

SYNOPSIS

10        dvilj [--Dnumber] [-ccopies] [-dmode] [-D] [-E] [-eoutputfile]
11              [-ffrompage] [-g] [-hheaderfile] [-l] [-Mflag] [-mmag] [-ppages]
12              [-q] [-r] [-ttopage] [-spagesize] [-v] [-Vmode] [-w] [-xxoff(mm)]
13              [-yyoff(mm)] [-Xxoff(dots)] [-Yyoff(dots)] [-z] [filename]
14

DESCRIPTION

16       dvilj and siblings convert TeX-output ".dvi" files into PCL (the
17       Hewlett-Packard Printer Control Language) commands suitable for
18       printing on a HP LaserJet+, HP LaserJet IIP (using dvilj2p), HP
19       LaserJet 4 (using dvilj4), and fully compatible printers.
20
21       dvilj4 also provides support for the builtin Intellifont and TrueType
22       fonts; TFM and VF files are provided in the distribution.  Virtual
23       fonts are not supported directly by dvilj, so you must run dvicopy(1)
24       first, or otherwise expand the virtual fonts
25
26       All programs are generated from one source file dvi2xx.c. They are
27       usually called via a shell script or as a line printer filter. One such
28       script, dvihp(1), is included in the distribution. It provides command-
29       line options similar to those of dvips(1).
30

OPTIONS

32       --Dnumber
33           Debug according to the bits of number; see the kpathsea(3) manual
34           for values. Also turns on general verbosity.
35
36       -cnumber
37           Print each page number times (including original)
38
39       -dnumber
40           print in duplex mode. The option -d1 means long edge binding, -d2
41           stands for short edge binding. This option is only selectable in
42           dvilj4 and dvilj2p.
43
44       -D[-12]
45           Double-sided printing - see below; -D1 prints odd sides only, -D2
46           is for even pages, a trailing - suppresses printing of empty
47           padding pages.
48
49       -E  Switch printer into econo mode (dvilj4 only).
50
51       -eoutfile
52           Send output to outfile instead of the basename of dvi file extended
53           with ".lj". If outfile is - (as in "-e-") the output is directed to
54           standard output and can be directly piped into a spooler.
55
56       -fpagenum
57           Print pages with TeX page numbers greater than or equal to pagenum.
58
59       -g  Go mode: do not reset printer at start of job.
60
61       -hheaderfile
62           Copy headerfile to output before translation of the DVI file. Used
63           to send arbitrary commands to the laserprinter.
64
65       -l  Print output in landscape mode; supported only by dvilj2p and
66           dvilj4.
67
68       -Mflag
69           Do (not) call mktexpk(1) to generate fonts on demand. -M1 and -M
70           are equivalent. -M0 enables invoking mktexpk(1). (This is the same
71           as in dvips(1).) The default behavior (i.e., if no -M option is
72           given) is chosen at compile-time; as distributed, mktexpk is
73           enabled.
74
75       -mmagnification
76           Specify the magnification to use. The following are available:
77
78             -m#usermag e.g., #900
79             -m0 equivalent to -m#1000
80             -mh equivalent to -m#1095
81             -m1 equivalent to -m#1200
82             -mq equivalent to -m#1250
83             -m2 equivalent to -m#1440
84             -m3 equivalent to -m#1728
85             -m4 equivalent to -m#2074
86             -m5 equivalent to -m#2488
87
88       -ppagecount
89           Print pagecount pages after the starting page.
90
91       -q  Quiet operation: omit final statistics, etc.
92
93       -r  Toggle page reversal.
94
95       -spagesize
96           Specify the page size:
97
98             -s1: Executive (7.25" x 10.5")
99             -s2: Letter (8.5" x 11")
100             -s3: Legal (8.5" x 14")
101             -s6: Ledger (11" x 17")
102             -s25: A5 paper (148mm x 210mm)
103             -s26: A4 paper (210mm x 297mm)
104             -s27: A3 (297mm x 420mm)
105             -s45: JIS B5 paper (182mm x 257mm)
106             -s46: JIS B4 paper (250mm x 354mm)
107             -s71: Hagaki postcard (100mm x 148mm)
108             -s72: Oufuku-Hagaki postcard (200mm x 148mm)
109             -s80: Monarch Envelope (3 7/8" x 7 1/2")
110             -s81: Commercial Envelope 10 (4 1/8" x 9 1/2")
111             -s90: International DL (110mm x 220mm)
112             -s91: International C5 (162mm x 229mm)
113             -s100: International B5 (176mm x 250mm)
114
115           These values are from the PCL 5 technical reference manual. If the
116           -s commandline option is omitted, no clipping is performed at the
117           bottom of the page. (But printing below the paper bottom should not
118           disturb any correctly behaving PCL printer.) Please remember that
119           the correct paper tray must be installed for selected paper size,
120           so use this option only if you have full control over your print
121           destination.
122
123       -tpagenum
124           Print pages with TeX page numbers less than or equal to pagenum.
125
126       -v  Verbose mode: list fonts used, etc.
127
128       -Vmode
129           Compatibility mode. As mode, use "K" for Kyocera, "B" for Brother,
130           6 for LJ6 printers.
131
132       -w  Omit warnings.
133
134       -xoffset
135           Global x-offset in mm on output page relative to 1 inch/1 inch
136           origin.
137
138       -yoffset
139           Global y-offset in mm on output page relative to 1 inch/1 inch
140           origin.
141
142       -Xoffset
143           Global x-offset in dots on output page (overrides 1 inch/1 inch
144           origin).
145
146       -Yoffset
147           Global y-offset in dots on output page (overrides 1 inch/1 inch
148           origin).
149
150       -z  Print a test page with the page counter at end of job.
151

OPERANDS

153       If no operands are specified a brief usage message is displayed.
154
155       filename
156           The DVI file name that shall be converted by dvilj. It must always
157           be seekable.
158
159           The output file name is constructed from filename. Either an
160           extension ".dvi" is replaced by ".lj", or the extension ".lj" is
161           appended.
162
163           If filename is -, the DVI file is read from standard input and the
164           resulting PCL document is written to standard output. (Please
165           remember that the DVI file must be seekable, even if it's stdin.)
166

SUPPORTED TeX \special COMMANDS

168       "\special" commands supported by dvilj have the generic syntax
169
170         \special{key1=value key1="value with space"}
171         \special{key3 = value key4 = 'note optional spaces around equal sign'}
172
173       I.e., specials are a sequence of key/value pairs, separated by an equal
174       sign. Spaces around the equal sign are ignored. The value is either a
175       space separated word, or a quoted string. Both double and single quotes
176       can be used, alternatively. There is no support for quoting quote
177       characters in values; if you want both double and single quotes in one
178       value, you're out of luck.
179
180       The following key/value combinations are valid:
181
182       hpfile=file
183           Insert file at the current position. file is searched with
184           kpathsea(3), see below.
185
186           The file content must be valid for this printer, i.e., it should
187           contain PCL escape sequences or HP-GL/2 commands. If the file is a
188           graphics file, this typically means that the upper left corner of
189           the graphics is placed at the current position.
190
191           PCL absolute positioning escape sequences in file are rewritten to
192           be relative positioning commands; the lowest appearing coordinate
193           is used as reference.
194
195       hpfile_verbatim=file
196           Insert file verbatim at the current position, without any changes
197           of the file content. file is searched with kpathsea(3), see below.
198
199           This is mostly used to keep absolute positions in PCL files.
200
201       psfile=file llx=x0 lly=y0 urx=x1 ury=y1 rwi=s
202           Convert PostScript file file to HP PCL, by Ghostscript with device
203           "ljetplus", and insert the resulting graphics file at the current
204           position, rewriting absolute position escape sequences. file is
205           searched with kpathsea(3), see below.
206
207           The accompanying key/value pairs are mandatory, they can be
208           specified in an arbitrary order. Values x0, x1, y0, y1, and s are
209           integers. (x0,y0) is the lower left corner, (x1,y1) the upper right
210           corner of the image.
211
212           Please note: The specific semantics of this special is not known.
213           In particular, the rwi parameter is some scale factor; but even
214           looking at the source code it is not quite clear what the special's
215           author intended to implement here. In addition, it is unclear what
216           dimensions are used to specify the corners, PostScript points or
217           PCL dots.
218
219           If you happen to know the psfile semantics, or if you spent the
220           work analyzing them, please inform us at tex-k@tug.org, so that we
221           can update this man page with the relevant information.
222
223       dvilj-psfile-syntax=syntax
224           where syntax is either "dvilj" or "ignore". This is a very crude
225           way to tell the driver what to do with psfile specials.
226
227           If the value is "ignore", all psfile specials that are processed
228           afterwards are ignored, until the next dvilj-psfile-syntax special
229           is processed.
230
231           If the value is "dvilj", psfiles specials are processed as
232           explained above, until the next dvilj-psfile-syntax special is
233           processed.
234
235           An obvious, planned, extension is the value "dvips", but this has
236           not been implemented yet.
237
238           That special is not as simple as it sounds at first. Since its
239           semantics is defined by processing order, it is only of use if it
240           is placed on the same page as the psfile special. Having it once in
241           a file (e.g., on the first page) does not help if you print just
242           one page of the document -- dvilj does not do prescanning of first-
243           page specials like some other drivers do. (Patches would be
244           welcome, of course.)
245
246       comment=arbitrary text
247       comment arbitrary text
248           This causes the rest of the special to be ignored; it may be used
249           to add meta-information to a DVI file.
250
251           With the first form, the comment may appear anywhere in the
252           special.  When it appears first, the processing of this special is
253           terminated and all other text behind is ignored.
254
255           The second form is a speciality that has been introduced for
256           compatibility with other drivers. If the first keyword of the
257           special is comment and has no value, it is taken as a valid comment
258           syntax, too; the rest of the special is ignored.
259
260       orientation=po
261           Position the page on the physical paper. The value po may be one of
262           the following values:
263
264             0  for portrait
265             1  for landscape
266             2  for reverse portrait
267             3  for reverse landscape
268
269       defpoint=n(x,y)
270           Define the point number n. This point can be referred to later in
271           other special commands to specify areas that shall be filled with
272           some pattern. n must be between 0 and 79.
273
274           x and y are the position of that point and have the form "?pt"
275           where "?" is a floating point number. The positions are relative to
276           the DVI page origin; i.e., coordinates increase moving right and
277           down, the point of origin is (1in,1in) in the upper left corner,
278           altered by options -x, -y, -X, and -Y, but not by \hoffset and
279           \voffset.
280
281           x and y can be omitted, i.e., the values 3 or "4(,)" are valid.
282           Then the current page position is used as position for point n.
283
284       resetpoints="all"
285           This undefines all points again.
286
287       gray=gray_scale
288       grey=gray_scale
289           This sets the fill mode for the next fill special, the area will be
290           filled with gray color. (grey is an alias for gray.) Any pattern
291           specification is reset.
292
293           gray_scale is the percentage of gray that shall be used here; with
294           0 meaning white and 100 meaning black.
295
296           Caveat: That special is actually a misnomer. PCL names these gray
297           scales shading patterns and they are created by placing dots in the
298           area. The gray scale selects how far spread the dots are. In the
299           lower ranges, this doesn't look very gray on close sight, but more
300           like a dotted background. Furthermore, the gray scales are not as
301           fine-grained as the value range 0..100 might make you believe. In
302           reality, there are only 8 different gray patterns available:
303
304              1 -  2%
305              3 - 10%
306             11 - 20%
307             21 - 35%
308             36 - 55%
309             56 - 80%
310             81 - 99%
311             100%
312
313           One of these patterns is selected according to the gray_scale
314           value.
315
316       pattern=pat
317           This sets the fill mode for the next fill special, the area will be
318           filled with a pattern. Any gray color specification is reset.
319
320           pat is one of the following values:
321
322             1  horizontal lines
323             2  vertical lines
324             3  diagonal lines, from lower left corner to upper right corner
325             4  diagonal lines, from upper right corner to lower left corner
326             5  crossed lines, vertically
327             6  crossed lines, diagonally
328
329       fill=a/b
330           Fill the area between the points a and b, according to the current
331           fill mode.
332
333           Point a must be the upper left corner and point b must be the lower
334           left corner of the rectangle. Otherwise the result is garbage.
335
336           The default fill mode is 10% gray color filling.
337
338       filename
339           This is a legacy special, its use is depreciated. If the special is
340           just one word that names an existing file, that file is verbatim
341           included. Contrary to other file inclusion means, the file is not
342           searched with kpathsea(3). You are not supposed to use this special
343           and we won't fix any problems with it.
344
345       It should be noted that the special parser does sometimes accept
346       constructs that are not valid as in the documentation above. Then, the
347       output is most often damaged in some way.
348
349   Searching for Included Files
350       Proper file include specials search the file with kpathsea(3). The
351       search path is configured by variable "DVILJINPUTS" and, if the file is
352       not found in that search path, by variable "TEXINPUTS".
353
354       Search via "DVILJINPUTS" covers the use case that one has common site-
355       wide graphics that shall be included in documents, e.g., scanned
356       signatures. Search via "TEXINPUTS" covers the use case that one has
357       graphics as part of ones current document.
358
359       "dvilj" is used as the ".PROGRAM" name in texmf.cnf, for all driver
360       variants, independent of the actual program name.
361
362   Unknown Specials and "TEX_HUSH" configuration
363       Kpathsea(3) has the concept of warning suppression with the
364       configuration variable "TEX_HUSH", please refer to its Info node TeX
365       support / Suppressing warnings. That variable holds a colon-separated
366       identifiers that specifies the to-be-suppressed warnings.
367
368       If "special" is among the listed values, dvilj does not output warnings
369       any more about specials that it doesn't know about. But if there is a
370       recognized special and if that special has an invalid parameter, then a
371       warning is output nevertheless, independent of the content of
372       "TEX_HUSH".
373

DOUBLE PAGE PRINTING

375       If the printer has a duplex unit installed, duplex printing can be
376       demanded with the -d option.
377
378       Otherwise, the command line option -D causes the printer to print in
379       doublepage mode, that is, roughly speaking, printing first the even
380       pages and then the odd pages of a document. If -D is used to print both
381       even and odd pages (-D is used without the optional 1 or 2) the
382       following will happen after half of the pages is printed: LJ: the
383       printer stops, shows message "FEED" and switches on manual feed led.
384       The printer continues when either the printed pages are fed into the
385       manual page feeder, or the operator pushes the continue button (after
386       placing first the printed pages into the paper tray).
387
388       If -D1 was specified only odd pages will be printed, -D2 can be used
389       for even pages. A trailing "-" (as in -D-, -D1- or -D2-) suppresses
390       printing of empty pages which are generated for padding otherwise.
391
392       The driver allows the -D option for both print-directions (front-to-
393       back or back-to-front printing). It tries to be clever in certain
394       cases: when a document has an odd number of pages it inserts in the
395       right place an empty page when a document starts with page 0 the driver
396       inserts an empty page after the 0-page when a piece of a document is
397       printed that starts with an even page-number it prints this page at the
398       backside of the first page to ensure that the odd sides are always on
399       the frontside. The 0-page is treated like an odd page.
400
401       The doubleside option works for all LJs, not only for the new D model
402       with does doubleside-printing (actually, I don't know whether it makes
403       much sense on the new LJ II D at all).
404
405       Caveat on the doubleside-option: When it is used frequently or on very
406       large files, it might become necessary to clean the printer much more
407       frequently.
408
409       The command line option -pX can be used to abort printing after the
410       output of X pages (can lead to strange results together with -D). I
411       personally dislike this option. The secure way of printing a part of a
412       document is using -f (from) and -t (to).
413

ENVIRONMENT

415       dvilj uses the same environment variables and algorithms for finding
416       font files as TeX and its friends do. See the documentation for the
417       kpathsea(3) library for details. (Repeating it here is too cumbersome.)
418
419       "DVILJFONTS"
420           If set, overrides all other font paths.
421
422       "DVILJMAKEPK"
423           If set, overrides mktexpk(1) as the name of the command to execute
424           to create a PK file if one isn't found.
425
426       "DVILJSIZES"
427           May be set to indicate which sizes of fonts are available. It
428           should consist of a list of numbers separated by colons. If the
429           list begins with a colon, the system default sizes are used, as
430           well. Sizes are expressed in dots per inch; decimals may be used
431           for "pxl" files: for example, a 300 dots per inch file magnified by
432           half a step comes out to 1643 dots per five inches, which should be
433           encoded as 328.6.  dvilj tries the actual size of the font before
434           trying any of the given sizes.
435
436       "DVILJINPUTS"
437           Primary search path for include files.
438
439       "TEXINPUTS"
440           Secondary search path for include files.
441
442       "TEX_HUSH"
443           Colon separated list of identifiers that name situations where no
444           warning shall be output. The following identifiers are used:
445
446             checksum  suppress mismatched font checksum warnings
447             readable  suppress warnings about unreadable files
448             special   suppress warnings about unknown specials
449             all       suppress all warning classes above
450             none      suppress no warnings
451
452       "KPATHSEA_DEBUG"
453           Trace kpathsea(3) lookups; set to -1 for complete tracing.
454
455       "GS_PATH"
456           On Windows, this may be the path to Ghostscript; there the default
457           is gswin32c.exe.
458
459           On Unix, this environment variable is not used. Ghostscript is
460           called as gs(1) and must be found over $PATH.
461

SEE ALSO

463       dvihp(1), dvicopy(1), dvips(1), xdvi(1), mktexpk(1), gs(1), kpathsea(3)
464
465       Email bug reports to tex-k@tug.org.
466
467       Source is at <http://mirror.ctan.org/dviware/dviljk/>; but for
468       compilation the texk build environment is needed, from
469       <svn://tug.org/texlive/*/Build/source>.
470
471       As of July 2007, PCL reference documentation is found at HP's Web site
472       at
473       <http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568>.
474       At the end of that page are links to reference manuals for PCL and PJL.
475
476       In case that page is changed, here are the URLs of these documents.
477       All have the form
478       <http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl<ID>/bpl<ID>.pdf>,
479       where "<ID>" is the following document ID:
480
481       13205
482           PCL 5 Technical Quick Reference Guide. This is the 1st thing to
483           look up if you have questions about PCL escape sequences.
484
485       13210 and 13211
486           PCL 5 Technical Reference Manual (part I and II). This is the fully
487           detailed explanation that you need to look up if you don't
488           understand how the printer works. Part I is the actual manual, part
489           II explains HP-GL/2 and has overall tips.
490
491       13208 and 13207
492           PJL Technical Reference Manual (and addendum)
493
494       13212
495           PCL 5 Color Manual. This explains color specials for the newer HP
496           printers. (Not of much use today; for practical purposes we would
497           need to add color specials to dvilj first.)
498
499       13206 and 13209
500           Comparison Guide (and addendum) that documents which PCL escape
501           sequences are supported on which HP printers.
502

AUTHOR

504       dvi2xx by Gustaf Neumann, Wirtschaftsuniversitaet Wien.
505
506       dviljk fork by Karl Berry.
507
508       Joachim Schrod <jschrod@acm.org> supplied security fixes and updated
509       this man page.
510
511       dviljk is currently maintained as part of TeX Live.
512

LICENSE

514       dvi2xx is public domain software. dviljk changes are covered by the GNU
515       General Public License.
516
517
518
519Version 2.6p5                     2022-08-30                          DVILJ(1)
Impressum