Oracle® Fusion Middleware Publishing Reports to the Web with Oracle Reports Services 11g Release 1 (11.1.1) B32121-01 |
|
![]() Previous |
![]() Next |
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.
Images: PDF compression does not significantly affect the size of files containing images in it, as image files are typically already compressed.
Formatted data: Highly formatted data can achieve higher compression rates. However, actual compression rates will vary for each report.
Compressed files are about one fifth the size of the original file. Testing has shown that the best case compression ratio of one-eighth to the worst case compression ratio of one-half was achieved based on the contents in the original file.
By default, PDF output generated by Oracle Reports is compressed. To specify the level of compression, use PDFCOMP
on the command line. For more information, see Section A.7.24, "PDFCOMP".
Although compressed files download quickly, the time taken to generate a compressed file is much more when compared to a non-compressed file.
Figure 10-1 Compressed Output Versus Non-Compressed Output
Note: Compression rate depends on the report's content; thus, the time taken to generate the PDF file as well as the PDF file size will vary from report to report. |
This section outlines the PDF font-related features supported by Oracle Reports:
Font aliasing enables you to substitute one font for another; that is, 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. For font aliasing considerations when designing multilingual applications, see Section 22.2.1.3.2, "Font Aliasing Considerations".
The font enhancements introduced in Oracle Reports 11g Release 1 (11.1.1) make font aliasing unnecessary in almost all cases. In prior releases, a report may have been created with fonts that are readily available on Windows, but not on UNIX (for example, Arial font). In such cases, it was necessary to alias the Windows fonts to other fonts with a similar style available on UNIX (for example, Helvetica). Now, with support for TTF and TTC files on UNIX, a font such as Arial is supported on both Windows and UNIX, eliminating the need for aliasing.
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.
Note: The fonts must be available on the machine displaying the PDF output. The fonts need not be available on the machine generating the PDF file. |
At the time of viewing the report, Adobe Acrobat replaces the aliased fonts based on the following:
If the fonts do not exist on the machine displaying the output, Adobe Acrobat substitutes it with the Adobe
Sans
MM
font.
If the 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:
Single byte fonts, including Eastern European fonts for both ASCII and IS0-Latin character sets.
Adobe multibyte Character ID (CID) fonts listed in Table 10-2, which are available as a free download from Adobe.
Type1 PostScript fonts.
TrueType fonts.
Table 10-2 outlines the mapping between Oracle NLS_CHARACTERSET
, CMap name, and CID font name used in PDF font aliasing for multibyte fonts.
Table 10-2 CID Font Mapping for PDF Font Aliasing
Language | Oracle NLS_CHARACTERSET Name | CMap Name | CID Font Name |
---|---|---|---|
Japanese |
|
|
|
|
|
||
Korean |
|
|
|
|
|
||
Traditional Chinese |
|
|
|
|
|
||
|
|
|
|
Simplified Chinese |
|
|
|
|
|
(*) These fonts are available in Adobe Acrobat Reader 5.0 and later.
(**) These fonts are available in Adobe Acrobat Reader 4.0 and later.
It is recommended that you use Version 5.0 CID fonts (*) in order to avoid unexpected font mapping, which results in multibyte characters overlapping. Version 5.0 fonts are compatible with Adobe Acrobat Reader 5.0 and later.
If font aliasing is necessary, use Oracle Enterprise Manager to define the aliasing, instead of directly editing the uifont.ali
file as in prior releases. For information about using Oracle Enterprise Manager for font configuration, see Section 6.9.1, "Configuring Fonts".
For more information about the uifont.ali
file, refer to uifont.ali in Section 8.3, "Font Configuration Files":
If font aliasing does not work, verify that:
In Acrobat Reader 6.0 and later, choose File > Document Properties > Fonts. (In prior releases, beginning with Acrobat Reader 3.0, choose File > Document Info > Fonts). Verify that the aliased font has been added to the list. If it is not included, then font aliasing did not occur. The fonts were not found or the entry in the uifont.ali
file is incorrect.
The fonts specified for the report are available on the machine where the report will be viewed.
The [PDF]
section name in the uifont.ali
file has not been modified as Oracle Reports parses the file for the section name.
The version of the Adobe Acrobat Reader used for viewing is 3.0 or higher, as required for multibyte character reports to display properly.
With font subsetting, the PDF file includes the font information needed to render the PDF, regardless of the availability of that font on the machine used to view the report. PDF font subsetting works for single byte, multibyte, and Unicode fonts and is the preferred method of creating multibyte reports.
When you subset a font in a PDF file, the font information is embedded into the PDF output for only those characters that are needed for the report output.
Note: You can modify the PDF file if you have:
|
Before using font subsetting, you must:
Include the font file paths in the REPORTS_PATH
environment variable. Oracle Reports looks for fonts in the path specified in the REPORTS_PATH
environment variable when generating a PDF file.
Include the font subsetting entries in the 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.
Note: Theuifont.ali file is located in the following directory:
|
The section for font subset in the uifont.ali
file is [PDF:Subset]
and the entry is:
[PDF:Subset] font_name = "font_file_name"
where
font_name
is the font name, which must be enclosed in quotes if it contains more than one word.
font_file_name
is the font file name, which must always be enclosed in quotes, and is case-sensitive. If it does not exactly match the existing font file name, Oracle Reports generates a REP-1924
error.
The font files can be saved in any folder; for example, ORACLE_INSTANCE
/reports/
font_folder
. The font file's path is added by default to the $REPORTS_PATH
environment variable.
Note: Thefont_file_name is not the font name displayed in Oracle Reports Builder. |
Example 1
[PDF:Subset] Arial = "Arial.ttf"
To use TrueType fonts in a TrueType Collection (.ttc
) file, the syntax for the entry in the [PDF:Subset]
section in uifont.ali
is:
[PDF:Subset] font_name = "ttc_file_name[,table_directory_number]"
where
font_name
is the font name, which must be enclosed in quotes if it contains more than one word.
ttc_file_name
is a TrueType Collection file name.
table_directory_number
is the Table Directory number for the TrueType font in a TrueType Collection file, using a zero-based index (for example, "MS PGothic" = "msgothic.ttc,1
" indicates that Oracle Reports should use the second font in the TrueType Collection file). If the table_directory_number
is omitted or if you supply an invalid value, Oracle Reports will always subset the first font program in the TrueType Collection file.
Example 2
[PDF:Subset] "MS PGothic" = "msgothic.ttc,1" "MS UI Gothic" = "msgothic.ttc,2"
Table 10-3 shows the font name and Table Directory number values for common East Asian TrueType Collection files on the Windows platform.
Table 10-3 Common East Asian TrueType Collection Files on the Windows Platform
TTC File Name | Font Name | Table Directory Number |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can view the fonts used in your reports as follows:
In Acrobat Reader 6.0 and later, choose File > Document Properties > Fonts. (In prior releases, beginning with Acrobat Reader 3.0, choose File > Document Info > Fonts.)
The Document Font dialog box displays Original Font, Type, Encoding, Actual Font (or the font used), and Type.
Note: In the case of font subsetting:
|
Two environment variables allow for backward compatibility with the font mechanisms of prior releases:
REPORTS_ENHANCED_FONTHANDLING specifies whether to use the new 11g Release 1 (11.1.1) font model, or revert to the Toolkit font handling mechanism of 10g Release 2 (10.1.2). By default, REPORTS_ENHANCED_FONTHANDLING
=YES
.
REPORTS_ENHANCED_SUBSET specifies whether to include the enhanced TTF font subsetting feature introduced in Oracle Reports 10g Release 2 (10.1.2). By default, REPORTS_ENHANCED_SUBSET
=YES
to ensure that the PDF file generated is accessible and searchable.
You can set environment variable REPORTS_ENHANCED_SUBSET
=NO
to revert to the implementation of font subsetting used in releases prior to Oracle Reports 10g Release 2 (10.1.2); that is, Type3 fonts.
If you set REPORTS_ENHANCED_SUBSET
=NO
, use Adobe Acrobat Reader and perform the following steps to ensure optimum viewing:
Choose Edit > Preferences > Page Display.
Select Smooth Text, Smooth Line Art, and Smooth Images.
(Laptop/LCD Screens) Select the Use CoolType check box.
Click OK.
Note: These steps are valid for Adobe Acrobat Reader 7.0. |
If font subsetting does not work, verify the following:
The fonts you use in the report have bold, italic, and bold italic versions. If you have used italic or bold styles in the report, with PDF font subsetting, and you do not see italic or bold styles in the output, check the Windows TTF files. On Windows, there are some fonts that have bold, italic, and bold italic versions. For example, Arial has arialbd.ttf
(Arial bold), ariali.ttf
(Arial italic), and arialbi.ttf
(Arial bold italic), while some other fonts, such as Arial Unicode MS (arialuni.ttf
), do not have any bold or italic versions. For fonts that do not have bold or italic versions, Windows synthesizes bold or italic styles from the main font file while displaying, as does Oracle Reports on Windows. These styles are preserved in HTML/HTMLCSS, RTF, and PDF (without PDF subsetting or embedding) outputs. However, while doing the PDF subsetting or embedding, since actual font glyphs are included in the report, Oracle Reports needs the TTF files that contain styles; that is, to include the bold style for Arial in the report, it would need arialbd.ttf
. But for fonts such as Arial Unicode MS that do not have such TTF files, PDF subsetted output will not have bold or italic styles.
The Actual Font value is Embedded Subset and Type is TrueType (in Acrobat Reader 6.0 and later, choose File > Document Properties > Fonts; in prior releases, beginning with Acrobat Reader 3.0, choose File > Document Info > Fonts). If this is not specified, then font subsetting is not implemented. The problem could be either that the fonts were not found or the entry in the uifont.ali
file is incorrect.
The font file names are valid.
The case of the font file name matches the case defined in the file.
The font types are TrueType; that is, filename
.ttf
or filename
.ttc
.
The font name is enclosed in double quotes if it consists of two or more words.
The font name does not contain embedded parenthesis.
The font files are located in the path specified by the REPORTS_PATH
environment variable. When generating a PDF file, Oracle Reports looks for fonts in the path specified in the REPORTS_PATH
environment variable.
The font names are correct and are available on the machine where the PDF file is generated.
The [PDF:Subset]
section name in the uifont.ali
file has not been modified. Oracle Reports parses the file looking for the section name.
The version of the Adobe Acrobat Reader used for viewing is 3.0 or higher, as required for multibyte character reports to display correctly.
The value of the REPORTS_ENHANCED_SUBSET
environment variable is set to YES
. If REPORTS_ENHANCED_SUBSET
=NO
, Oracle Reports reverts to the earlier implementation of font subsetting, using Type3 fonts to create a PDF document. Type3 fonts are imaged characters that look slightly bolder than they would if expressed as a Type1 font. See Section 10.2.2.2.2, "Backward Compatibility" for more information on improving the viewing quality.
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.
Note: Font embedding will work only if the fonts are included in the PDF file. Font embedding increases your PDF file size. |
PDF font embedding in Oracle Reports is for Type1 fonts only (single byte 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.
Note: You must ensure that you have the necessary font licenses before embedding any fonts in your output. |
The setup for PDF embedding includes:
A command line keyword: PDFEMBED
A uifont.ali File Entry:[PDF:Embed]
PDFEMBED
The command line keyword PDFEMBED
is used to specify whether Oracle Reports will embed the Type1 PostScript fonts specified in the uifont.ali
file into the PDF output. For more information, see Section A.7.25, "PDFEMBED".
uifont.ali File Entry
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"
Example 10-1 Font Embedding
[PDF:Embed] Symbol = "Symbol.pfm Symbol.pfb"
In Example 10-1, the Symbol font is embedded into the PDF file. This ensures portability by:
Creating the report with the Symbol font.
Embedding the Symbol font in the PDF file (Figure 10-3).
If PDF font embedding does not work, verify the following:
In Acrobat Reader 6.0 and later, choose File > Document Properties > Fonts. (In prior releases, beginning with Acrobat Reader 3.0, choose File > Document Info > Fonts). Verify that the embedded font has been added to the list. If the font has not been added, then font embedding did not occur. The problem could be either that the fonts were not found or the entry in the uifont.ali
file is incorrect.
The correct font file name is used.
The font path specified in the 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.
The font type is a Type1 font.
The font name is enclosed within double quotes if it consists of 2 or more words.
The [PDF:Embed]
section name in the uifont.ali
file has not been modified. Oracle Reports parses the file looking for the section name.
The format to specify the embedded font is valid:
font_name="fontfilename.pfm/.afm fontfilename.pfb/.pfa".
For example (Windows):
UtopiaMediumItalic = "UtopiaMediumItalic.pfm UtopiaMediumItalic.pfb"
The font name is correct and available on the machine where the PDF file is generated.
Table 10-4 summarizes the advantages and disadvantages of font aliasing, font embedding, and font subsetting.
Table 10-4 Comparison of PDF Font Features
PDF Type | Advantages | Disadvantages | PDF Type |
---|---|---|---|
Font Aliasing |
Multibyte support. Good display. Small file size (Japanese example; 23KB for font aliasing when compared to 130KB for font subsetting). |
Unicode character set not supported. Asian Font Packs are required on the client machine, if the client's operating system and Acrobat Reader are not the native version. Limited fonts support. For example, there is no support for font emphasis. |
Font Aliasing |
Font Embedding |
Guaranteed display. |
Only single byte support provided. Large file size. |
Font Embedding |
Font Subsetting |
Unicode support. Guaranteed display. Generated file is searchable and editable using Adobe Acrobat. |
No styles (Italic and Bold) support. |
Font Subsetting |
The precedence order for the same font in multiple places within the uifont.ali
file is as follows:
Font aliasing takes precedence over font embedding (highest).
Font subsetting takes over font embedding (intermediate).
Font embedding takes no precedence (lowest).
For example, if you have included the same font entries for both font embedding and font subsetting, then font subsetting will override font embedding. This is assuming you have not set the command line option 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:
Sample 1
[ 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"
Sample 2
[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"
Beginning with Oracle Reports 11g Release 1 (11.1.1), you can encrypt and password-protect PDF reports generated by Oracle Reports.
This optional functionality avoids unauthorized reading and changing of PDF reports. The encrypted PDF reports are readable by Acrobat Reader 5.0 and later, and other readers supporting PDF 1.4. This functionality is also compatible with reports developed with prior releases of Oracle Reports.
Oracle Reports uses the Adobe Standard Security Handler to encrypt PDF reports. This standard security handler allows up to two passwords (owner and user) and 8 types of access permissions to be specified for a document.
Oracle Reports 11g Release 1 (11.1.1) also supports PDF encryption in distribution and bursting of reports. When specified, all the generated PDF files in a distribution list are assigned the same passwords and the same security settings.
To provide encryption, password protection, and permissions security in PDF reports, Oracle Reports 11g Release 1 (11.1.1) introduces the following command line keywords:
Note: To generate PDF encrypted report output using Oracle Reports Builder (rwbuilder ), you must pass at least one of these command line keywords in the command while starting the rwbuilder .
In Oracle Reports Builder, select Generate to File>PDF to generate the PDF encrypted output. |
Table 10-5 describes the effect of the possible combinations of the PDFOWNER
and PDFUSER
command line keywords.
Table 10-5 Effect of PDFUSER and PDFOWNER Keyword Combinations
PDFUSER specified? |
PDFOWNER specified? |
Effect |
---|---|---|
Yes |
Yes |
When an end user attempts to open PDF report output in Acrobat Reader (5.0 or later), a password prompt displays to request the password specified by |
Yes |
No |
When an end user attempts to open PDF report output in Acrobat Reader (5.0 or later), a password prompt displays to request the password specified by |
No |
Yes |
When an end user attempts to open PDF report output in Acrobat Reader (5.0 or later), Oracle Reports opens the document, decrypts it, and displays it on the screen. If the end user attempts to change permissions on the PDF report output in Acrobat Writer (6.0 or later), a password prompt displays to request the password specified by |
No |
No |
Any end user can open PDF report output in Acrobat Reader (5.0 or later), and also change the document's passwords and permissions in Acrobat Writer (6.0 or later). No password prompts display. |
For information about suppressing specific permissions for encrypted PDF report using the PDFSECURITY
command line keyword, see Section A.7.27, "PDFSECURITY".
The encrypted PDF document's passwords and permissions, as specified by PDFUSER
, PDFOWNER
, and PDFSECURITY
, are stored with the PDF document. An end user with authorization to change these values can do so as follows:
In Acrobat Writer 6.0 or later, open the PDF document.
Select Document > Security > Restrict Opening and Editing.
In the password prompt, enter the appropriate password (as specified in Table 10-5).dialog box that displays, make desired changes to passwords and permissions.
In the dialog box that displays, make desired changes to passwords and permissions.
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.
For information on enabling accessibility-related features offered through Oracle Reports from the command line, see Section A.5.1, "ACCESSIBLE". For information about using the Oracle Reports accessibility properties designed to make PDF report output accessible to the disabled community (Alternative Text, Headers, ID, Report Language, and Table Caption properties), see the Oracle Reports online Help.
Additionally, refer to Chapter 43, "Building an Accessible JSP-based Web Report" in the Oracle Reports Building Reports manual, and to the Oracle accessibility site on OTN (http://www.oracle.com/accessibility/index.html
), where you can learn more about accessibility and find the Creating Accessible Enterprise Reports Using Oracle Reports white paper.
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 cataloging or searching for documents in external databases.
Oracle Reports provides report-level properties to enable such a classification, known as taxonomy. They are:
Title
Author
Subject
Keywords
Table 10-6 Taxonomy Properties
Property Name | Type | Description | Default Value |
---|---|---|---|
Title |
String |
Document title. |
PDF document name |
Author |
String |
Document's author. |
Oracle Reports |
Subject |
String |
Document's subject. |
None |
Keywords |
String |
Specifies keywords that can be used to categorize the document. |
None |
Refer to the Oracle Reports online Help for more information on the taxonomy properties.
Oracle Reports provides the capability to specify the dots per inch (DPI) value for the image resolution of the graph in PDF output. This enables you to scale the graph without compromising on the image quality.
For more information, see Section B.1.48, "REPORTS_GRAPH_IMAGE_DPI" and Section B.1.50, "REPORTS_JPEG_QUALITY_FACTOR".