RTF Processor Engine Oracle Fusion Middleware Online Documentation Library

7-10 Developers Guide for Oracle Business Intelligence Publisher

7.5.2.2 Generating XSL with InputOutput Stream

Input: ■ RTF InputStream Output: ■ XSL OutputStream Example 7–12 Sample Code for Generating XSL with InputOutput Streams import oracle.xdo.template.FOProcessor; . . . public static void mainString[] args { FileInputStream fIs = new FileInputStreamargs[0]; input template FileOutputStream fOs = new FileOutputStreamargs[1]; output RTFProcessor rtfProcessor = new RTFProcessorfIs; rtfProcessor.setOutputfOs; rtfProcessor.process; Closes inputStreams outputStream System.exit0; }

7.6 FO Processor Engine

This section discusses how to use the FO Processor Engine, and includes the following topics: ■ Section 7.6.1, Major Features of the FO Processor ■ Section 7.6.2, Generating Output from an XML File and an XSL File ■ Section 7.6.3, Generating Output Using File Names ■ Section 7.6.4, Generating Output Using Streams ■ Section 7.6.5, Generating Output from an Array of XSL Templates and XML Data ■ Section 7.6.6, Using the XSL-FO Utility

7.6.1 Major Features of the FO Processor

The FO Processor Engine provides the following features: ■ Section 7.6.1.1, Bidirectional Text ■ Section 7.6.1.2, Font Fallback Mechanism ■ Section 7.6.1.3, Variable Header and Footer ■ Section 7.6.1.4, Horizontal Table Break

7.6.1.1 Bidirectional Text

BI Publisher utilizes the Unicode BiDi algorithm for BiDi layout. Based on specific values for the properties writing-mode, direction, and unicode bidi, the FO Processor supports the BiDi layout. Using the BI Publisher Java APIs 7-11 The writing-mode property defines how word order is supported in lines and order of lines in text. That is: right-to-left, top-to-bottom or left-to-right, top-to-bottom. The direction property determines how a string of text will be written: that is, in a specific direction, such as right-to-left or left-to-right. The unicode bidi controls and manages override behavior.

7.6.1.2 Font Fallback Mechanism

The FO Processor supports a two-level font fallback mechanism. This mechanism provides control over what default fonts to use when a specified font or glyph is not found. BI Publisher provides appropriate default fallback fonts automatically without requiring any configuration. BI Publisher also supports user-defined configuration files that specify the default fonts to use. For glyph fallback, the default mechanism will only replace the glyph and not the entire string.

7.6.1.3 Variable Header and Footer

For headers and footers that require more space than what is defined in the template, the FO Processor extends the regions and reduces the body region by the difference between the value of the page header and footer and the value of the body region margin.

7.6.1.4 Horizontal Table Break

This feature supports a Z style of horizontal table break. The horizontal table break is not sensitive to column span, so that if the column-spanned cells exceed the page or area width, the FO Processor splits it and does not apply any intelligent formatting to the split cell. The following figure shows a table that is too wide to display on a single page: Figure 7–2 Example of Wide Table The following figure shows one option of how the horizontal table break will handle the wide table. In this example, a horizontal table break is inserted after the third column. 7-12 Developers Guide for Oracle Business Intelligence Publisher Figure 7–3 Example of Horizontal Table Break on Wide Table The following figure shows another option. The table breaks after the third column, but includes the first column with each new page. Figure 7–4 Example of Horizontal Table Break and Column Repeating on Wide Table

7.6.2 Generating Output from an XML File and an XSL File

The FO Processor Engine is BI Publishers implementation of the W3C XSL-FO standard. It does not represent a complete implementation of every XSL-FO