PPD Files Printer-Related Files

Printing on UNIX with Oracle Reports 10-11 ■ AFM files ■ TFM files

10.4.4.1 AFM files

Each AFM files contains the font-related metrics for a single font. The metrics include various font attributes such as style, weight, width, and character set. AFM files and a description of the AFM file format are typically available from the font or printer vendors. To install the AFM file, just copy it to the AFM file location, which is listed in Section 10.2.2, Verifying the Printer Setup for Oracle Reports . The name of the file must match name of the font without the.afm extension. For example, if the font name is CodedreineunBold, the file name must be CodedreineunBold. To verify the font name, you can look for the fontname string in the AFM file. Please note that the AFM files are not font files, they are metrics files, which give information on how to properly format the characters for the printer. If you have an AFM file for a font, but the font is not present on the printer, Oracle Reports cannot generate the correct output on the printer because of the font metrics mismatch. You must ensure that the font used to design the report is also available on the printer.

10.4.4.2 TFM files

PCL uses HPD and TFM files. The HPD file contains the list of available fonts for the printer and each font refers to a TFM file. TFM files serve the same purpose as Adobes AFM files, with each file listing information about a single font. The HPD file is an ASCII file, which can be edited, but the TFM file is a binary file, which cannot be edited. To use a new font in Oracle Reports and have it appear correctly in PCL output, you need the HPD and TFM files for the printer. You can copy an HPD file from an existing one, after you ensure it is suitable for your printer. The fonts specified in the HPD file must be available on the printer. Oracle Reports includes a common set of TFM files. If you need other font metrics files for your printer, you should obtain them from your font or printer vendor. To install the TFM file, just copy it to the TFM file location, which is listed in Section 10.2.2, Verifying the Printer Setup for Oracle Reports .

10.4.5 uifont.ali

The uifont.ali file defines the font aliases used by Oracle Reports. It is an extremely useful tool for cross-platform development because it enables you to define which fonts to substitute when a particular font is unavailable. uifont.ali is located in: On Windows: ORACLE_ INSTANCE\config\FRComponent\frcommon\tools\common On UNIX: ORACLE_ INSTANCEconfigFRComponentfrcommonguicommontkadmin To alias a font, use the following syntax: source_font = destination_font For each font, you may also specify the following attributes: face.size.style.weight.width.character_set 10-12 Publishing Reports to the Web with Oracle Reports Services Styles may also be combined using a plus sign + to delimit the styles. For example: Arial.Italic+Overstrike = Helvetica.12.Italic.Bold This entry maps any Arial font that has both Italic and Overstrike styles to a 12-point, bold, and italic Helvetica font. Font faces can be case sensitive depending on the platform and the surface; that is, printer or system.

10.4.6 uiprint.txt

uiprint.txt provides a convenient way for you to provide details about the printer queue, such as the type of printer driver and the printer description. You should edit uiprint.txt for each instance of Oracle Reports.

10.4.7 Editing the Printer-Related Files

This section describes how to edit the various print-related files: ■ Editing PPD files ■ Editing HPD files for PCL printing

10.4.7.1 Editing PPD files

In some cases, you may need to change certain attributes in your PPD file. The sections that follow describe some of the attributes that you would commonly want to change: ■ Changing the default paper size ■ Changing the printer margin settings ■ Adding a new font entry to PPD files ■ Overriding the printer tray setting

10.4.7.1.1 Changing the default paper size Suppose that you need the page size to be A4

for some of your reports. On UNIX platforms, the printer driver is specified in uiprint.txt and the default page size is not necessarily set to A4. For example, hpljet41.ppd has LETTER as the default page size. Note that the default page size setting for each printer queue is taken from the corresponding PPD file. To set A4 as the default page size, you would do the following: 1. Edit uiprint.txt to include a PostScript Printer Description file extension is .ppd that supports the A4 page size. For example, you might include hpljet41.ppd. 2. As a backup, make a copy of hpljet41.ppd. 3. Add an entry to uiprint.txt: Printer_name: PostScript:1: the printer on floor1:hpljet41.ppd 4. Edit hpljet41.ppd and change these settings as follows: DefaultPageSize: A4 See Also: Chapter 9, Managing Fonts in Oracle Reports for more font-related information. See Also: Section 10.3.1, Editing uiprint.txt File for more information about uiprint.txt. Printing on UNIX with Oracle Reports 10-13 DefaultPageRegion: A4 DefaultImageableArea: A4 DefaultPaperDimension: A4

10.4.7.1.2 Changing the printer margin settings To change the margins, you must modify

the ImageableArea section in the PPD file. ImageableArea provides the bounding box of the area in which the printer may print for the page size named mediaOption. There will be one statement for each named page size supported by the device. DefaultImageableArea provides the mediaOption name of the default imageable area. Since there can be only one default page size, this value should be the same as the value of DefaultPageSize, DefaultPageRegion, and DefaultPaperDimension. The syntax for defining imageable area is as follows: ImageableArea mediaOption: llx lly urx ury DefaultImageableArea: mediaOption | Unknown ll stands for lower left corner and ur for upper right corner. The bounding box value of ImageableArea is given as four real numbers, representing the x and y coordinates of the lower left and upper right corners of the region, respectively, in the PostScript language default user space coordinate system. The x and y axes of a given page size correspond to the x and y axes of that page size in the PaperDimension entry. The imageable area is defined as the part of the page where the printer may actually make marks. On some printers, the imageable area of a given page size varies as a result of the current resolution, amount of memory, the direction of paper feed, and other factors. In PPD files where the imageable area of a given page size can vary, the imageable area recorded for that page size will be the intersection of all possible imageable areas for that page size. This formula ensures that the available imageable area is never smaller than that shown in the PPD file and all marks made within the imageable area will be visible. It does, however, also mean that the imageable area in the current configuration might actually be larger than the imageable area shown in the PPD file. The following table contains the option keywords currently registered for mediaOption, which designates a given page size on a device: Example To change the margins of an A4 page in the default.ppd, you would perform the following steps: Table 10–4 mediaOption Keywords mediaOption Paper Size Size pts Size mm Size inches Letter 612 792 215.9 279.4 8.5 11 Legal 612 1008 215.9 355.6 8.5 14 Ledger 1224 792 431.8 279.4 17 11 Tabloid 792 1224 279.4 431.8 11 17 A3 842 1191 297 420 11.69 16.54 A4 595 842 210 297 8.27 11.69 A5 420 595 148 210 5.83 8.27 B4 729 1032 257 364 10.12 14.33 B5 516 729 182 257 7.17 10.12