Oracle Application Server Reports Services Publishing Reports to the Web 10g (9.0.4) Part Number B10314-01 |
|
Adobe Portable Document Format (PDF) is a universal file format that preserves all the fonts, formatting, graphics, and color, of any source document regardless of the application and platform used to create it. Oracle Reports was one of the first report generation tools to embrace this technology and generate quality PDF documents.
This chapter contains the following main sections:
This section contains information on the various PDF features supported by Oracle Reports. This includes compression, font aliasing, font subsetting, font embedding, accessibility, and taxonomy.
This section contains information on resolving PDF font issues that occur when you design a report on a Windows platform and deploy it on a UNIX platform.
This section contains information on how to generate a PDF file using Unicode character sets.
This section contains information on how to generate a PDF file using bidirectional (BiDi) languages such as Hebrew and Arabic.
This section contains information on how to generate a PDF file using multbyte fonts.
This section contains information on how to generate a Barcode PDF file.
Oracle Reports supports PDF 1.4 and is capable of generating high fidelity PDF reports on all platforms. The PDF features supported by Oracle Reports include:
PDF compression decreases the PDF file size, thereby reducing the time spent in downloading the PDF file.
The amount of space saved using compression varies based on the contents of the report, for example, the number of images versus the size of the content.
Compressed files are about one fifth the size of the original file. Testing has shown that the best case compression ratio of one-eigth to the worst case compression ratio of one-half was achieved based on the contents in the original file.
Oracle Reports implements a command line option to control the compression level of the PDF output. The PDF output from Oracle Reports is compressed, by default, and can be switched off or varied using the command line option: PDFCOMP.
Table 6-1 indicates which commands can use the PDFCOMP
keyword.
rwclient | rwrun | rwbuilder | rwconverter | rwservlet | rwcgi | rwserver |
---|---|---|---|---|---|---|
yes |
yes |
no |
no |
yes |
yes |
no |
Use PDFCOMP
to specify whether PDF output should be compressed.
PDFCOMP=
value
|{YES|NO}
value
Any value 0 through 9. A value of 0 means the PDF file will not be compressed. A value of 1 through 9 will compress the PDF file and permit users to control the compression level.
YES
Compresses output at compression level 6.
NO
Compresses output at compression level 0 (no compression).
6
Although compressed files download quickly, the time taken to generate a compressed file is much slower when compared to a non-compressed file.
Font aliasing enables you to substitute one font for another, i.e., font-to-font substitution. This font-to-font substitution is usually used when porting applications (in this case, your PDF file) across platforms. You can alias multibyte fonts as well as character sets.
Font aliasing occurs at the time of generating the PDF file. The PDF file will contain only the necessary font information required to display the output. The fonts used will not be embedded in the PDF file.
At the time of viewing the report, Adobe Acrobat replaces the aliased fonts based on the following:
Adobe
Sans
MM
font.
Adobe
Sans
MM
font does not match, the output may display dots for the data.
Font aliasing will work with any or all of the following:
There are no command line options for font aliasing.
Include the font aliasing entries in the uifont.ali
file. Oracle Reports aliases the font only when the entries in the uifont.ali
file match the font information included in the generated PDF file.
Note:
The
The |
The section for font aliasing in the uifont.ali
file is [PDF]
.
The entry in the uifont.ali
file for:
[PDF] "Font Name"="Font Name"
[PDF] Character Set = "Font Name"
or
"Font Name"....Character Set="Font Name"
Here is an example of a font aliasing entry in the uifont.ali
file:
[ PDF ] /*Alias TrueType to available Type 1 font */ "Kino MT" = UtopiaBold /*Alias multibyte to available CID font */ .....SJIS = "HeiseiKakuGo-W5-Acro"
where:
Kino MT
character found, with the UtopiaBold
equivalent.
.....SJIS = "HeiseiKakuGo-W5-Acro"
, Oracle Reports substitutes every multibyte character set found, with the HeiseiKakuGo-W5-Acro
(CID) equivalent.
If font aliasing does not work, verify that:
uifont.ali
file is incorrect.
[PDF]
section name in the uifont.ali
file has not been modified as Oracle Reports parses the file for the section name.
PDF font subsetting is a variant of PDF font embedding. This option includes only the glyphs and character information that is actually used in the document.
With font subsetting, there is no dependency on the machine having the fonts installed. PDF font subsetting works for both single and multibyte fonts and is the preferred method of creating multibyte reports.
There are no command line options for font subsetting.
Before using the font subsetting feature you must:
REPORTS_PATH
environment variable. Oracle Reports looks for fonts in the path specified in the REPORTS_PATH
environment variable when generating a PDF file.
uifont.ali
file. Oracle Reports subsets the fonts only when the font entries listed in the uifont.ali
file exist in the PDF file being generated.
The section for font subset in the uifont.ali
file is [PDF:Subset]
.
The entry in the uifont.ali
file is :
[PDF:Subset] Font Name = "Font File Name"
The file name entries should be enclosed within quotes; however, only font names containing two or more words should be enclosed within quotes.
The font file name referenced in the uifont.ali
file must match the existing font file name for font subsetting to work correctly.
[PDF:Subset] Arial = "Arial.ttf"
When you subset a font in a PDF file, it becomes a custom font because it contains only those characters needed for the report output.
Using Adobe Acrobat 3.0 or higher, you can view the fonts used in your report:
For optimum viewing, we recommend that you use Adobe Acrobat Reader 5.0 and set the following parameters in Adobe Acrobat Reader:
PDF font subsetting in Oracle Reports works with TrueType fonts only and not with Type1 fonts. To include specific TrueType fonts in your report, convert Type1 fonts to TrueType fonts using available 3rd party tools.
There is a limitation on UNIX platforms when working with TrueType fonts. To work around this issue do the following:
REPORTS_PATH
environment variable.
If font subsetting does not work, verify the following:
uifont.ali
file is incorrect.
filename
.ttf/
filename
.ttc
.
REPORTS_PATH
environment variable. When generating a PDF file, Oracle Reports looks for fonts in the path specified in the REPORTS_PATH
environment variable.
[PDF:Subset]
section name in the uifont.ali
file has not been modified. Oracle Reports parses the file looking for the section name.
Refer to Designing the Report on Windows and Deploying it on UNIX, for more information on running a report on UNIX machines.
PDF font embedding is the process of including the entire font set along with the data in the PDF file. PDF font subsetting and font embedding are mutually exclusive.
PDF font embedding in Oracle Reports is for Type1 fonts only (either single or multibyte fonts) and not for TrueType fonts. Convert TrueType fonts to Type1 fonts using available 3rd party tools in order to include specific Type1 fonts in your report.
PDF font embedding with Oracle Reports occurs between a font and a set of font file names.
The setup for PDF embedding includes:
[PDF:Embed]
The command line option PDFEMBED
is used to specify whether Oracle Reports will embed the Type1 postscript fonts specified in the uifont.ali
file into the PDF output.
Table 6-2 indicates which commands can use the PDFEMBED
keyword.
rwclient | rwrun | rwbuilder | rwconverter | rwservlet | rwcgi | rwserver |
---|---|---|---|---|---|---|
yes |
yes |
no |
no |
yes |
yes |
no |
Use PDFEMBED
to specify whether Oracle Reports will embed the Type1 PostScript font file(s) specified in the uifont.ali
file into PDF output.
PDFEMBED={YES|NO}
YES
The PDF driver will embed the font(s) specified in the [PDF:Embed]
header of the uifont.ali
file into the PDF output.
NO
The font(s) will not be added to PDF output.
YES
The section for font aliasing in the uifont.ali
file is [PDF:Embed]
.
(Windows only) The entry in the uifont.ali
file should be:
Font Name = "Font Name.pfm Font Name.pfb"
(UNIX only) The entry in the uifont.ali
file
should be:
Font Name = "Font Name.afm Font Name.pfa"
[PDF:Embed] Symbol = "Symbol.pfm Symbol.pfb"
In Example 6-1, the Symbol font is embedded into the PDF file. This ensures portability by:
font.
If PDF font embedding does not work, verify the following:
uifont.ali
file is incorrect.
REPORTS_PATH
environment variable is correct. When generating the PDF file, Oracle Reports looks for fonts in the paths specified in the REPORTS_PATH
environment variable.
[PDF:Embed]
section name in the uifont.ali
file has not been modified. Oracle Reports parses the file looking for the section name.
Font Name="fontfilename.pfm/.afm file fontfilename.pfb/.pfa file".
For example (Windows):
UtopiaMediumItalic = "UtopiaMediumItalic.pfm UtopiaMediumItalic.pfb"
The precedence order for the same font in multiple places within the uifont.ali
file is as follows:
For example, if you have included the same font entries for both font embedding and font subsetting, then font embedding will override font subsetting. This is assuming you have not set the command line option of PDFEMBED=NO
.
For all font features --font aliasing, font subsetting, and font embedding--include the specific entries first followed by the generic entries. For example, if you want to subset Arial Plain, Arial Bold, Arial Italic, and Arial Bold-Italic fonts, your entries should be in the following order:
[ PDF:Subset ] Arial..Italic.Bold.. = "Arialbi.ttf" Arial...Bold.. = "Arialb.ttf" Arial..Italic... = "Ariali.ttf" Arial..... = "Arial.ttf"
If the plain Arial..... = "Arial.ttf"
entry appears first, then all the styles of the Arial font in the layout will be subset as Arial Plain font. Here is a sample of a portion of the uifont.ali
file for all the PDF entries containing all three PDF sections:
[ PDF ] Palatino = "Kino MT.ttf" [ PDF:Subset ] Garmond..Italic.Bold.. = "Garmacbi.ttf" Garmond...Bold.. = "Garmacb.ttf" Garmond..Italic... = "Garmaci.ttf" Garmond..... = "Garamac.ttf" [ PDF:Embed ] Arial = "Arial.pfm Arial.pfb"
[PDF] Arial.10.Italic = "Times New Roman".12.Italic.Bold "Courier New" = Symbol [PDF:Embed] "Times New Roman".14..Bold = "TimesBold.pfm TimesBold.pfb" [PDF:Subset] Verdana..Italic.Bold = "Verdanaz.ttf" Verdana...Bold = "Verdanab.ttf"
Oracle Reports provides several ways for you to include accessibility features in your PDF file. The PDF format file follows the tagged-PDF standard defined in PDF 1.4. This standard along with Acrobat Reader 5 (or higher) provides you with features for inclusion in the paper layout. The command line option to include accessibility features in your output is ACCESSIBLE
.
Table 6-4 indicates which commands can use the ACCESSIBLE
keyword.
rwclient | rwrun | rwbuilder | rwconverter | rwservlet | rwcgi | rwserver |
---|---|---|---|---|---|---|
yes |
yes |
yes |
no |
yes |
yes |
no |
Use ACCESSIBLE
to specify whether accessibility-related features offered through Oracle Reports are enabled (YES
) or disabled (NO
) for the PDF file.
ACCESSIBLE={YES|NO}
YES
Accessibility features are enabled for PDF file.
NO
Accessibility features are not enabled for PDF file.
NO
Using the additional properties (Figure 6-4), you can provide the required information necessary for generating PDF documents that can be interpreted by assistive technology. For more information on accessibility, see the Creating Accessible Enterprise Reports using Oracle9i Reports white paper on (http://otn.oracle.com
)under Accessibility.
A PDF document can include global information about itself such as the document's title, author, creation and modification dates. This global information proves useful at the time of cataloguing or searching for documents in external databases.
Oracle Reports provides properties to enable such a classification, otherwise known as taxonomy. They are:
Refer to the Reports Builder online help for more information on the taxonomy properties.
Oracle Reports now provides enhanced support for graphs in PDF. This includes specifying a higher dots per inch (DPI) value to increase or improve the image resolution of the graph. The improved graph support enables you to scale the graph without compromising on the image quality.
The environment variable is REPORTS_GRAPH_IMAGE_DPI
.
The REPORTS_GRAPH_IMAGE_DPI
environment variable specifies a dots per inch (DPI) value for graphs being output to a printer (PDF, PostScript, or PCL). This environment variable allows you to increase the earlier fixed default value of 72 DPI, which helps in improving the image resolution for printed (PDF, PostScript, or PCL) graphs.
72 through 300
250
reports.sh
.
REPORTS_JVM_OPTIONS
to avoid the Out Of Memory
error for the JVM. See REPORTS_JVM_OPTIONS, for more information on setting the JVM options
There are font and text alignment issues when you design a report (single byte or multibyte) on the Windows platform and deploy it on a UNIX platform. The reason is that the font handling and windowing system are completely different across the two platforms.
Your report is designed and deployed on the same platform, e.g., Windows:
Your report is designed on the Windows platform and deployed on the UNIX platform.
(Windows) You use the TrueType fonts located in the Windows machine. Oracle Reports queries the font information from the Windows system for formatting the report.
(UNIX) When this report is sent to PDF on Solaris or any other UNIX platforms, there are two stages:
[PDF]
section of the uifont.ali
file. For font subsetting, Oracle Reports refers to the [PDF: Subset]
section and subsets the TrueType fonts from the given location. The subsetted fonts are then embedded in the PDF file.
This section outlines the steps involved in generating a PDF report (using single byte fonts) designed on the Windows platform on either Solaris or any other UNIX platform. These steps are required only if you see font alignment issues in your PDF output.
arial.ttf
and tahoma.ttf
.
arial.ttf
and tahoma.ttf
) and your report's .rdf
file to the UNIX platform. The path for the font files should be ORACLE_HOME/font folder
. Add the font file's path to the REPORTS_PATH
environment variable.
(arial.ttf
and tahoma.ttf)
.
arial.afm
and tahoma.afm
) generated to ORACLE_HOME
/guicommon9/tk90/admin/AFM.
TK_PRINTER
environment variable or the PRINTER
environment variable is set to the printer name. For example, hrprinter
.
uiprint.txt
file has the following entry:
printer name:PostScript:2:test:default.ppd:
For example:
hrprinter:PostScript:2:test:default.ppd:
ppd
file.
*Font arial: Standard "(001.001)" Standard ROM *Font tahoma: Standard "(001.001)" Standard ROM
PDF:Subset
] section at this time in the uifont.ali
file.
uifont.ali
file:
[ PDF:Subset ] "arial" = "arial.ttf" "tahoma" = "tahoma.ttf"
To confirm that the fonts are subset in the PDF file:
There are additional steps for generating reports with multibyte fonts. The steps involved in resolving font issues with PDF subsetting when deploying multibyte reports on UNIX platforms are as follows:
h2mjsm.ttf
and the KO16KSC5601
character set.
h2mjsm.ttf
and your report's .rdf
file to the UNIX platform. The font file path should be $ORACLE_HOME/
font folder
. Add the font file's path to the REPORTS_PATH
environment variable.
h2mjsm.ttf
.
$ORACLE_HOME/guicommon9/tk90/admin/AFM/. % cp h2mjsm.afm ORACLE_HOME/guicommon9/tk90/admin/AFM/h2mjsm
TK_PRINTER
environment variable or the PRINTER
environment variable is set to the printer name. For example, hrprinter
.
uiprint.txt
file has the following entry:
printer name:PostScript:2:test:default.ppd:
For example:
hrprinter:PostScript:2:test:default.ppd:
.ppd
file:
*DefaultFont: h2mjsm *Font h2mjsm: Special "(001.001)" Special ROM
*%Font Symbol: Special "(001.001)" Special ROM
uifont.ali
file to mention the font used for the character set:
The
The
Note:
uifont.ali
file is located in:
uifont.ali
file is the configuration file controlling all the Oracle Reports PDF font enhancements. Refer to Managing Fonts in Oracle Reports, for more information.
[ Global ] .....ko16ksc5601 ="h2mjsm" [ Printer:PostScript2 ] .....ko16ksc5601 ="h2mjsm"
[PDF]
or [PDF:Subset]
sections at this time in the uifont.ali
file.
uifont.ali
file to enable PDF subsetting:
[ PDF:Subset ] "h2mjsm"="h2mjsm.ttf"
To confirm that the fonts are subset in the PDF file:
There might be some variations in the alignment, as the font metrics handling is different in UNIX and Windows. This issue cannot be avoided.
A PDF file generated with the font subsetting enabled might have some font style issues (e.g., some content could be displayed as bold) when viewed in Acrobat Reader. This is because Acrobat Reader has a limitation while displaying the Type 3 fonts. See Recommended for more information on how to smoothen the display for Type 3 fonts.
Note:
This section outlines the steps involved in generating a PDF file with a Unicode character set.
The steps involved in generating a Unicode PDF file using the font subsetting feature are as follows:
NLS_LANG=AMERICAN_AMERICA.UTF8.
REPORTS_PATH
to the font directory in which the TrueType font exists. For example, C:\WINNT\Fonts
.
uifont.ali
file and edit the [PDF:Subset]
section to specify the TrueType font name.
Example
[ PDF:Subset ] "Andale Duospace WT J" = "Aduoj.ttf" "Albany WT J"="AlbanWTJ.ttf"
The specified font should cover the Unicode range that your report uses.
MLS
data with DESTYPE=FILE DESFORMAT=PDF.
This section outlines the steps involved in generating a PDF file for bidirectional (BiDi) languages.
Oracle Reports provides two environment variables that resolve font re-shaping and numeric options with bidirectional (BiDi) languages, such as Hebrew and Arabic. They are:
This environment variable switches the layout algorithm for bidirectional (BiDi) languages (for example, Arabic or Hebrew). The valid values for this environment variable are ORACLE
or UNICODE
.
This environment variable specifies the numeric format for Arabic PDF output.
The steps involved in generating a PDF file for bidirectional (BiDi) languages using the font subsetting feature are as follows:
NLS_LANG=ARABIC_EGYPT.AR8MSWIN1256
(or AR8ISO8859P6
on UNIX)
REPORTS_PATH
to the font directory in which the TrueType font exists. For example, C:\WINNT\Fonts
.
uifont.ali
file and edit the [PDF:Subset]
section to specify the TrueType font name.
Example
[PDF:Subset] "Andale Duospace WT J" = "Aduoj.ttf" "Albany WT J"="AlbanWTJ.ttf"
DESTYPE=FILE DESFORMAT=PDF
.
This section outlines the steps involved in generating a PDF file with multibyte fonts.
Figure 6-5 outlines the mapping table between Oracle NLS_CHARACTERSET
, CMap name, and its CID font name used in aliasing pdf.
(*) Those fonts are available Adobe in Acrobat Reader Version 5
(**) Those fonts are available Adobe in Acrobat Reader Version 4
It is recommended that you use Version 5 CIDFonts(*) with Acrobat Reader 5.0 in order to avoid unexpected font mapping, which results in multibyte characters overlapping.
The steps involved in generating a PDF file for multibyte fonts using the font aliasing feature are as follows:
NLS_LANG=JAPANESE_JAPAN.JA16SJIS
(or JA16EUC
on UNIX)
uifont.ali
file located and set the font alias under the [PDF]
section.
Example
[ PDF ] .....JA16SJIS = "KozMinPro-Regular-Acro" "MS UI Gothic".....JA16SJIS = "KozMinPro-Regular-Acro"
MS UI Gothic
).
DESTYPE=FILE DESFORMAT=PDF
.
If you view the PDF file with the Japanese version of Acrobat Reader 4.0/5.0 on the Japanese version of Windows, you do not need to install the Japanese font pack.
The steps involved in generating a PDF file for multibyte fonts using the font subsetting feature are as follows:
NLS_LANG=JAPANESE_JAPAN.JA16SJIS
(or JA16EUC
on UNIX)
REPORTS_PATH
environment to the font directory in which the TrueType font exists. For example, C:\WINNT\Fonts
.
uifont.ali
file located in the ORACLE_HOME
\tools\common90
directory and edit it at the [PDF:Subset]
section to specify the TrueType font name.
Example
[ PDF:Subset ] "Andale Duospace WT J" = "Aduoj.ttf" "Albany WT J"="AlbanWTJ.ttf" "MS UI Gothic" = "msgothic.ttc"
DESTYPE=FILE DESFORMAT=PDF
.
This section outlines the steps involved in generating a PDF file with barcode information.
The steps involved in generating a barcode PDF file using the font embedding feature are as follows:
REPORTS_PATH
environment variable to the font directory containing the Type1 font.
uifont.ali
file and include the following under the font embed [PDF:Embed]
section.
Example
[ PDF:Embed ] SAdHC39a = "SAdHC39a.pfm SAdHC39a.pfb"
DESTYPE=FILE DESFORMAT=PDF
.
The steps involved in generating a barcode PDF file using the font subsetting feature are as follows:
REPORTS_PATH
environment variable to the directory containing the TrueType font. For example, C:\WINNT\Fonts
.
uifont.ali
file in the ORACLE_HOME
\tools\common90
directory and include the following under the [PDF:Subset]
section to specify the TrueType font name:
Example
[ PDF:Subset ] SAdHC39a = "SAdHC39a.ttf"
DESTYPE=FILE DESFORMAT=PDF.
|
Copyright © 2003 Oracle Corporation. All Rights Reserved. |
|