# grolj4

## Name



           grolj4 - _groff_ output driver for HP LaserJet 4 and compatible
           printers
    


## Synopsis



           **grolj4**[**-l**] [**-c** _num-copies_] [**-d**[_n_]] [**-F** _font-directory_]
                  [**-p** _paper-format_] [**-w** _line-width_] [_file_ ...]
    
           **grolj4 --help**
    
           **grolj4 -v**
    
           **grolj4 --version**
    


## Description



           This GNU _roff_ output driver translates the output of _troff_(1) into
           a PCL5 format suitable for a Hewlett-Packard LaserJet 4 printer.
           Normally, _grolj4_ is invoked by _groff_(1) when the latter is given
           the “**-T lj4** ” option.  (In this installation, **ps** is the default
           output device.)  Use _groff_ 's **-P** option to pass any options shown
           above to _grolj4_.  If no _file_ arguments are given, or if _file_ is
           “-”, _grolj4_ reads the standard input stream.  It writes to the
           standard output stream.
    
       **Typefaces**
           _grolj4_ supports the standard four styles: **R**(roman), **I**(_italic_), **B**
           (**bold**), and **BI**(_**bold-italic**_).  Fonts are grouped into families **A** ,
           **C** , **G** , **O** , **T** , **TN** , **U** , and **UC** having members in each style.  For the
           convenience of a consistent font repertoire in _groff_ , _lj4.tmac_
           (see section “Files” below) uses **ftr** requests to remap **H**
           (“Helvetica”) font names to the **U** names shown below.
    
                  **AB** Arial Bold
                  **ABI** Arial Bold Italic
                  **AI** Arial Italic
                  **AR** Arial Roman
                  **CB** Courier Bold
                  **CBI** Courier Bold Italic
                  **CI** Courier Italic
                  **CR** Courier Roman
                  **GB** Garamond Halbfett
                  **GBI** Garamond Kursiv Halbfett
                  **GI** Garamond Kursiv
                  **GR** Garamond Antiqua
                  **OB** CG Omega Bold
                  **OBI** CG Omega Bold Italic
                  **OI** CG Omega Italic
                  **OR** CG Omega Roman
                  **OB** CG Omega Bold
                  **OBI** CG Omega Bold Italic
                  **OI** CG Omega Italic
                  **OR** CG Omega Roman
                  **TB** CG Times Bold
                  **TBI** CG Times Bold Italic
                  **TI** CG Times Italic
                  **TR** CG Times Roman
                  **TNRB** M Times Bold
                  **TNRBI** M Times Bold Italic
                  **TNRI** M Times Italic
                  **TNRR** M Times Roman
                  **UB** Univers Bold
                  **UBI** Univers Bold Italic
                  **UI** Univers Medium Italic
                  **UR** Univers Medium
                  **UCB** Univers Condensed Bold
                  **UCBI** Univers Condensed Bold Italic
                  **UCI** Univers Condensed Medium Italic
                  **UCR** Univers Condensed Medium
    
           The following fonts are not members of a family.
    
                  **ALBB** Albertus Extra Bold
                  **ALBR** Albertus Medium
                  **AOB** Antique Olive Bold
                  **AOI** Antique Olive Italic
                  **AOR** Antique Olive Roman
                  **CLARENDON**
                         Clarendon
                  **CORONET**
                         Coronet
                  **LGB** Letter Gothic Bold
                  **LGI** Letter Gothic Italic
                  **LGR** Letter Gothic Roman
                  **MARIGOLD**
                         Marigold
    
           The special font is **S**(PostScript Symbol); **SYMBOL**(M Symbol), and
           **WINGDINGS**(Wingdings) are also available but not mounted by
           default.
    
       **Paper format and device description file**
           _grolj4_ supports paper formats “**A4** ”, “**B5** ”, “**C5** ”, “**com10** ”, “**DL** ”,
           “**executive** ”, “**legal** ”, “**letter** ”, and “**monarch** ”.  These are matched
           case-insensitively.  The **-p** option overrides any setting in the
           device description file _DESC_.  If neither specifies a paper
           format, “letter” is assumed.
    
       **Font description files**
           _grolj4_ recognizes four font description file directives in
           addition to those documented in _groff_font_(5).
    
           **pclweight** _n_
                  Set the stroke weight to _n_ , an integer in the range -7 to
                  +7; the default is 0.
    
           **pclstyle** _n_
                  Set the style to _n_ , an integer in the range 0 to 32767; the
                  default is 0.
    
           **pclproportional** _n_
                  Set the proportional spacing Boolean flag to _n_ , which can
                  be either 0 or 1; the default is 0.
    
           **pcltypeface** _n_
                  Set the typeface family to _n_ , an integer in the range 0 to
                  65535; the default is 0.
    
       **Drawing commands**
           An additional drawing command is recognized as an extension to
           those documented in _groff_(7).
    
           **\D'R** _dh dv_**'**
                  Draw a rule (solid black rectangle) with one corner at the
                  drawing position, and the diagonally opposite corner at the
                  drawing position +(_dh_ ,_dv_), at which the drawing position
                  will be afterward.  This generates a PCL fill rectangle
                  command, and so will work on printers that do not support
                  HP-GL/2, unlike the other **\D** commands.
    
       **Fonts**
           Nominally, HP LaserJet 4-series and newer printers have the same
           internal fonts.  45 fonts are scalable from 0.25 to 999.75 points
           in 0.25-point increments.  A Lineprinter font is available only at
           8.5 points.
    
           The LaserJet font files included with _groff_ assume that all
           printers since the LaserJet 4 are identical.  There are some
           differences between fonts in the earlier and more recent printers,
           however.  The LaserJet 4 printer used Agfa Intellifont technology
           for 35 of the internal scalable fonts; the remaining 10 scalable
           fonts were TrueType.  Beginning with the LaserJet 4000-series
           printers introduced in 1997, all scalable internal fonts have been
           TrueType.  The number of printable glyphs differs slightly between
           Intellifont and TrueType fonts (generally, the TrueType fonts
           include more glyphs), and there are some minor differences in
           glyph metrics.  Differences among printer models are described in
           the _PCL 5 Comparison Guide_ and the _PCL 5 Comparison Guide Addendum_
           (for printers introduced since approximately 2001).
    
           LaserJet printers reference a glyph by a combination of a
           256-glyph symbol set and an index within that symbol set.  Many
           glyphs appear in more than one symbol set; all combinations of
           symbol set and index that reference the same glyph are equivalent.
           For each glyph, _hpftodit_(1) searches a list of symbol sets, and
           selects the first set that contains the glyph.  The printing code
           generated by _hpftodit_ is an integer that encodes a numerical value
           for the symbol set in the high byte(s), and the index in the low
           byte.  See _groff_font_(5) for a complete description of the font
           file format; symbol sets are described in greater detail in the
           _PCL 5 Printer Language Technical Reference Manual_.
    
           Two of the scalable fonts, Symbol and Wingdings, are bound to
           256-glyph symbol sets; the remaining scalable fonts, as well as
           the Lineprinter font, support numerous symbol sets, sufficient to
           enable printing of more than 600 glyphs.
    
           The metrics generated by _hpftodit_ assume that the _DESC_ file
           contains values of 1200 for _res_ and 6350 for _unitwidth_ , or any
           combination (e.g., 2400 and 3175) for which
           _res_ × _unitwidth_ = 7620000.  Although HP PCL 5 LaserJet printers
           support an internal resolution of 7200 units per inch, they use a
           16-bit signed integer for positioning; if **devlj4** is to support
           U.S. ledger paper (11 in × 17 in; in = inch), the maximum usable
           resolution is 32767 ÷ 17, or 1927 units per inch, which rounds
           down to 1200 units per inch.  If the largest required paper
           dimension is less (e.g., 8.5 in × 11 in, or A5), a greater _res_
           (and lesser _unitwidth_) can be specified.
    
           Font metrics for Intellifont fonts were provided by Tagged Font
           Metric (TFM) files originally developed by Agfa/Compugraphic.  The
           TFM files provided for these fonts supported 600+ glyphs and
           contained extensive lists of kerning pairs.
    
           To accommodate developers who had become accustomed to TFM files,
           HP also provided TFM files for the 10 TrueType fonts included in
           the LaserJet 4.  The TFM files for TrueType fonts generally
           included less information than the Intellifont TFMs, supporting
           fewer glyphs, and in most cases, providing no kerning information.
           By the time the LaserJet 4000 printer was introduced, most
           developers had migrated to other means of obtaining font metrics,
           and support for new TFM files was very limited.  The TFM files
           provided for the TrueType fonts in the LaserJet 4000 support only
           the ISO Latin-2 (8859-2) symbol set, and include no kerning
           information; consequently, they are of little value for any but
           the most rudimentary documents.
    
           Because the Intellifont TFM files contain considerably more
           information, they generally are preferable to the TrueType TFM
           files even for use with the TrueType fonts in the newer printers.
           The metrics for the TrueType fonts are very close, though not
           identical, to those for the earlier Intellifont fonts of the same
           names.  Although most output using the Intellifont metrics with
           the newer printers is quite acceptable, a few glyphs may fail to
           print as expected.  The differences in glyph metrics may be
           particularly noticeable with composite parentheses, brackets, and
           braces used by _eqn_(1).  A script, located in _/usr/local/share/_
           _groff/1.23.0/font/devlj4/generate_ , can be used to adjust the
           metrics for these glyphs in the special font “S” for use with
           printers that have all TrueType fonts.
    
           At the time HP last supported TFM files, only version 1.0 of the
           Unicode standard was available.  Consequently, many glyphs lacking
           assigned code points were assigned by HP to the Private Use Area
           (PUA).  Later versions of the Unicode standard included code
           points outside the PUA for many of these glyphs.  The HP-supplied
           TrueType TFM files use the PUA assignments; TFM files generated
           from more recent TrueType font files require the later Unicode
           values to access the same glyphs.  Consequently, two different
           mapping files may be required: one for the HP-supplied TFM files,
           and one for more recent TFM files.
    


## Options



           **--help** displays a usage message, while **-v** and **--version** show
           version information; all exit afterward.
    
           **-c** _num-copies_
                  Format _num-copies_ copies of each page.
    
           **-d**[_n_] Use duplex mode _n_ : 1 is long-side binding (default), and
                  2 is short-side binding.
    
           **-F** _font-directory_
                  Prepend directory _font-directory_ /dev _name_ to the search path
                  for font and device description files; _name_ is the name of
                  the device, usually **lj4**.
    
           **-l** Format the document in landscape orientation.
    
           **-p** _paper-format_
                  Set the paper format to _paper-format_ , which must be a valid
                  paper format as described above.
    
           **-w** _line-width_
                  Set the default line thickness to _line-width_ thousandths of
                  an em; the default is **40**(0.04 em).
    


## Exit status



           _grolj4_ exits with status **0** on successful operation, status **2** if
           the program cannot interpret its command-line arguments, and
           status **1** if it encounters an error during operation.
    


## Environment



           _GROFF_FONT_PATH_
                  lists directories in which to seek the selected output
                  device's directory of device and font description files.
                  See _troff_(1) and _groff_font_(5).
    


## Files



           _/usr/local/share/groff/1.23.0/font/devlj4/DESC_
                  describes the **lj4** output device.
    
           _/usr/local/share/groff/1.23.0/font/devlj4/_ F
                  describes the font known as _F_ on device **lj4**.
    
           _/usr/local/share/groff/1.23.0/tmac/lj4.tmac_
                  defines macros for use with the **lj4** output device.  It is
                  automatically loaded by _troffrc_ when the **lj4** output device
                  is selected.
    


## Bugs



           Small dots.
    


## See also



           _HP PCL/PJL Reference: PCL 5 Printer Language Technical Reference_
           _Manual, Part I_ ⟨http://www.hp.com/ctg/Manual/bpl13210.pdf⟩
    
           _hpftodit_(1), _groff_(1), _troff_(1), _groff_out_(5), _groff_font_(5),
           _groff_char_(7)
    


* * *