man > dvilj(1)

๐Ÿ“‹ NAME

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

๐Ÿš€ Quick Reference

Use CaseCommandDescription
Convert DVI to PCLdvilj file.dviCreates file.lj
Output to stdoutdvilj -e- file.dviPipe to spooler
Duplex (long edge)dvilj -d1 file.dviRequires dvilj4 or dvilj2p
Landscapedvilj -l file.dviOnly dvilj2p / dvilj4
Page rangedvilj -f2 -t5 file.dviPages 2โ€“5 (TeX page numbers)
Paper size A4dvilj -s26 file.dvi210mm x 297mm
Magnification 1200dvilj -m1 file.dviEquiv. to -m#1200
Include PCL file\special{hpfile=logo.pcl}Insert PCL at current position
Convert PostScript\special{psfile=fig.ps llx=0 lly=0 urx=100 ury=100 rwi=1000}Uses Ghostscript
Shading fill\special{gray=50} + \special{fill=0/1}50% gray between defined points
Pattern fill\special{pattern=1} + \special{fill=0/1}Horizontal lines

๐Ÿ“ SYNOPSIS

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

๐Ÿ“„ DESCRIPTION

dvilj and siblings convert TeX-output ".dvi" files into PCL (the Hewlett-Packard Printer Control Language) commands suitable for printing on a HP LaserJet+, HP LaserJet IIP (using dvilj2p), HP LaserJet 4 (using dvilj4), and fully compatible printers.

dvilj4 also provides support for the builtin Intellifont and TrueType fonts; TFM and VF files are provided in the distribution. Virtual fonts are not supported directly by dvilj, so you must run dvicopy(1) first, or otherwise expand the virtual fonts.

All programs are generated from one source file dvi2xx.c. They are usually called via a shell script or as a line printer filter. One such script, dvihp(1), is included in the distribution. It provides command-line options similar to those of dvips(1).

โš™๏ธ OPTIONS

๐Ÿž --Dnumber

Debug according to the bits of number; see the kpathsea(3) manual for values. Also turns on general verbosity.

๐Ÿ–จ๏ธ -cnumber

Print each page number times (including original).

๐Ÿ”„ -dnumber

Print in duplex mode. The option -d1 means long edge binding, -d2 stands for short edge binding. This option is only selectable in dvilj4 and dvilj2p.

๐Ÿ”„ -D[-12]

Double-sided printing - see below; -D1 prints odd sides only, -D2 is for even pages, a trailing - suppresses printing of empty padding pages.

๐Ÿ’ก -E

Switch printer into econo mode (dvilj4 only).

๐Ÿ“ -eoutfile

Send output to outfile instead of the basename of dvi file extended with ".lj". If outfile is - (as in "-e-") the output is directed to standard output and can be directly piped into a spooler.

๐Ÿ“„ -fpagenum

Print pages with TeX page numbers greater than or equal to pagenum.

๐Ÿš€ -g

Go mode: do not reset printer at start of job.

๐Ÿ“„ -hheaderfile

Copy headerfile to output before translation of the DVI file. Used to send arbitrary commands to the laserprinter.

๐Ÿ”„ -l

Print output in landscape mode; supported only by dvilj2p and dvilj4.

๐Ÿ”ค -Mflag

Do (not) call mktexpk(1) to generate fonts on demand. -M1 and -M are equivalent. -M0 enables invoking mktexpk(1). (This is the same as in dvips(1).) The default behavior (i.e., if no -M option is given) is chosen at compile-time; as distributed, mktexpk is enabled.

๐Ÿ” -mmagnification

Specify the magnification to use. The following are available:

-m#usermag e.g., #900
-m0 equivalent to -m#1000
-mh equivalent to -m#1095
-m1 equivalent to -m#1200
-mq equivalent to -m#1250
-m2 equivalent to -m#1440
-m3 equivalent to -m#1728
-m4 equivalent to -m#2074
-m5 equivalent to -m#2488

๐Ÿ“„ -ppagecount

Print pagecount pages after the starting page.

๐Ÿ”‡ -q

Quiet operation: omit final statistics, etc.

๐Ÿ”ƒ -r

Toggle page reversal.

๐Ÿ“ -spagesize

Specify the page size:

-s1: Executive (7.25" x 10.5")
-s2: Letter (8.5" x 11")
-s3: Legal (8.5" x 14")
-s6: Ledger (11" x 17")
-s25: A5 paper (148mm x 210mm)
-s26: A4 paper (210mm x 297mm)
-s27: A3 (297mm x 420mm)
-s45: JIS B5 paper (182mm x 257mm)
-s46: JIS B4 paper (250mm x 354mm)
-s71: Hagaki postcard (100mm x 148mm)
-s72: Oufuku-Hagaki postcard (200mm x 148mm)
-s80: Monarch Envelope (3 7/8" x 7 1/2")
-s81: Commercial Envelope 10 (4 1/8" x 9 1/2")
-s90: International DL (110mm x 220mm)
-s91: International C5 (162mm x 229mm)
-s100: International B5 (176mm x 250mm)

These values are from the PCL 5 technical reference manual. If the -s commandline option is omitted, no clipping is performed at the bottom of the page. (But printing below the paper bottom should not disturb any correctly behaving PCL printer.) Please remember that the correct paper tray must be installed for selected paper size, so use this option only if you have full control over your print destination.

๐Ÿ“„ -tpagenum

Print pages with TeX page numbers less than or equal to pagenum.

๐Ÿ“ฃ -v

Verbose mode: list fonts used, etc.

๐Ÿ”„ -Vmode

Compatibility mode. As mode, use "K" for Kyocera, "B" for Brother, 6 for LJ6 printers.

๐Ÿ”‡ -w

Omit warnings.

โ†”๏ธ -xoffset

Global x-offset in mm on output page relative to 1 inch/1 inch origin.

โ†•๏ธ -yoffset

Global y-offset in mm on output page relative to 1 inch/1 inch origin.

โ†”๏ธ -Xoffset

Global x-offset in dots on output page (overrides 1 inch/1 inch origin).

โ†•๏ธ -Yoffset

Global y-offset in dots on output page (overrides 1 inch/1 inch origin).

๐Ÿงช -z

Print a test page with the page counter at end of job.

๐Ÿ“ OPERANDS

If no operands are specified a brief usage message is displayed.

filename โ€” The DVI file name that shall be converted by dvilj. It must always be seekable. The output file name is constructed from filename. Either an extension ".dvi" is replaced by ".lj", or the extension ".lj" is appended. If filename is -, the DVI file is read from standard input and the resulting PCL document is written to standard output. (Please remember that the DVI file must be seekable, even if it's stdin.)

๐Ÿ”ง SUPPORTED TeX \special COMMANDS

"\special" commands supported by dvilj have the generic syntax:

\special{key1=value key1="value with space"}
\special{key3 = value key4 = 'note optional spaces around equal sign'}

I.e., specials are a sequence of key/value pairs, separated by an equal sign. Spaces around the equal sign are ignored. The value is either a space separated word, or a quoted string. Both double and single quotes can be used, alternatively. There is no support for quoting quote characters in values; if you want both double and single quotes in one value, you're out of luck.

The following key/value combinations are valid:

It should be noted that the special parser does sometimes accept constructs that are not valid as in the documentation above. Then, the output is most often damaged in some way.

๐Ÿ” Searching for Included Files

Proper file include specials search the file with kpathsea(3). The search path is configured by variable "DVILJINPUTS" and, if the file is not found in that search path, by variable "TEXINPUTS". Search via "DVILJINPUTS" covers the use case that one has common site-wide graphics that shall be included in documents, e.g., scanned signatures. Search via "TEXINPUTS" covers the use case that one has graphics as part of ones current document. "dvilj" is used as the ".PROGRAM" name in texmf.cnf, for all driver variants, independent of the actual program name.

๐Ÿ”‡ Unknown Specials and "TEX_HUSH" configuration

Kpathsea(3) has the concept of warning suppression with the configuration variable "TEX_HUSH", please refer to its Info node TeX support / Suppressing warnings. That variable holds a colon-separated identifiers that specifies the to-be-suppressed warnings. If "special" is among the listed values, dvilj does not output warnings any more about specials that it doesn't know about. But if there is a recognized special and if that special has an invalid parameter, then a warning is output nevertheless, independent of the content of "TEX_HUSH".

๐Ÿ“„ DOUBLE PAGE PRINTING

If the printer has a duplex unit installed, duplex printing can be demanded with the -d option. Otherwise, the command line option -D causes the printer to print in doublepage mode, that is, roughly speaking, printing first the even pages and then the odd pages of a document. If -D is used to print both even and odd pages (-D is used without the optional 1 or 2) the following will happen after half of the pages is printed: LJ: the printer stops, shows message "FEED" and switches on manual feed led. The printer continues when either the printed pages are fed into the manual page feeder, or the operator pushes the continue button (after placing first the printed pages into the paper tray).

If -D1 was specified only odd pages will be printed, -D2 can be used for even pages. A trailing "-" (as in -D-, -D1- or -D2-) suppresses printing of empty pages which are generated for padding otherwise.

The driver allows the -D option for both print-directions (front-to-back or back-to-front printing). It tries to be clever in certain cases: when a document has an odd number of pages it inserts in the right place an empty page when a document starts with page 0 the driver inserts an empty page after the 0-page when a piece of a document is printed that starts with an even page-number it prints this page at the backside of the first page to ensure that the odd sides are always on the frontside. The 0-page is treated like an odd page.

The doubleside option works for all LJs, not only for the new D model with does doubleside-printing (actually, I don't know whether it makes much sense on the new LJ II D at all). Caveat on the doubleside-option: When it is used frequently or on very large files, it might become necessary to clean the printer much more frequently.

The command line option -pX can be used to abort printing after the output of X pages (can lead to strange results together with -D). I personally dislike this option. The secure way of printing a part of a document is using -f (from) and -t (to).

๐ŸŒ ENVIRONMENT

dvilj uses the same environment variables and algorithms for finding font files as TeX and its friends do. See the documentation for the kpathsea(3) library for details. (Repeating it here is too cumbersome.)

๐Ÿ”— SEE ALSO

dvihp(1), dvicopy(1), dvips(1), xdvi(1), mktexpk(1), gs(1), kpathsea(3)

Email bug reports to tex-k AT tug.org.

Source is at <http://mirror.ctan.org/dviware/dviljk/>; but for compilation the texk build environment is needed, from <svn://tug.org/texlive/*/Build/source>.

As of July 2007, PCL reference documentation is found at HP's Web site at <http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568>. At the end of that page are links to reference manuals for PCL and PJL.

In case that page is changed, here are the URLs of these documents. All have the form <http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl<ID>/bpl<ID>.pdf>, where "<ID>" is the following document ID:

๐Ÿ‘ค AUTHOR

dvi2xx by Gustaf Neumann, Wirtschaftsuniversitaet Wien.

dviljk fork by Karl Berry.

Joachim Schrod <jschrod AT acm.org> supplied security fixes and updated this man page.

๐Ÿ“œ LICENSE

dvi2xx is public domain software. dviljk changes are covered by the GNU General Public License.

dvilj(1)
๐Ÿ“‹ NAME ๐Ÿš€ Quick Reference ๐Ÿ“ SYNOPSIS ๐Ÿ“„ DESCRIPTION โš™๏ธ OPTIONS
๐Ÿž --Dnumber ๐Ÿ–จ๏ธ -cnumber ๐Ÿ”„ -dnumber ๐Ÿ”„ -D[-12] ๐Ÿ’ก -E ๐Ÿ“ -eoutfile ๐Ÿ“„ -fpagenum ๐Ÿš€ -g ๐Ÿ“„ -hheaderfile ๐Ÿ”„ -l ๐Ÿ”ค -Mflag ๐Ÿ” -mmagnification ๐Ÿ“„ -ppagecount ๐Ÿ”‡ -q ๐Ÿ”ƒ -r ๐Ÿ“ -spagesize ๐Ÿ“„ -tpagenum ๐Ÿ“ฃ -v ๐Ÿ”„ -Vmode ๐Ÿ”‡ -w โ†”๏ธ -xoffset โ†•๏ธ -yoffset โ†”๏ธ -Xoffset โ†•๏ธ -Yoffset ๐Ÿงช -z
๐Ÿ“ OPERANDS ๐Ÿ”ง SUPPORTED TeX \special COMMANDS
๐Ÿ” Searching for Included Files ๐Ÿ”‡ Unknown Specials and "TEX_HUSH" configuration
๐Ÿ“„ DOUBLE PAGE PRINTING ๐ŸŒ ENVIRONMENT ๐Ÿ”— SEE ALSO ๐Ÿ‘ค AUTHOR ๐Ÿ“œ LICENSE

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-04 10:24 @216.73.216.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^