Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xpr(1) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       xpr(1)                                                        xpr(1)


       NAME
             xpr - print an X window dump

       SYNOPSIS
             xpr [-o output-name] [-a path-name [-n]] [-d name] [-h text] [-t text]
                   [-W decimal-number] [-H decimal-number] [-l] [-p] [-L decimal-number]
                   [-T decimal-number] [-s integer] [-S integer] [-r] [path-name]
                   [-C] [color-list] [input-name]

       DESCRIPTION
             The xpr command, substantially modified from the original X
             Consortium version, takes an X window dump file produced by
             xwd and formats it for output on one of several printers.  If
             no output-name argument is given the standard output is used.
             If no input-name argument is given the standard input is used.

             By default the xpr program prints the largest possible
             representation of the window which will fit on the output
             page.  Options allow the user to add a header and a trailer,
             specify margins, adjust the scale and orientation, and append
             multiple window dumps to a single output file.

          Options
             -o path-name
                       output to path-name.  (If path-name exists, the
                       contents are overwritten; if path-name does not
                       exist, create it.)

                       When printing files formatted via xpr with lp,
                       include in the lp command line the option -o
                       stty=opost.  This should be all that's needed for
                       printers administered via lpadmin.  If this isn't
                       sufficient, try adding -T devicetype, where
                       devicetype is the same that was given in the xpr
                       command (-d devicetype).

             -a path-name
                       append output to path-name.  The original file
                       should already include any necessary printer
                       initialization sequences.  On an empty or non-
                       existent file, the created file will not have
                       printer initialization sequences, the printer must
                       be initialized by other means.





                           Copyright 1994 Novell, Inc.               Page 1













      xpr(1)                                                        xpr(1)


            -n        remove any formfeed or other page break control
                      sequences from the end of the original content of
                      the output file.  This allows concatenating of
                      images.  The default margins, or margins specified
                      with the -L and -T options, are still applied to the
                      new image, use the -T option to force the new image
                      to follow immediately after the old image.  Do not
                      use this option with postscript printers.  The -a
                      option must be used with this option.

            -d name   convert image to a printer-ready version for the
                      device named in name

            -h text   place header given in text 1/4 inch above the image
                      in approximately 15 point type.  Any printable ASCII
                      text plus spaces may be included in text.

            -t text   place the trailer given in text 1/4 inch below the
                      image in approximately 15 point type.  Any printable
                      ASCII text plus spaces may be included in text.

            -W decimal-number
                      scale image to be at most decimal-number inches
                      wide.  For some devices the width may be
                      significantly less than decimal-number.  This option
                      overrides the -S option.  Requested widths resulting
                      in a scale less than one, default to a scale of one;
                      thus the image may be larger than requested.

            -H decimal-number
                      scale the image to be at most decimal-number inches
                      high.  For some devices the height may be
                      significantly less than decimal-number.  This option
                      overrides the -S option.  Requested heights
                      resulting in a scale less than one, default to a
                      scale of one; thus the image may be larger than
                      requested.

            -l        rotate image 90 degrees counter-clockwise,
                      (``landscape'' mode).  By default the image is
                      printed so that its longest side parallels the
                      longest edge of the printed page.

            -p        print image upright.  By default the image is
                      printed so that its longest side parallels the
                      longest edge of the printed page.


                          Copyright 1994 Novell, Inc.               Page 2













       xpr(1)                                                        xpr(1)


             -L decimal-number
                       print image decimal-number inches right from the
                       leftmost printable column of the paper.  Due to
                       paper alignment differences in printers, the actual
                       margin may vary.

             -T decimal-number
                       print image decimal-number inches down from the
                       top-most printable row of the paper.  Due to paper
                       alignment differences in printers, the actual margin
                       may vary.

             -s integer
                       split image, including headers and trailers, onto
                       integer pages.  The complete image can be pasted
                       together by hand from the separate strips printed on
                       each page.  This is typically needed for printers
                       that cannot handle a large image on one page due to
                       memory limitations.

             -S integer
                       scale image by integer.  This defaults to the
                       largest scale which allows the full image to be
                       printed on a page, and limits the size of individual
                       pixels to less than 1/4 inch on a side.

             -r        print an inverted xwd file dumped from a monochrome
                       screen or to a monochrome printer.  The printed
                       image is ``intensity inverted,'' that is, where ink
                       would be applied in the printed image without the
                       -rP option, ink is not applied, and vice versa.

             -C color-list
                       assume the printer has colors in color-list.  The
                       colors must be listed from darkest to lightest.  For
                       example, the typical ribbon used with color printers
                       would be specified as -C black,cyan,magenta,yellow.

                       If a printer that normally has a multicolored ribbon
                       has a single-color ribbon (for example, black), use
                       the -C option to get a monochrome printout, for
                       example, -C black.

       USAGE
             The xpr program is installed with several Terminfo entries.
             These will overwrite entries currently installed on your


                           Copyright 1994 Novell, Inc.               Page 3













      xpr(1)                                                        xpr(1)


            system.  Similarly, installing the Terminal Information
            Utilities (TIU) will overwrite the Terminfo entries supplied
            with xpr.  This requires saving any entries which would be
            overwritten and adding them at the end of the second
            installation.

            UNIX System V/386 Release 4 only: The terminfo entries are
            contained only with TIU.

            These will overwrite any entries currently resident on the
            system.  If the xpr versions of the Terminfo entries are
            overwritten, you may get the message

                  xpr:  Device <name> not supported.

            The -r option may be necessary for printing monochrome images;
            for example, images with no color table.

            When using xpr, certain printers may produce a split image
            across pages.  This can be corrected by changing margins
            and/or height and width.

            Long text strings are truncated and a tab is not expanded but
            printed as a space.

            The append (-a) and output (-o) options are now mutually
            exclusive.  If both options are specified on the same command
            line, xpr will exit with an error message.  If the file
            specified by the append option is unreadable, xpr will print
            an error message and exit.

            Bitmaps (or ``color'' images of depth 1) are not reproduced
            using the -dpostscript option (nothing is printed).  The -dps
            option can be used to print such images.

            Titles are not produced well with the -dpaintjet option (the
            header and trailer appear but inside a black box).

            Splitting of images across multiple pages does not work well
            with the -dpostscript option (subsequent pages show the split
            images but on a dark page).  Similarly, the -a option does not
            work well with the -dpostscript option (dark page for
            subsequent images (without -n), or subsequent images missing
            (with -n).




                          Copyright 1994 Novell, Inc.               Page 4













       xpr(1)                                                        xpr(1)


             For low resolution devices, the header and trailer text looks
             bad.  Try using capital letters.

             Appending images with the -n option behaves differently on
             various printers.  In general, page printers, such as the
             LaserJetO, place the second image relative to the upper-left
             corner of the first page, while other printers place the
             second image relative to the last line of the first image.

          Dual Syntax
             A dual syntax is supported for xpr.  The supported equivalents
             are as follows:

                   -o    -output

                   -a    -append

                   -n    -noff

                   -d    -device

                   -h    -header

                   -t    -trailer

                   -W    -width

                   -H    -height

                   -l    -landscape

                   -p    -portrait

                   -L    -left

                   -T    -top

                   -s    -split

                   -S    -scale

                   -r    -rv

          Supported Printers
             xpr currently supports the printers in the following table.
             The first column lists the device names supplied for the xpr


                           Copyright 1994 Novell, Inc.               Page 5













      xpr(1)                                                        xpr(1)


            command.  The second column lists tested hardware that is
            supported by the device.  The third column lists the generic
            type of printer that the hardware emulates.  Generally, other
            printers of similar kinds can try using the device names shown
            in the table.
      ______________________________________________________________________________________
     |  Device Name |  Hardware |        Emulation       |             Comments            |
     |______________|___________|________________________|_________________________________|
     | 455          | AT&T 455  |                        | Daisywheel printer              |
     | 457          | AT&T 457  |                        | Daisy printer parallel          |
     | 458          | AT&T 458  |                        | Daisy printer serial            |
     | 477-455      | AT&T 477  | 455                    |                                 |
     | 477-470      | AT&T 477  | 470                    |                                 |
     | 477ibmc      | AT&T 477  | IBM Color printer      |                                 |
     | 477ibmg      | AT&T 477  | IBM Graphics printer   |                                 |
     | 477qume      | AT&T-477  | Qume                   |                                 |
     | 477-5x6      | AT&T 477  | Fujitsu DPL24C         | 5:6 aspect ratio                |
     | 477          | AT&T 477  | Fujitsu DPL24C         | 1:1; low resolution             |
     | 477-hi       | AT&T 477  | Fujitsu DPL24C         | 1:1; high resolution            |
     | 470          | AT&T 470  | C.Itoh 8510            | 8"; parallel matrix printer     |
     | 471          | AT&T 471  | C.Itoh 1550            | 14"; parallel matrix printer    |
     | 475          | AT&T 475  | C. Itoh 8510           | 8"; serial matrix printer       |
     | 476          | AT&T 475  | C.Itoh 1550            | 14"; serial matrix printer      |
     | 473          | AT&T 473  | C.Itoh 8510EP          | 8"; IBM Graphics                |
     | 474          | AT&T 474  | C.Itoh 1550EP          | 14"; IBM Graphics               |
     | 478          | AT&T 478  |                        | 8"; parallel matrix printer     |
     | 479          | AT&T 479  |                        | 14"; IBM parallel; matrix printe|
     | 495ibm       | AT&T 495  | IBM Graphics           |                                 |
     | 495qume      | AT&T 495  | Qume                   |                                 |
     | 495hp        | AT&T 495  | HP Laserjet I emulation|                                 |
     | 5310         | AT&T 5310 |                        | (EMUL set to ANSI)              |
     | 5320         | AT&T 5320 |                        | (EMUL set to ANSI)              |
     | 570eps       | AT&T 570  | Epson                  |                                 |
     | 570ibm       | AT&T 570  | IBM ProPrinter         |                                 |
     | 571eps       | AT&T 571  | Epson                  |                                 |
     | 571ibm       | AT&T 571  | IBM ProPrinter         |                                 |
     | 572          | AT&T 572  |                        | 9-wire Matrix Printer           |
     | 573          | AT&T 573  |                        | 9-wire Matrix Printer           |
     | 580ibm-5x6   | AT&T 580  | IBM Proprinter XL      | 5:6 aspect ratio; low           |
     |              |           |                        | resolution                      |
     | 580ibm       | AT&T 580  | IBM Proprinter XL in AG| 1:1; low resolution             |
     | 580ibm-hi    | AT&T 580  | IBM Proprinter XL in AG| 1:1; high resolution            |
     | 581ibm-5x6   | AT&T 581  | IBM Proprinter XL      | 5:6 aspect ratio; low           |
     |              |           |                        | resolution                      |
     |______________|___________|________________________|_________________________________|



                          Copyright 1994 Novell, Inc.               Page 6













       xpr(1)                                                        xpr(1)


       ______________________________________________________________________________________
      |  Device Name |  Hardware |        Emulation       |             Comments            |
      |______________|___________|________________________|_________________________________|
      | 581ibm       | AT&T 581  | IBM Proprinter XL in AG| 1:1; low resolution             |
      | 581ibm-hi    | AT&T 581  | IBM Proprinter XL in AG| 1:1; high resolution            |
      | 583ibm-5x6   | AT&T 583  | IBM Proprinter XL      | 5:6 aspect ratio; low           |
      |              |           |                        | resolution                      |
      | 583ibm       | AT&T 583  | IBM Proprinter XL in AG| 1:1; low resolution             |
      | 583ibm-hi    | AT&T 583  | IBM Proprinter XL in AG| 1:1; high resolution            |
      | 583ibm-5x6-80| AT&T 583  | IBM Proprinter XL      | 5:6 aspect ratio; low           |
      |              |           |                        | resolution;80-col               |
      | 583ibm-hi-80 | AT&T 583  | IBM Proprinter XL in AG| 1:1; high resolution; 80-col    |
      | 583ibm-80    | AT&T 583  | IBM Proprinter XL in AG| 1:1; low resolution; 80-col     |
      | 580eps       | AT&T 580  | Epson LQ-2500          | low resolution                  |
      | 580eps-hi    | AT&T 580  | Epson LQ-2500          | high resolution                 |
      | 581eps       | AT&T 581  | Epson LQ-2500          | low resolution                  |
      | 581eps-hi    | AT&T 581  | Epson LQ-2500          | high resolution                 |
      | 583eps       | AT&T 583  | Epson LQ-2500          | low resolution                  |
      | 583eps-hi    | AT&T 583  | Epson LQ-2500          | high resolution                 |
      | 583eps-80    | AT&T 583  | Epson LQ-2500          | low resolution; 80-col          |
      | 583eps-hi-80 | AT&T 583  | Epson LQ-2500          | high resolution; 80-col         |
      | 593eps       | AT&T 593  | Epson FX86e            |                                 |
      | 593ibm       | AT&T 593  | IBM ProPrinter XL      |                                 |
      | 593hp        | AT&T 593  | HP Laserjet II         |                                 |
      | postscript   | generic   |                        |                                 |
      |              | PostScript|                        |                                 |
      | hppaintjet   | HP PaintJe|                        | 90 dots per inch; 16 colors     |
      | hppaintjetT  | HP PaintJe|                        | For transparencies              |
      | hppaintjet-hi| HP PaintJe|                        | 180 dots per inch; 8 colors     |
      | hppaintjetT-h| HP PaintJe|                        | For transparencies              |
      |______________|___________|________________________|_________________________________|

             Output for the HP PaintJet printer, a color printer capable of
             handling 16 colors from a palette of 330, can be produced
             using the -dpaintjet option.

             Output for the PostScript printer can now include grayscale
             rendering, when the -dpostscript option is used.  With this
             option, the header and trailer are printed using regular
             PostScript fonts, instead of the font images internal to xpr.
             The -dps option will produce the dithering rendering provided
             before (for example, XWIN 2.0's xpr -dpostscript option is now
             XWIN 4.0's xpr -dps option).





                           Copyright 1994 Novell, Inc.               Page 7













      xpr(1)                                                        xpr(1)


         Customizing the Terminfo Database for xpr
            For the xpr program, all printers are currently supported via
            the Terminfo database.  By adding new entries or changing the
            existing entries using the infocmp and the tic programs, you
            can customize the printer support.  The terminfo capabilities
            used by the xpr program are listed below [see terminfo(4) for
            information about these and other capabilities].

            colors
                  number of colors in the ribbon (besides black)

            initc*
                  select color band

            npins number of pins in print-head or graphics unit

            porder
                  matches software bits to print-head pins or unit bits

            rblm  end printing bit image graphics

            sbim  start printing bit image graphics

            spinh spacing of dots horizontally in dots per inch

            spinv spacing of dots vertically in dots per inch

            u1*   number of passes of print-head per image line

            u2*   type of image printing

            u3*   carriage return while in graphics mode

            u4*   repeat graphics unit

            u5*   newline while in graphics mode

            u6*   start image area

            u7*   end image area

            u8*   generate name of ribbon color

            The capabilities marked with an asterisk are only temporary
            names; they will change in a future release.  The terminfo(4)
            manual page does not describe their use, so a brief


                          Copyright 1994 Novell, Inc.               Page 8













       xpr(1)                                                        xpr(1)


             description is given below:

             initc This is the control sequence used to select a ribbon
                   band for printing.  It has one argument in a call to
                   tparm, the number of the ribbon band.  The argument 0
                   always selects the black band.  The band will stay
                   selected until the next use of this string.

             u1    For most printers, this value is 1.  The AT&T 5310/5320
                   provide a higher level dot resolution vertically, as
                   long as the application (xpr in this case) prints an
                   image row in two passes.  In general, u1 should be the
                   number of passes needed to print an image row.  The u5
                   (graphics newline) string is used after each pass-it is
                   expected that the printer takes care of moving the
                   correct distance before each pass.

             u2    This should be 1 for dot-matrix type printers where each
                   image row is constructed from byte packets representing
                   a piece one dot wide and npins dots tall.  It should be
                   2 for page printers where each image row is constructed
                   from byte packets representing a piece npins wide and
                   one dot tall.  In either case, the porder string defines
                   the mapping of bits in byte packets to printed dots.
                   The position of each number in the porder list
                   corresponds to a bit in the byte packet, most
                   significant bits first.  The numbers identify a printed
                   dot: for printers of type 1, the dots are numbered from
                   top to bottom; for printers of type 2, the dots are
                   numbered from left to right.  See the terminfo(4) manual
                   page for more information on the border capability.

             u3    This is the control sequence that moves the current
                   print position to the left edge of the bit image on the
                   current row.  It is used with one argument in a call to
                   tparm, the horizontal position of the left edge in dots.

             u4    This is the control sequence used to compress runs of
                   identical byte packets.  It is used with 2 or more
                   arguments in a call to tparm.  The first argument is the
                   string of bytes in the packet, and the second is the
                   number of times to repeat the packet.  Since the string
                   may not be in a useful form for some printers, the
                   individual bytes are available as the third through
                   ninth arguments.



                           Copyright 1994 Novell, Inc.               Page 9













      xpr(1)                                                        xpr(1)


            u5    This is the control sequence that moves the current
                  print position to the left edge of the bit image on the
                  next row.  It is used with one argument in a call to
                  tparm, the horizontal position of the left edge in dots.

            u6    This is the control sequence used to start an image at a
                  specific location on the page.  It is used with 5
                  arguments in a call to tparm, The first two arguments
                  give the horizontal and vertical position in dots.  The
                  control sequence should ensure that the printing of the
                  image starts at that location.  The third and fourth
                  arguments are the width and height of the image in dots.
                  The last is the scale factor; the u6 capability should
                  conditionally produce a non-null control sequence only
                  for a scale the printer can handle.  If the printer
                  can't handle a needed scale, the application (xpr) must
                  simulate the scale in software.

            u7    This is the control sequence to terminate an image area
                  started with u6.

            u8    This is a conditional Terminfo string used to match the
                  ribbon colors with the arguments to use with the initc
                  string.  It is used with one argument in a call to
                  tparm, the number of the ribbon band.  The string should
                  produce the name of the corresponding color, or a null
                  string for bands out of range.  The colors should be
                  numbered from darkest to lightest, that is, in the order
                  they should be overstruck to avoid staining the ribbon.
                  The color band 0 is reserved for black.

         Example
                  xpr -dpostscript -S4 -h "Figure 1" foo.xwd

            will read the file foo.xwd and format it for a PostScriptO
            printer, with a caption at the top and a scale factor of four.

      SEE ALSO
            curs_terminfo(3curses), infocmp(1M), terminfo(4), tic(1M),
            X(1)

      NOTES
            Portions of the page are derived from material which is
            copyright Massachusetts Institute of Technology.




                          Copyright 1994 Novell, Inc.              Page 10








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026