12.6 Generating Multibyte PDF Output

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

Table 12-6 Cross Platform Deployment - Scenario 4

Development Platform Deployment Platform Destination Format



PDF (multibyte)

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

12.6.1 Designing Your Reportin Pre-11g Version That Uses Motif Tool Kit Mechanism

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

  1. Create a new report with a TrueType multibyte font. For example, Simplified Arabic font with the AR8ISO8859P6 character set.

  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).


      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.6.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:

  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-7 Post Conversion Font File Names

    Before Converting After Converting After Renaming




  3. Copy the Windows TTF file used in your report to the fonts directory on your UNIX machine. For example, $ORACLE_HOME/fonts.

  4. Add the path to the TTF file in the REPORTS_PATH environment variable.

  5. Copy the AFM file to the $ORACLE_HOME/guicommon/tk/admin/AFM directory.

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


    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:


    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.

  7. Ensure that the uiprint.txt has the entry for the appropriate PPD file: printername: PostScript:2:test:ppd_file.

    For example:

  8. Edit the hpljet42.ppd file with any text editor.


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


  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 order:


    For example:

    *Font SimplifiedArabic: Standard "(001.01)" Standard ROM
  10. Ensure that the fonts used in your report are not aliased.

    Edit uifont.ali and comment the entries, if any, where Simplified Arabic font is aliased to some other font. For example: "SimplifiedArabic"="Arial".


    The uifont.ali file is located in the following directory on Windows and UNIX:
    • Windows: ORACLE_INSTANCE%\config\FRComponent\frcommon\tools\common

    • 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. In the [PDF:Subset] section, add the appropriate entries to subset the fonts.

    For example:

    [ PDF:Subset ]      "SimplifiedArabic" = "simpo.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 font that you have used in your report. For example, the David font.

    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 should display the David font. 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 log file debug.txt. 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 11, "Using PDF in Oracle Reports" for more information on DEBUG_SLFIND.

12.6.3 Frequently Asked Questions

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


What are the cross-platform issues for the PDF output when using CID multibyte fonts?


To enable multibyte language support in PDF reports with CID multibyte fonts, you must make sure that the Asian font package is installed for your Acrobat Reader on the machine where you are going to view these PDF files. The Asian font package is available at the Adobe Web site.


Why is the formatting of my report not correct when using multibyte fonts on UNIX, or why do I see misaligned text in the report?


If you have used ttf2pt1 to create the AFM file, ttf2pt1 has a limitation in that it creates AFM files with metrics information for only the first 256 characters of the font. The first 256 characters are for Latin-1 characters. So, if your font contains more than 256 characters, metrics information will not be available for the additional characters. Oracle Reports uses default metrics information contained in the AFM file when it encounters characters in the report that are not in the AFM file. These default metrics may not match the exact metrics of the characters used in the report. For this reason, formatting will not be correct. To avoid this situation when you are using characters beyond the first 256 characters of the font, you can use fixed width fonts where all the characters have the same width. For example, Miriam Fixed is a fixed width font for Hebrew and can be used to avoid formatting issues.