Skip Headers
Oracle® Fusion Middleware Publishing Reports to the Web with Oracle Reports Services
11g Release 1 (11.1.1)

Part Number B32121-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

12.5 Generating Single-Byte PDF Output

Table 12-4 shows the cross-platform deployment scenario where the destination format is single-byte PDF created using PDF font subsetting. For more information on PDF font features, refer to Chapter 11, "Using PDF in Oracle Reports".

Table 12-4 Cross Platform Deployment - Scenario 2

Development Platform Deployment Platform Destination Format

Windows

UNIX

PDF (single byte)


This section discusses designing and deploying a report for single-byte PDF output in the following subsections:

12.5.1 Designing Your Report

To prepare your report before you deploy it on a UNIX platform:

  1. Create a new report.

  2. Use only those fonts in your report that:

    • Are available on UNIX. All font files that are available on Windows (TTF files) may not be available on UNIX (AFM or TFM files). If you have the correct AFM or TFM font file available on the UNIX platform, you can continue to use it (AFM for PostScript and TFM for PCL).

      Note:

      AFM support is extended only to single-byte PostScript file generation, with the exception of Japanese encoding.

      The encoding schemes supported for the AFM files are:

      • AdobeStandardEncoding

      • ExtJIS12-88-CFEncoding

      • FontSpecific

      • HRoman

      • ISOLatinHebrew

      • JIS12-88-CFEncoding

      • JIS12e-88-CFEncoding

    • Can scale well. For example, MS Sans Serif does not scale well to a different size, whereas Tahoma does. The reason is that the MS Sans Serif font is a raster font that does not scale well to any size and usually has rounding issues. On the other hand, Tahoma font is a TrueType font that is very similar in visual appearance to the MS Sans Serif font. Additionally, Tahoma is a vector font that can be scaled to any size and rotated to any angle.

12.5.2 Deploying Your Report in Pre-11g Version That Uses Motif Tool Kit Mechanism

For fonts with AFM files not readily available on UNIX, or if you encounter any font issues in the report output such as text misalignment, you can convert and generate an AFM file from the Windows TTF file using freely available third party utilities, such as ttf2pt1. Do not attempt to convert to a TFM file, as this may not produce reliable results.

To deploy your report on a UNIX platform using PDF font subsetting:

  1. Locate the TTF files corresponding to the fonts used in your report. Convert these TTF files to AFM to ensure that you will have the AFM files for the fonts used in your report.

    Use a True Type to Type 1 font converter utility to convert the TTF files to AFM files. For example, ttf2pt1.

  2. Post-conversion, remove the .afm extension in the AFM file name. For example:

    Table 12-5 Post Conversion Font File Names

    Before Converting After Converting After Renaming

    arial.ttf

    arial.afm

    Arial

    cour.ttf

    cour.afm

    CourierNew


  3. Copy the Windows TTF files that you have used in your report to the fonts directory on your UNIX machine. For example, $ORACLE_HOME/reports/fonts.

  4. Add the path to the TTF files in the REPORTS_PATH environment variable. This ensures that the font files can be referenced by Reports Runtime.

  5. Edit the screenprinter.ppd file with any text editor.

    Note:

    If you have defined a default printer by including an entry in ORACLE_HOME/guicommon/tk/admin/uiprint.txt, you must add the appropriate entries in the printer's PPD file for a PostScript printer or in the HPD file for a PCL printer.

    Beginning with Oracle Reports 10g Release 1 (9.0.4), if you have not set up a default printer:

    • A default printer surface that mimics the screen (screenprinter.ppd) is used for formatting.

    • You must add the necessary font and resolution entries in the screenprinter.ppd file.

    The PPD and HPD files are located at:

    • $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin

    • $ORACLE_HOME/guicommon/tk/admin

    Oracle Reports searches for HPD or PPD files initially in the Oracle Instance location and then in the Oracle Home location.

    Refer to Section 10.8.1, "ScreenPrinter" for more information on the screenprinter.ppd file.

    Ensure that the PPD/HPD file used contains an entry for each AFM or TFM file that you use in your report. PPD/HPD files are configuration files containing printer driver settings and the list of all the fonts supported by the printer.

    Navigate to the to the Font Information section in the PPD file and add the necessary entries for the font files in the following format:

    *FONTNAME:ENCODING:VERSION:LOCATION
    

    For example:

    *Font Arial: Standard "(Version 2.76)" Standard ROM
    *Font CourierNew: Standard "(Version 2.76)" Standard ROM
    

    Ensure that the AFM file name exactly matches the font name specified in the PPD file as Oracle Reports searches for this file based on the font name in the PPD file.

  6. Copy the converted AFM files to the $ORACLE_HOME/guicommon/tk/admin/AFM directory.

  7. Ensure that the uiprint.txt has the entry for the appropriate PPD file:

    printer name:PostScript:2:test:ppd file
    

    For example:

    printer1:PostScript:2:test:hpljet42.ppd
    
  8. Edit the hpljet42.ppd file with any text editor.

    Note:

    Copy the PPD file from ORALCE_HOME/guicommon/tk/admin /PPD to the following location:

    $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin/PPD

  9. Ensure that the PPD/HPD file used contains an entry for each AFM or TFM file that you use in your report.

    Navigate to the Font Information section and add the necessary entries for the new AFM files in the following format:

    *FONTNAME:ENCODING:VERSION:LOCATION
    

    For example:

    *Font Arial: Standard "(Version 2.76)" Standard ROM
    *Font CourierNew: Standard "(Version 2.76)" Standard ROM
    

    Ensure that the AFM file name is the same as the font name given in the PPD file. Oracle Reports searches for this file based on the font name in the PPD file.

  10. Ensure that the fonts used in your report are not aliased.

    For example, edit the uifont.ali and comment the entries in the [Global] section where Arial and Courier New are aliased, by default, to Helvetica and Courier respectively.

    [ Global ] # Put mappings for all surfaces here.
    # Mapping from MS Windows
    #Arial = helvetica
    #"Courier New" = courier
    

    Note:

    The uifont.ali file is located in the following directory on Windows and UNIX:

    • On windows: ORACLE_INSTANCE\config\FRComponent\frcommon\tools\common

    • On UNIX: $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin

    Use font aliasing only if you are unable to generate the AFM file for a particular font. You can then alias the missing font to the closest match. The fonts must be made available on the machine displaying the report output and not necessarily on the machine generating the report output.

  11. Add the appropriate entries in the [PDF:Subset] section to subset the fonts used in your report.

    For example:

    [ PDF:Subset ]
    "arial" = "arial.ttf"
    "courier new" = "cour.ttf"
    

    For PDF file portability, you can use either font subsetting or font embedding. File portability ensures that the PDF report does not depend on the machine where it is viewed to have the fonts installed.

  12. Run the report to PDF and view it. The PDF should contain the fonts used in your report. For example, Arial and Courier New fonts.

    To verify the fonts used, do the following:

    • In Acrobat Reader 6.0, choose File >Document Properties > Fonts.

    • In Acrobat Reader 3.0 and above, choose File >Document Info > Fonts.

    The Original Font column displays the Arial and Tahoma fonts. The PDF document should not contain any font alignment issues.

12.5.2.1 Troubleshooting Information

If you encounter deployment issues, review the following troubleshooting information:

  • If you do not get the correct fonts in the PDF output, set the environment variable DEBUG_SLFIND to a log file name (for example, debug.txt) and run the report. The font files that are looked up while parsing the PPD file as well as the fonts used will be written to the specified file. Specifically, check for the following:

    1. The PPD file that you modified should be picked up. If it is not picked up it is a configuration issue. Refer to Chapter 9, "Managing Fonts in Oracle Reports".

    2. The AFM files that you have copied to AFM directory should be picked up next.

    See Chapter 10, "Printing on UNIX with Oracle Reports" for more information on DEBUG_SLFIND.

12.5.3 Frequently Asked Questions

This section contains frequently asked questions (FAQs) pertaining to deploying a report to single-byte PDF output.

Question

My PDF report page count varies when it is deployed in Windows and UNIX platforms. What must I do to fix it?

Answer

Your report uses the default printer for formatting. Ensure that the same resolution and the same fonts used are made available to both the printers. One way of achieving this would be to generate AFM files from Windows TTF font files and then copy the Windows TTF files and AFM files to UNIX in the appropriate folders. Also set the same resolution as Windows in PPD/HPD files. Follow the process specified in the prior steps.

Question

The page count of my report varies when run on different installations of UNIX. How can I ensure that the page count of my report is the same regardless of the installation?

Answer

In UNIX, Oracle Reports uses the PPD/HPD file of the default printer in the installation for formatting. The resolution and list of fonts will be picked up from this PPD/HPD files. Beginning with Oracle Reports 10g Release 1 (9.0.4), if there is no default printer setup in the installation, then screenprinter.ppd will be used. This PPD file emulates the screen. Earlier versions of Oracle Reports used the DISPLAY environment variable instead. Ensure that the two installations use the same AFM/TFM files and font files, so that the number of pages of PDF output will be the same.