Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Making reports2.5 work in GUI mode on UNIX

Re: Making reports2.5 work in GUI mode on UNIX

From: William Kaufman <wkaufman_at_.com>
Date: 15 Aug 1998 03:12:22 GMT
Message-ID: <6r2uam$4fe$1@inet16.us.oracle.com>


In article <6r1p5n$rhc$1_at_nnrp1.dejanews.com>,  <sharathc_at_my-dejanews.com> wrote:
] I have a question for you. This is regarding printing bitmap reports ] generated through Reports2.5 on Unix.

    Below, I've included some documentation on configuring printers on Unix/VMS. Note that it only applies to Reports when run with MODE=BITMAP (the default on Motif, but not on character-mode).

Bill Kaufman,          | "Patience is a virtue.  Seersucker is a fabric."
wkaufman_at_us.oracle.com |                                   -- Bazooka Joe


/
/ $Header: prinfo.txt@@/main/1 \
/ Checked in on Wed Nov 5 17:26:36 PST 1997 by ksivaram \
/ Copyright (c) 1997 by Oracle Corporation. All Rights Reserved. \
/ $
/

                       UIPR PRINTING INFORMATION

    This file lists all information you'll need to run the Motif/CM printing code properly: all the files, all the variables, etc. It also describes some internal processes involved, like font lookups.

    All Toolkit developers should read this file; it's also useful for support people, product line developers and customers (though it will have to be localized to the current platform for the last).

FILES:     This is a list of all files used by printing. In parentheses after each file is the environment variable "type" that's used on Unix to find the file. It first looks in the variable TK2_{type}, then in ORACLE_{type}; then, in the global directory. For instance, PPD files are searched for in the directory specified in ${TK2_PPD}, then in ${ORACLE_PPD}, then in ${ORACLE_HOME}/guicommon/tk2/admin/PPD.

    (Note that "UNKNOWN" really means "UNKNOWN": it will look in ${TK2_UNKNOWN}, then ${ORACLE_UNKNOWN},...)

    For non-Unix platforms, see the platform-specific documentation.

uiprint.txt -- Printers configuration file (UNKNOWN)

    This is read when the first printer is created by the client application. This data is used to fill the text list in the "Choose Printer" dialog, and to provide a short description and a PPD file for each printer available.

    This file should be modified for each machine that the Toolkit is installed on. Note that you must define at least one entry, or set of of the PRINTER variables in order to create a printer. (See "LOGICALS/VARIABLES", below.)

    See uiprint.txt for the format of the file.

PPD/*.ppd -- PostScript Printer Definition file (PPD)

    These are supplied by Adobe and by the printer vendors. They contain various information about the printer. Currently, we read the paper sizes and fonts available on the printer and its default resolution from thiis file; in the future, we may use more information--for instance, memory for proper image partitioning.

    The only reason customers should need to modify these files is when they add fonts or memory to the printer and want these changes reflected in Oracle applications. (See "POSTSCRIPT FONTS", below, for more information.) You can also change the "DefaultPageSize" field to your preferred page size. (Note that page sizes, like all PPD entries, are case-sensitive.) Other entries in the PPD file should generally be left alone.

    When you select a printer that's not listed in uiprint.txt, or change the type of the printer to a PostScript type in the "Choose Printer" dialog, a file dialog will be raised to ask for the PPD file for the printer. Choose the one for a printer that most closely resembles your printer.

    PPD files are generally named something reminiscent of the actual printer model name. In TK 2.0, you can find the actual the model name by looking for the "*ModelName:" listed in the PPD file; in TK 2.1 and later, this will appear in the file dialog as you select PPD files.

    If an invalid PPD file is specified for the current printer (e.g., no PPD file is specified, or the file isn't found, or the format is wrong), the Toolkit will use default.ppd instead: in the release, this is a reduced copy of a Dataproducts LZR-2665 PPD file. Customers are advised to make default.ppd a copy of another PPD file, to better reflect the local default printer.

    You can get a PPD file for your printer from your printer vendor. You can also get these by anonymous FTP to "ftp.adobe.com"; descriptions of the PPD format are listed there as well.

AFM/* -- Adobe Font Metrics files                       (AFM)

    Each AFM files list information about one font: the font attributes (style, weight, width, character set); whether the font is fixed pitch or proportional; how large each character is; etc.

    Because of the large number of fonts available on PostScript printers, and because many operating systems only allow a limited number of files in one directory (often 128 or 256), we've split up the AFM files by the first letter. Before looking in admin/AFM, the Toolkit will look for an AFM file first admin/AFM/{x}, where {x} is the first letter of the font face name.

    AFM files (and a description of the AFM file format) are available from the same sources as PPD files, and also from ftp.tex.ac.uk, ftp.dante.de, and ftp.shsu.edu, in the directory

        /ctan/tex-archive/fonts/postscript/adobe/Fonts/AFMs

on each machine.

HPD/*.hpd -- HP glue files

    HP's AutoFont Support Installer (available on PCs) generates these files automatically to maintain information on what fonts are available for a printer (much as Adobe's PPD files do). Documentation for the file format is available in HP's "PCL5 Developer's Guide".

    Oracle has added several fields to this file type, to allow users to specify additional information about the printer:

        Oracle-defined tag: Example:

        <monofont>

            The adjacent font will be reported by the Toolkit as the
        default monospaced font for the printer.

        <appfont={size}>        <appfont=1000>  # 10-point font
        <sysfont={size}>        <sysfont=1400>  # 14-point font

            The adjacent font will be reported by the Toolkit as the
        application or system font, respectively, in the size specified
        in centipoints (1/100 of a point).  If omitted, the size will
        default to 1200, or 12 points.

        <include={filename}>    <include=uica.hpd> # Include Cartridge A

            Includes the named file.  Useful for common font sets, like
        cartidges.

        <laserjet3>
        <laserjet3d>
        <laserjet3p>
        <laserjet3si>
        <laserjet4>
        <laserjet4+>
        <laserjet4l>
        <laserjet4m+>
        <laserjet4m>
        <laserjet4ml>
        <laserjet4mp>
        <laserjet4mv>
        <laserjet4p>
        <laserjet4pj>
        <laserjet4si>
        <laserjet4v>
        <colorjet>
        <dj1200>

            Oracle uses these fields to find out what type of printer
        you're using.  If this field isn't specified, the Toolkit
        assumes this is a LaserJet 3 printer.  Note that if this field
        isn't specified, or is incorrect for your printer, several
        features may be disabled.

	From release 2.5.6.6 and 2.3.6.9, Toolkit supports 'defaultpaper' 
	field. This field can be used to set the defaultpaper to be 
	used by Toolkit.

	The format of this field is:

        <defaultpaper={papername}

	Example:

	<defaultpaper=A4
	
	will set the default paper to A4.

        The papername is case insensitive.  If the user specifies this 
	field in more than one place, then the final defaultpaper 
	field's papername will be used as the defaultpaper. If the user 
	has specified a defaultpaper and the papername is not supported 
	by the printer, then the defaultpaper setting will be ignored and 
	the defaultpaper will be set to LETTER. Also if the papername 
	specified in this field is incorrect, then the defaultpaper will 
	be set to LETTER. 

TFM/*.tfm

    These files serve the same function as Adobe's AFM files, with each file listing information about a single font. See TFM/uitfm.txt for more information.

uifont.ali -- Font aliasing file                        (FONTALIAS)

    Most Toolkit clients (like Reports) will have the Toolkit translate fonts to the current surface. For PostScript printers, this means using, for example, "ITC Avant Garde Gothic" instead of "Avant Garde"; for HP printers, "Univers" instead of "helvetica". Customers can also add their own mappings if, for instance, they want to map a font available on their display to one available on their printer.

    See uifont.ali for a complete description.

a18.bdf, kanji18.bdf -- Kanji bitmaps                   (UNKNOWN)

    These files contain bitmaps of Kanji text, for use on printers that do not contain any Kanji fonts suitable for printing. See "SYNTHESIZED FONTS", below.

FONTS:     The Toolkit finds a font by the following method:

  1. If the client application requests font mapping, the font specified by the user will mapped according to the data in uifont.ali. (See "FILES", above, and in uifont.ali, for more information.)
  2. The Toolkit will restrict the number of fonts considered by removing any fonts whose character sets are not a superset of the character set requested. (Note that the Toolkit will use SJIS fonts for JEUC, and vice versa, and will CS-convert the output.)
  3. The Toolkit will restrict the fonts further by trying to find a matching font face name, if one is provided. It will first try to find a match to the native (PostScript or HP) font face, since that's most specific. If that fails, it will try to match:
  4. the "FamilyName" listed in the AFM file for each font (for example, "helvetica" for "Helvetica-Bold") if the printer is PostScript;
  5. a modified form of the HP typeface name, with spaces and styles removed to more closely resemble a Motif font name, if the printer is HP PCL.

    In all cases, the search will be case-insensitive, to account for various displays' case preference (lower case on Motif, mixed case on others, including PostScript itself).

    4) It will then further restrict the list, first by style, then by weight, then by width, if those are provided.

    5) If there's more than one font left at this point, it will reduce the list to the ones than most closely resemble the request. For example, if you specify a font weight of DemiBold, the list will be reduced to the DemiBold fonts present in the list; if there are no DemiBold fonts, it will remove all but the Medium and Bold fonts, etc.

    6) If no fonts are left, the search has failed; the Toolkit will return no font. If more than one font is left, the Toolkit will return the remaining font that most closely resembles the "DefaultFont" listed in the PPD file (usually, "Courier", plain style, medium weight, normal width).

POSTSCRIPT FONTS:     On PostScript printers, the Toolkit will only allow you to use fonts known to be available on the current printer. Since printers are rarely available for personal requests on multi-process operating systems, the Toolkit gets a complete list of font from the PPD file.

    If you add fonts to your printer, you should also add entries for these fonts to the printer's PPD file. The format for a font entry is

*Font {fontname}: {encoding} "({version})" {charset}

where {fontname} is the Adobe font face name as specified in PostScript; {encoding} is the PostScript encoding name; {version} is the FontInfo version number; and {charset} is the Adobe character set.

    Currently, only fonts with "Standard", "Special", "UnknownEncoding" and "RKSJ" encodings will be used; and the version and character set are ignored.

    When you add fonts to your printer, you should also make sure you have the matching AFM files, so that the Toolkit client applications can get the actual font attributes, and properly place text on the printed page.

    You can also remove fonts from the usable list by removing entries, but you're usually better off just making the font request more specific, by using the full PostScript font face name.

HP FONTS:     As with PostScript's AFM files, every HP font must have a TFM file in order for the Toolkit to use it; TFM files should be provided by the font vendor; and new fonts should be added to the glue file for your printer when installed.

    You must specify these fields in the glue file for any new font:

FONT={fontname} # {fontname} is a descriptive name for the font
/tfm={tfm-filename} # {tfm-filename} is the base filename for TFM file

    You can also specify these fields in the glue file, after the "FONT=" field, if the TFM file isn't specific enough:

/ptsize={size {size ...}}

    If the font is a bitmapped font, but is listed in the TFM file as a scaleable font, you can limit the point sizes used by listing all acceptable sizes.

/symset={symset {symset ...}}

    This field limits the supported symbol sets to those listed on the field. See the HP PCL documentation for a list of recognized symbol sets.

SYNTHESIZED FONTS:     The Toolkit will synthesize some fonts itself. These fonts will be available if the client requests synthesized fonts, and if they are requested by the client or user.

    Underlined fonts: If the style specified includes "underline", any text printed with such a font will be underlined.

    TK2_BITMAP: The Toolkit provides a way to download bitmaps for Kanji PostScript output, if your printer doesn't support Kanji. If you request a SJIS or JEUC font and no font with Kanji and ASCII is available, this "font" will be returned instead; when used to print text, bitmaps from a18.bdf (for half-width Katakana) or kanji18.bdf (for other Japanese text) will be used. ASCII text will be printed in Courier.

LOGICALS/VARIABLES:     In addition to the environment variables (or "logicals" on VMS) listed above for files, the following ones will also be useful (on Unix, at any rate--check your platform's documentation).

    DEBUG_SLFIND     If this is set, the file-finding routine (slfindfile()) will output information on each search, listing what was searched for an where. This is a tremendous help if your current configuration doesn't work.

    You can set it to a file name, in which case the output is stored in that file; or to "stdout", for output to go to standard output; or to "stderr", for output to standard error. If a file is named and cannot be written to, it will use "stderr" instead.

    Note that DEBUG_SLFIND is useful not only for printing, but for any file lookup in any Toolkit client.

    TK2_PRINTER
    ORACLE_PRINTER
    PRINTER     This will be the default printer name. The first variable in this list that's set to a valid printer will be used. If none of these are set to a valid printer, it will use the first entry (if any) in your uiprint.txt.

    TK2_PRINT     This stores the name of the print command executed on Unix (and possibly other platforms). This string is much like a printf() format: you can embed the following strings:

        %n     Name of the printer
        %c     Number of copies (printed as a decimal number)

    The default values for this string are

        System V:  lp -s -d'%n' -n%c
        UnixWare:  lp -s -Tpostscript -d'%n' -n%c
        Other:     lpr -P'%n' -#%c -s


    TK2_PRINT_STATUS     This stores the name of the command executed on Unix (and possibly other platforms) to validate the printer. It should also have a "%n" embedded in it, to hold the place of the printer name (see "TK2_PRINT", above).

    The default values for this string are

        System V:  /usr/bin/lpstat -p'%n'
        Other:     /usr/etc/lpc status '%n'

    To make sure the printer is valid, this command is executed, and its output is searched for the strings "unknown", "non-existent" or "invalid": if one of these strings appears in the output, the printer is assumed to be invalid, and cannot be selected by the user; if none of them appears, the printer will be accepted by the Toolkit.

    TK2_DEBUG_POSTSCRIPT     This variable will affect the output generated on PostScript. It can be set to any combination of these strings:

    Name Effect

    Any of the options can appear in the environment variable, abbreviated down to one letter; you can set it to any combination of these, separated by "/". This variable is case- irrelevant. So, "Func/L/Mem" will get you all three options.

    Note that the output that results from using this variable will not be supported by Oracle for customer use; it exists for debugging purposes only. Received on Fri Aug 14 1998 - 22:12:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US