Document ID:        16888.1
Subject:            (V2/V25) PRINTING ON MOTIF
Last Revision Date: 19 November  1996
Author:EHCHEN


________________________________________________________________________________

              All You Need to Know About Printing on Motif

   There are a great many issues involved in printing from Oracle*Reports
on Motif. For example:

    - How to set up printers in Oracle*Report
    - How to instruct those printers to print reports in a desirable way
    - What are PPD files
    - What environment variables are there

   This bulletin will attempt to answer all those questions.

I. Setting Up Printers

  From Oracle*Reports designer, a user can bring up the Choose Printer
dialog box by selecting File->Choose Printers off the main menu. The dialog
box contains a list of pre-defined printers including the type and a full
description of each. From the dialog box, a user can choose a pre-defined
printer or specify a new printer. To choose a new printer, enter its name under
'Printer Name' and from the 'Printer Type' poplist select a driver that is
currently supported by the Toolkit.

   The Oracle Toolkit obtains the list of pre-defined printers from the file
uiprint.txt which is located in $ORACLE_HOME/guicommon/tk2/admin
for Oracle Reports 2.0, and in $ORACLE_HOME/guicommon2/tk21 for Oracle
Reports 2.5. Each printer is defined by one
line in that file. Each line contains five fields seperated by colons. Note
that all the fields must be filled and the line must end with a colon.

    PRINTER:PRINTER_DRIVER:TOOLKIT_DRIVER:PRINTER_DESCR:PRINTER_DESCR_FILE:

      PRINTER: Contains the name of the printer, as used with the lpr or lp
               command.

      PRINTER  Specifies the type of printer driver used for the printer. In
      DRIVER:  2.0.13 and before the Toolkit only supports Postscript. Starts
               with 2.0.14 however, the Toolkit will also support ASCII as a
               valid specification of PRINTER_DRIVER.

      TOOLKIT  Specifies the version of the printer driver that should be used
      DRIVER:  by the Toolkit. It is 1 or 2 for all Postscript printers; or 1
               for ASCII printers.

      PRINTER  Contains a description of the printer; for example, the speed
      DESCR:   and the location of the printer.

      PRINTER  Specifies the printer description file to be used with the
      DESCR    printer. Currently, the Toolkit only supports Adobe's PPD file
      FILE:    format for the printer description file. PPD stands for
               Postscript Printer Description. It will be discussed in the
               next section. If there is not a PPD file for the printer use
               default.ppd. This field is ignored for all ASCII printers.

II. Postscript Printer Description (PPD) Files

   Postscript Printer Description (PPD) files are a construct belonging to
Adobe, the owner of the proprietary Postscript language. PPD files define what
capabilities a printer has to applications like Oracle*Reports; for example:
which paper tray to use, what papersizes are available, what is the phyical
dimensions of the paper, what font is available, etc. Currently, Oracle*Reports
reads the paper sizes and fonts available on the printer and its default
resolution from this file. In the future, more information may be used; for
example, memory for proper image partitioning.

   When a user selects a printer that is not listed in uiprint.txt, or changes
the type of a printer to a Postscript type in the "Choose Printer" dialog box,
a file dialog will be raised to ask for the PPD file for the printer. Choose
the one that most closely resembles the printer. PPD files are generally named
something reminiscent of the actual printer model name. In TK2.0, the actual
model name can be found under "*ModelName:" listed in the PPD file; in TK2.1,
this will appear in the file dialog as the user selects a PPD file. If an
invalid PPD file is specified for the current printer (e.g., no PPD file is
specified, or the file is not found, or the file format is incorrect), the
Toolkit will use default.ppd instead which is a reduced copy of a Dataproducts
LZR-2665 PPD file. To better reflect the local default printer, a user can
copy another PPD file to default.ppd.

   PPD files are also OS-generic. To obtain a PPD file from another operating
system, a user can simply ftp it over. However, there are some differences in
the character sets; for example: Mac uses MacRoman8, and PC has different line
terminators. FTP will take care of those differences, but a binary copy won't.

   The following is a list of PPD files that are shipped with Oracle*Reports
on most of the platforms:

      PPD files             Corresponding Printers
      ------------          --------------------------
      aplwiigl.ppd          Apple LaserWriter IIg
      appl230.ppd           Apple LaserWriter v23.0
      datap462.ppd          Dataproducts LZR-2665
      decln03r.ppd          Digital LN03R ScriptPrinter
      declps20.ppd          Digital PrintServer 20
      declps32.ppd          Digital PrintServer 40
      default.ppd           Default Level 1 Postscript Printer
      hpljet41.ppd          HP LaserJet 4/4M Postscript 600DPI
      hpljet42.ppd          HP LaserJet 4/4M Postscript 300DPI
      lw13.ppd              Apple LaserWriter
      lwntx470.ppd          Apple LaserWriter II NTX
      nccps801.ppd          NEC Colormate PS/80
      tkphzr33.ppd          Tektronix Phaser III PXi v2011.108
      l300_493.ppd          Linotronic 300 v49.3
      l530_523.ppd          Linotronic 530

Note that PPD files and PRT files are totally different things though their
names may be the same in certain cases. PPD files are for Postscript printers
only. If a PPD file needed for a printer is not among the list of PPD files
that Oracle ships, do the following things in that order:

      1) Ask the printer vendor for the PPD file.
      2) Ask Adobe for the PPD file.
      3) Ask Adobe for a PPD specs and write the PPD file.
      4) Copy an existing PPD file and edit it.
      5) Buy a new printer.

The only reason customers should need to modify PPD files is when they add
fonts or memory to the printer and want these changes reflected in Oracle
applications.

III. Others Files

   The file uifnp.ali contains the alias mapping from Postscript font files to
Toolkit fonts. Each line in the file represents a mapping from a Postscript
font metrics file to Toolkit font attributes. The uifnp.ali file resides in
$ORACLE_HOME/guicommon/tk2/admin directory. The font metrics files are kept in
$ORACLE_HOME/guicommon/tk2/admin/AFM. The header section of the uifnp.ali file
contains the instructions on how to modify the file.

   The file uifont.ali, first introduced in 2.0.14, defines the font aliases
used by Oracle*Reports. It is particularly useful for cross-platform
development. The file is read every time a report is opened, run, and printed.
To alias a font, use the following syntax:

      source_font = destination_font

For each font, the following attributes can be specified:

      ..