Oracle® Fusion Middleware Publishing Reports to the Web with Oracle Reports Services 11g Release 1 (11.1.1) B32121-01 |
|
![]() Previous |
![]() Next |
Table 11-8 shows the cross-platform deployment scenario where the destination format is Unicode PDF created using PDF font subsetting. For more information on PDF font features, refer to Chapter 10, "Using PDF in Oracle Reports".
Table 11-8 Cross Platform Deployment - Scenario 5
Development Platform | Deployment Platform | Destination Format |
---|---|---|
Windows |
UNIX |
PDF (Unicode) |
This section discusses designing and deploying a report for Unicode PDF output in the following subsections:
Designing Your Report in Pre-11g Version That Uses Motif Tool Kit Mechanism
Deploying Your Report in Pre-11g Version That Uses Motif Tool Kit Mechanism
To prepare your report before you deploy it on a UNIX platform:
Create a new report using a Unicode font. For example, Arial Unicode MS font.
Use only those fonts in your report that:
Cover the entire Unicode range that your report uses.
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:
|
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.
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:
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
.
Post-conversion, remove the .afm
extension in the AFM file name. For example:
Copy the Windows TTF file used in your report to the fonts directory on your UNIX machine. For example, $ORACLE_HOME/fonts
.
Add the path to the TTF file in the REPORTS_PATH
environment variable. For example, arialuni.ttf
.
Copy the AFM file to the $ORACLE_HOME/guicommon/tk/admin/AFM
directory. For example, ArialUnicodeMS.
Edit the screenprinter.ppd
file with any text editor.
Note: If you have defined a default printer by including an entry inORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin/uiprint.txt , then you will have to make 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), a default printer surface that mimics the screen ( The PPD and HPD files are located at:
Oracle Reports searches for HPD or PPD files initially in the Oracle Instance location and then in the Oracle Home location. Refer to Section 9.8.1, "ScreenPrinter" for more information on the |
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.
Ensure that the uiprint.txt
has the entry for the appropriate PPD file.
printer name:PostScript:2:test:ppd file
In this example:
printer1:PostScript:2:test:hpljet42.ppd
Edit the hpljet42.ppd
file with any text editor.
Note: Copy the PPD file fromORACLE_HOME/guicommon/tk/admin/PPD to the following location:
|
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:
*FONTNAME:ENCODING:VERSION:LOCATION
For example:
*Font ArialUnicodeMS: Standard "(Version 2.76)" Standard ROM
In the [PDF:Subset]
section, add the following entries to subset the fonts used in your report.
For example:
[ PDF:Subset ] "Arial Unicode MS" = "arialuni.ttf"
Use the PDF subsetting feature to generate multibyte PDF output from your reports and to ensure your PDF report is portable. Thus, there is not dependency on the machine deploying the report to have the fonts installed.
Run the report to PDF and view it.
http://mywebserver.com:reports/rwservlet?server=myserver+report= "/home/myreports/test.rdf"+authid=hr/hr@mydb+desformat=PDF+destype=cache
The PDF should contain the unicode font used in your report. For example, Arial Unicode MS.
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:
The PPD file that you modified should be picked up. If it is not picked up it is a configuration issue. Refer to Chapter 8, "Managing Fonts in Oracle Reports".
The AFM files that you have copied to AFM directory should be picked up next.
See Chapter 10, "Using PDF in Oracle Reports" for more information on DEBUG_SLFIND
.
This section contains frequently asked questions (FAQs) pertaining to deploying a report to Unicode PDF output.
Question
Why is the formatting of my report not correct when using Unicode on UNIX, or why do I see misaligned text in the report?
Answer
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. So, if you are using multiple languages in the report with a Unicode font like Arial Unicode MS, when you create the AFM file for UNIX, there will not be metrics information for the characters beyond the first 256 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 formatting issues 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.