Oracle® Fusion Middleware

Release Notes for Business Intelligence

Release 12.2.1.2.0

E77675-04

October 2017

Oracle Business Intelligence Release Notes

Learn about the issues you may encounter when using Oracle BI Enterprise Edition and Oracle BI Publisher, and how to work around them.

Topics

These issues pertain to all areas of Oracle BI Enterprise Edition and Oracle BI Publisher, such as installation, migration, analyses and dashboards, metadata repository development, and system administration.

Obtaining Patches from My Oracle Support

Periodically, Oracle Business Intelligence patches are released.

Some patches are mandatory and other patches are optional.

To learn more about the patches and find the available patches for your environment, see Obtaining Patches Required For Your Installation in Patching with OPatch .

Error Accessing Reports in a High Availability Environment

In a high availability environment, users accessing reports from the Oracle BI EE search results might receive Page not found errors.

To work around this issue, go to the report URL and replace the alias host name (for example, bihost1) with the physical host name.

Initialization Block for E-Business Suite Displays NQS Error Message

While creating a database object and connection pool for the Oracle E-Business Suite database, in the Oracle BI Administration Tool’s Session Variable Initialization Block dialog, with Database as the Data Source Type, and Default initialization string selected, if you click Test, an expected error displays. The error message is [nQSError: 23006] The session variable, NQ_SESSION.ICX_SESSION_COOKIE, has no value definition.

The error is expected. The Test button command only works when the user links from the E-Business Suite, and the browser supplies the ICX cookie.

Integration with and Migration from Oracle BI Discoverer Is Not Supported

Oracle Business Intelligence 12c does not provide support for integrating with or migrating from Oracle BI Discoverer.

You can ignore any mentions of such integration or migration in the documentation set. For example, Chapter 8, Using Discoverer Data in Applications, in Integrator's Guide for Oracle Business Intelligence Enterprise Edition is not applicable for Oracle Business Intelligence 12c.

May Need to Add New Privileges After Upgrade from a Release Earlier than 12.2.1.1.0

The View Delivers Full privilege was introduced in Release 12.2.1.1.0 to control visibility of Delivers options for agents. The privilege is assigned to the BIAuthor role by default.

You might not be able to edit or create agents after an upgrade from a release earlier than 12.2.1.1.0. For example, after an upgrade, you might have the Create Agent privilege, but not the View Delivers Full privilege, which is needed to see the functionality for creating and editing agents. To work around this issue, add the missing View Delivers Full privilege to users or application roles, so that they can see the user interface controls needed to create and edit agents.

Reconfiguring Custom Messages in the BI Sample Application After Upgrade

When you upgrade to a new version of Oracle BI Enterprise Edition, custom messages in the sample application are overwritten.

When the BI Sample Application is upgraded, any customized messages saved to the reference file signin.html and message file logonmessages.xml are overwritten with the system default messages.

Note:

For migration scenarios, the same two files must be replaced from Oracle BI Enterprise Edition 11g to 12.2.1.x.

You can back up your customized messages and add them to the new customization files after you upgrade.

  1. Back up the following Oracle BI Enterprise Edition 12.2.1.0 or 12.2.1.1 files that you have customized:
    • On UNIX: $ORACLE_HOME/bi/bifoundation/web/msgdb/l_en/messages/logonmessages.xml and $ORACLE_HOME/bi/bifoundation/web/msgdb/pages/common/signin.html
    • On Windows: %ORACLE_HOME%\bi\bifoundation\web\msgdb\l_en\messages\logonmessages.xml and%ORACLE_HOME%\bi\bifoundation\web\msgdb\pages\common\signin.html
  2. After you have upgraded to 12.2.1.2, reapply the custom messages in the logonmessages.xml and signin.html files:
    • On UNIX: $NEWORACLE_HOME/bi/bifoundation/web/msgdb/l_en/messages/logonmessages.xml and $NEWORACLE_HOME/bi/bifoundation/web/msgdb/pages/common/signin.html
    • On Windows: %NEWORACLE_HOME%\bi\bifoundation\web\msgdb\l_en\messages\logonmessages.xml and %NEWORACLE_HOME%\bi\bifoundation\web\msgdb\pages\common\signin.html
  3. Stop then start the services.

MongoDB and Salesforce Aren’t Supported

MongoDB and Salesforce databases aren’t supported on Solaris platforms.

You should not configure MongoDB and Salesforce databases to run on Oracle Business Intelligence Enterprise Edition 12.2.1.2.0.

Exported BAR Files Don't Include Data Files

When you back up an instance into an Oracle Business Intelligence application archive (BAR) file, data files that you uploaded aren't included in the BAR file.

When you import the BAR file into a target system, only the metadata for the data files is imported, rather than the data files themselves. To work around this issue, upload the data files into the target system after importing the BAR file.

Map Visualizations Sometimes Show Incorrect Geography in Asian Languages

If you are using Asian language data sources (for example, Japanese or Chinese), then map visualizations sometimes don’t correctly identify countries, states, or provinces.

For example, if you upload a Microsoft Excel file containing data about China and Japan, and you change the chart to a map, then China might not be highlighted correctly on the map.

Bidirectional Languages Aren’t Supported

Oracle Business Intelligence Visual Analyzer currently doesn’t support bidirectional languages (for example, Arabic and Hebrew).

There is no workaround for this issue.

Error Importing XLSX Files Generated from Microsoft Access

Importing an XLSX file generated from Microsoft Access can sometimes fail.

Oracle Business Intelligence Visual Analyzer can interpret XLSX files imported from Microsoft Access as header-less or even empty.
To work around this issue:
  1. In Microsoft Excel, open the XLSX file that was output from Microsoft Access.
  2. Select any cell.
  3. Make and undo a change. For example, select the top left cell, type X, then delete the X.
  4. Save the file.
  5. Import the modified file into Oracle Business Intelligence Visual Analyzer.
    The file is imported without error.

Importing Data Sources with Multibyte Characters Causes Error

Oracle Business Intelligence Visual Analyzer currently doesn’t support importing data sources containing multibyte characters.

If you try to import a data source that contains multibyte characters (for example, data sources in languages such as Chinese, Korean, or Japanese), the system displays the following error message:

Failed to create external datasets. Cannot create a new source. The Analysis selected contains errors. Fix the errors or select a different Analysis.

There is no workaround for this issue.

Oracle Business Intelligence Analyses and Dashboards Issues and Workarounds

This section describes issues and workarounds for Oracle Business Intelligence analyses and dashboards.

No search results returned Error Message Displays by Mistake

If you are using the New Home Page view in Oracle BI EE, and you click the Dashboard option to create a new dashboard, the New Dashboard dialog might display the No search results returned error message by mistake.

To work around this issue, click OK to dismiss the message and continue using the New Dashboard dialog to create a dashboard.

Treemap View Fails to Download in PDF, Excel, or Powerpoint Format

If an analysis includes a treemap view, you cannot properly export the results to Adobe Acrobat, Microsoft Excel, or Microsoft Powerpoint unless Oracle BI EE was installed with the correct version of the Java Development Kit (JDK).

To work around this issue, install JDK 1.8.0.60 on the Oracle BI Server machine. The JDK version must be 8u60 Build b10 or later. You must install JDK before you install Oracle BI EE.

Metadata Dictionary XML Files Must Be Opened in Microsoft Internet Explorer

If you generate a metadata dictionary using a repository, then you must use Microsoft Internet Explorer 9 or later to open the generated XML files.

If you open one of the generated XML files in a different browser (for example, Firefox or Chrome), then the browser displays an error message similar to the following one:
Error: XML Parsing Error: not well-formed.
Location: <File location>\NameIndex.xml
Line Number 86, Column 276.

This issue can also affect how the metadata dictionary is displayed in analyses in Oracle BI EE.

Oracle BI Publisher Issues and Workarounds

This section describes issues and workarounds for Oracle BI Publisher.

Bar Charts Showing Time on the X-Axis Don’t Display Axis Labels Correctly

When an Oracle BI Publisher report using BI Publisher Template (.xpt) includes a bar chart and if Time is represented along the x-axis, then the x-axis labels aren’t displayed properly.

The first label entry is skipped and the first bar data appears glued to the y-axis. This issue is caused by a limitation in the data visualization libraries that Oracle BI Publisher uses to generate the chart.
  1. In the data model SQL query for the report, use the TO_CHAR method on the date/time fields to change the data type of the field from Dateto String.
  2. Open the report in the Layout Editor.
  3. Select the chart and expand the Properties pane.
  4. Turn off the Time Series setting and clear the settings for Day, Month, Year, and Time formats.
  5. Save the layout changes.

Some Documentation for Oracle BI Publisher and Oracle BI Enterprise Edition Is No Longer Being Updated

This issue addresses documentation for Oracle BI Publisher and Oracle BI Enterprise Edition that is no longer updated.

The following documentation is no longer being updated within the guides themselves. See this and future Release Notes for updates to these documents:

Oracle BI Administration Tool Documentation

The following issues address documentation for Oracle BI Administration Tool

Online Help for Oracle BI Administration Tool Is No Longer Updated

The Oracle BI Administration Tool online help is no longer being updated.

Refer to About the Oracle BI Administration Tool in Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition for current information about current functionality in the Oracle BI Administration Tool, and the Release Notes for documentation updates.

Correction to Help Topic in New Features Section

The Help topic New Command Line Utilities in the section New Features for Oracle BI EE 12c Release (12.2.1) contains two duplicate entries.

The commands Delete Application Role Command and Rename Application Role Command should only be listed once each.

Developer's Guide for Oracle Business Intelligence Enterprise Edition

The following issues address the Developer's Guide for Oracle Business Intelligence Enterprise Edition

Documentation About Creating and Using Impersonate User is Incorrect

In Developer's Guide for Oracle Business Intelligence Enterprise Edition, Chapter 1 Embedding Business Intelligence Objects in ADF Applications, the How to Create and Use Impersonate User section is inaccurate.

You must use the following procedure instead:
Configuring the Impersonate User in Oracle Business Intelligence 12c

The 11g oracle.bi.server.impersonateUser permission does not exist in 12c. To create a user or application role with permission to impersonate, you must create a permission grant using the Resource Type oracle.bi.user, with a name of an asterisk (*) and an action of impersonate.

Note:

You can choose to grant the newly created permission to either an application role or a user. In this example we choose user.
  1. Connect to Fusion Middleware Control for your Oracle BI EE instance using an administration account.
  2. From the Weblogic Domain menu, select Security.
  3. Click Application Policies.
  4. Click Create to display the Create Application Grant page.
  5. In the Permissions section, click Add (+).
  6. Select Resource Types.
  7. Select oracle.bi.user from the Resource Type list.
  8. Click Continue to display the Add Permission dialog.
  9. Enter an asterisk (*) in the Resource Name field.
  10. Select impersonate in the Permission Actions section.
  11. Click Select.
    You now add a new grantee.
  12. In the Grantee section click Add (+) to display the Add Principal dialog.
  13. Select User from the drop down list.
  14. Select Includes from the Principal Name list, and enter an asterisk (*) into the field.
  15. Click the search arrow icon (>) to display a list of users.
  16. Select the user you want to give the permission to and click OK.
    This example uses weblogic.
  17. Click OK on the Create Application Grant page.
    This gives the impersonate permission to the user.
Documentation Is Incorrect About Which WSDL Version to Use

In Integrator's Guide for Oracle Business Intelligence Enterprise Edition, Chapter 1 Introduction to Oracle Business Intelligence Web Services, the What are the Oracle Business Intelligence Session-Based Web Services? section requires updates.

The last paragraph suggests that depending on your client version, you access the WSDL document using one of the following Oracle BI EE web services URLs:

http://host:port/analytics-ws/saw.dll/wsdl/v6

http://host:port/analytics-ws/saw.dll/wsdl/v7

This paragraph should not mention v6 or v7, but should state that for Oracle BI EE 12c, if you want to develop new code or recompile existing code, you should use version 12 (or later) of the Oracle BI EE web services URL. For example:

http://host:port/analytics-ws/saw.dll/wsdl/v12

Documentation Mentions of Catalog Groups Are No Longer Applicable

Starting with Release 12c (12.2.1.1.0), catalog groups have been removed.

Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition and Integrator's Guide for Oracle Business Intelligence Enterprise Edition mention catalog groups. The mentions of catalog groups in these guides are no longer applicable.

Integrator's Guide for Oracle Business Intelligence Enterprise Edition Requires Updates

This issue addresses updates to portions of Integrator's Guide for Oracle Business Intelligence Enterprise Edition, which is no longer being updated.

The following sections address updates to Integrator's Guide for Oracle Business Intelligence Enterprise Edition.

Section 5.3 - Configuring the Action Framework

The statement preceding Table 5.3 currently states:

The Oracle BI EE installation contains a configuration file named ActionFrameworkConfig.xml. You manually edit this configuration file to specify how you want the Action Framework to behave. This configuration file is located by default in the following location:<Oracle Middleware Home>\user_projects\domains\bifoundation_domain\config\fmwconfig\biinstances\coreapplication

This is an error. The configuration file is located by default in the following location:

<Oracle Middleware Home>\user_projects\domains\bi\config\fmwconfig\biconfig\actions

Section - 9.2.3 Updating instanceconfig.xml

Step 2 of this procedure currently states that the instanceconfig.xml file is here:

ORACLE_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_o bipsn.

In 12c, the instanceconfig.xml file is here:

BI_DOMAIN/config/fmwconfig/biconfig/OBIPS

Section - 9.3.6 Setting Up a Profile

Step 5 of this procedure currently states:

5. On the resulting screen, under Responsibility, enter the Oracle Business Intelligence URL. For example:
http://my_server.domain.com:port/analytics

This is an error. The /analytics portion of this path should be left out.

Step 5 of this procedure should state:

5. On the resulting screen, under Responsibility, enter the Oracle Business Intelligence URL. For example:
http://my_server.domain.com:port

Section 9.3.7 - Navigating from E-Business Suite to Oracle Business Intelligence

Step 4 of this procedure currently states:

4. In the Menu field, select the menu that you created in Section 9.3.3, Creating a Menu That Invokes the Form Function (for example, OBIEE).

The Form Function is invoked that links to Oracle Business Intelligence.

Step 4 of this procedure should state:

4. In the Menu field, select the menu that you created in Section 9.3.3, Creating a Menu That Invokes the Form Function (for example, OBIEE).

This launches Oracle Business Intelligence

Updating authenticationschemas.xml Needs Additional Statement

In Integrator's Guide for Oracle Business Intelligence Enterprise Edition, Chapter 10 Integrating with Oracle E-Business Suite Security, the Updating authenticationschemas.xml section is incorrect for Oracle BI EE Release 12.2.1 or later.

The following statement must be added between Step 4 and Step 5:

Locate the sub-element RequestVariable source="constant" and change the value of the nameInSource attribute from ssi to the name of the service instance created during domain configuration. If not chosen explicitly, the default value is ssi. For example:

<RequestVariable source="constant" type="auth" nameInSource="ssi" biVariableName="NQ_SESSION.SERVICEINSTANCEKEY" />

If the entry doesn't already exist, then add a new entry under:

<AuthenticationSchema name="EBS-ICX">

Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition

The following issues address Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition.

Documentation Mentions of Catalog Groups Are No Longer Applicable

Starting with Release 12c (12.2.1.1.0), catalog groups have been removed.

Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition and Integrator's Guide for Oracle Business Intelligence Enterprise Edition mention catalog groups. The mentions of catalog groups in these guides are no longer applicable.

Documentation About Impersonation Requires Update

Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition, which is no longer being updated, requires an update.

Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition is not clear regarding passwords and impersonation. When impersonation is required, don’t provide a password.

Adding Web Center Content as a Delivery Channel

The following issues address corrections to Developer's Guide for Oracle Business Intelligence Enterprise Edition.

In the Data Types in Oracle BI Publisher Web Services chapter, the following updates are required.

Add a New Data Type For Delivering Web Center Content

After section FTPDeliveryOption, add a new section called 2.3.27 WCCDeliveryOption.

Use the following two paragraphs as the description, then add the following table:

"Use this data type to define the options to set for WCC delivery of a report. The WCC server must be set up in the BI Publisher Administration pages first. To set up an WCC server see Setting Up Delivery Destinations in the Developer's Guide for Oracle Business Intelligence Publisher.

"This type is used in the ArrayOfWCCDeliveryOption complex data type."

Field Description
String WCCAccount Optional. Select an account from the WebContent Server.
String WCCAuthor Optional. Enter the name of the author. If you don’t specify an author, then the value defaults to the login name of the user.
String WCCComments Optional. Enter comments to include with the document on the WebContent Server.
String WCCFileName Required. Enter the name to assign to the file on the server. For example: report.pdf.
Boolean WCCIncludeMetadata Required. Specify True to allow custom metadata to be sent with the document. Custom metadata is defined in the data model.
String WCCSecurityGroup Required. Select the security group on the WebContent Server to assign to the report.
String WCCServerName Required. Enter the name of the WebContent Server as defined in the BI Publisher Administration page.
String WCCTitle Optional. Enter a title for the report. If you don’t enter a title, then the Layout name is used as the title.

Add a New Section Called ArrayOfWCCDeliveryOption

After ArrayOfFTPDeliveryOption, add a new section called 2.3.5 ArrayOfWCCDeliveryOption.

Use the following description and table:

"Use this data type to hold an array of WCCDeliveryOption objects."

Field Description
WCCDeliveryOption [] item See Section 2.3.27 WCCDeliveryOption

Add Row For Delivering Web Center Content

In DeliveryChannels, add a row to Table 2-22 Fields Provided by DeliveryChannels, after the row "ArrayOfFTPDeliveryOption ftpOptions" using the details shown in the following table. The description should cross reference to the new section 2.3.5 ArrayOfWCCDeliveryOption:

Field Description
ArrayOfWCCDeliveryOption wccOptions See Section 2.3.5 ArrayOfWCCDeliveryOption
String JDBCDriverType Field Description Is Incorrect

In Developer's Guide for Oracle Business Intelligence Publisher, Chapter 2 Data Types in Oracle BI Publisher, the JDBCDataSource section contains an incorrect description of the String JDBCDriverType field.

The correct description of the String JDBCDriverType field is:

The driver type as String can be either jdbc or jndi.

Values for the Status Field for JobOutput and JobOutputDelivery Objects

The values that are indicated for the status field of JobOutput and JobOutputDelivery objects in Chapter 2 are incorrect in Developer's Guide for Oracle Business Intelligence Publisher.

The correct list of status values that are available through the getAllScheduledReportHistoryReturn web service are as follows.

JobOutput status values:
  • STATUS_RUNNING = 'R';

  • STATUS_SUCCESS = 'S';

  • STATUS_FAILED = 'F';

  • STATUS_CANCELLING = 'G';

  • STATUS_CANCELED = 'C';

  • STATUS_WITH_DELIVERY_ERROR = 'D';

  • STATUS_SKIPPED = 'K';

  • STATUS_WARNING = 'I'; 

  • STATUS_UNKNOWN = 'X';

JobOutputDelivery status values:

  • STATUS_FAILED = 'F';

  • STATUS_WARNING = 'I';

  • STATUS_UNKNOWN = 'X';

  • STATUS_RUNNING = 'R';

  • STATUS_SUCCESS ='S';

The Definition of getScheduledJobInfo Method is Inconsistent

In Developer's Guide for Oracle Business Intelligence Publisher, Chapter 3 ScheduleService, the getScheduledJobInfo() Method section requires updates. The signature incorrectly references the JobInfo object.

The JobInfo object is currently referenced as follows:

JobInfo getScheduledJobInfo(int jobInstanceID, String userID, String password); 

The signature should instead reference the JobDetail object as follows:

JobDetail getScheduledJobInfo(int jobInstanceID, String userID, String password);
SFTP_HOSTKEY_FINGERPRINT Property for Secure FTP Document Delivery

In Developer's Guide for Oracle Business Intelligence Publisher, Chapter 8 Using the Delivery Manager Java APIs, Table 8–8 Properties for Delivering Documents over SFTP is missing information about the SFTP_HOSTKEY_FINGERPRINT property. See the following section for the correct information.

SFTP_HOSTKEY_FINGERPRINT

Enter the MD5 fingerprint of the SSH host key in a hexadecimal string. Don’t include a delimiter such as a colon (:) to separate each byte. This property is optional.

When this property is set, the MD5 fingerprint of the host key retrieved from the server at runtime is verified to match the supplied value. If it does not match, then the connection is terminated as the fingerprint mismatch indicates that the SSH client is connecting to an unintended host, possibly as a result of a man-in-the-middle attack. When this property is not set, the connection to the host is made without host key fingerprint verification.

Supported Configuration File Properties and Elements

<hostKeyFingerprint> element is supported for <server type="sftp">

PDF Merger Documentation

In Developer's Guide for Oracle Business Intelligence Publisher, Chapter 7 Using the BI Publisher Java APIs, the PDF Document Merger section is no longer applicable and is replaced with the following text.

Merging PDF Documents

See Some Documentation for Oracle BI Publisher and Oracle BI Enterprise Edition Is No Longer Being Updated.

Many business documents are composed of several individual documents that need to be merged into a single final document. The PDF Merger class supports the merging of multiple documents to create a single PDF document. This can then be manipulated further to add page numbering, watermarks, or other background images.

Merging PDF Documents with Input/Output File Names

The following code demonstrates how to merge (concatenate) two PDF documents using physical files to generate a single output document.

Input
  • PDF_1 file name (String)

  • PDF_2 file name (String)

Output
  • PDF file name (String)

Sample Code for Merging PDF Documents with Input/Output File Names:

import java.io.*;
import oracle.xdo.common.pdf.util.PDFMerger;
.
.
.
  public static void main(String[] args)
  {

    PDFMerger merger = null;

    try
    {
      // Initialize PDFMerger - last argument is PDF file name for output
      merger = new PDFMerger(new File(args[args.length - 1]));

      // Add PDF documents to merge
      for (int i = 0; i < args.length - 1; i++)
      {
        merger.addDocument(new File(args[i]));
      }
    }
    catch (Exception exc)
    {
      exc.printStackTrace();
    }
    finally
    {
      if (merger != null)
      {
        // Close the merged document
        try
        {
          merger.close();
        }
        catch (Exception exc)
        {
          exc.printStackTrace();
        }
      }
    }
  }

Merging PDF Documents with Input/Output Streams

Input
  • PDF Documents (InputStream Array)

Output
  • PDF Document (OutputStream)

Merging PDF Documents with Input/Output Streams

import java.io.*;
import oracle.xdo.common.pdf.util.PDFDocMerger;
.
.
.
  public boolean mergeDocs(InputStream[] inputStreams, OutputStream outputStream)
  {
    PDFMerger merger = null;

    try
    {
      // Initialize PDFMerger
      merger = new PDFMerger(outputStream);
      
      // Add input stream one by one
      for (InputStream inputStream : inputStreams)
      {
        merger.addDocument(inputStream);
      }
    }
    catch (Exception exc)
    {
      exc.printStackTrace();
      return false;
    }
    finally
    {
      if (merger != null)
      {
        // Close the merged document
        try
        {
          merger.close();
        }
        catch (Exception exc)
        {
          exc.printStackTrace();
          return false;
        }
      }
    }

Merging with Background to Place Page Numbering

The following code demonstrates how to merge two PDF documents using input streams to generate a single merged output stream.

You can add page numbers to the PDF.

  1. Create a background PDF template document that includes a PDF form field in the position that you would like the page number to appear on the final output PDF document.

  2. Name the form field @pagenum @.

  3. Enter the number in the field from which to start the page numbering. If you don’t enter a value in the field, the start page number defaults to 1.

Input:

  • PDF Documents (InputStream Array)

  • Background PDF Document (InputStream)

Output:

  • PDF Document (OutputStream)

Sample Code for Merging PDF Documents with Background to Place Page Numbering

import java.io.*;
import oracle.xdo.common.pdf.util.PDFDocMerger;
.
.
.
  public boolean mergeDocs(InputStream[] inputStreams, InputStream backgroundStream, OutputStream outputStream)
  {
    PDFMerger merger = null;

    try
    {
      // Initialize PDFMerger
      merger = new PDFMerger(outputStream);

      // Set Background
      merger.setBackground(backgroundStream);
      
      // Add input stream one by one
      for (InputStream inputStream : inputStreams)
      {
        merger.addDocument(inputStream);
      }
    }
    catch (Exception exc)
    {
      exc.printStackTrace();
      return false;
    }
    finally
    {
      if (merger != null)
      {
        // Close the merged document
        try
        {
          merger.close();
        }
        catch (Exception exc)
        {
          exc.printStackTrace();
          return false;
        }
      }
    }

    return true;
  }

Setting a Text or Image Watermark

Some documents that are in a draft phase require that a watermark indicating "DRAFT" be displayed throughout the document. Other documents might require a background image on the document. The following code sample shows how to use the PDFDocMerger class to set a watermark.

Setting a Text Watermark

Use the setTextDefaultWatermark() method to set a text watermark with the following attributes:

  • Text angle (in degrees): 55

  • Color: light gray (0.9, 0.9, 0.9)

  • Font: Helvetica

  • Font Size: 100

  • The start position is calculated based on the length of the text

Alternatively, use the setTextWatermark() method to set each attribute separately. Use the setTextWatermark() method as follows:

  • setTextWatermark ("Watermark Text", x, y) - declare the watermark text, and set the x and y coordinates of the start position. In the following example, the watermark text is "Draft" and the coordinates are 200f, 200f.

  • setTextWatermarkAngle (n) - sets the angle of the watermark text. If this method is not called, 0 will be used.

  • setTextWatermarkColor (R, G, B) - sets the RGB color. If this method is not called, light gray (0.9, 0.9, 0.9) will be used.

  • setTextWatermarkFont ("font name", font size) - sets the font and size. If you do not call this method, Helvetica, 100 will be used.

The following example shows how to set these properties and then call the PDFDocMerger.

Input:

  • PDF Documents (InputStream)

Output:

  • PDF Document (OutputStream)

Sample Code for Setting a Text Watermark in PDF Documents

import java.io.*;
import oracle.xdo.common.pdf.util.PDFDocMerger;
.
.
.
  public boolean mergeDocs(InputStream[] inputStreams, OutputStream outputStream)
  {
    PDFMerger merger = null;

    try
    {
      // Initialize PDFMerger
      merger = new PDFMerger(outputStream);
      
      // You can use setTextDefaultWatermark() without these detailed setting
      merger.setTextWatermark("DRAFT", 200f, 200f); //set text and place
      merger.setTextWatermarkAngle(80);                //set angle 
      merger.setTextWatermarkColor(1.0f, 0.3f, 0.5f);  // set RGB Color

      // Add input stream one by one
      for (InputStream inputStream : inputStreams)
      {
        merger.addDocument(inputStream);
      }
    }
    catch (Exception exc)
    {
      exc.printStackTrace();
      return false;
    }
    finally
    {
      if (merger != null)
      {
        // Close the merged document
        try
        {
          merger.close();
        }
        catch (Exception exc)
        {
          exc.printStackTrace();
          return false;
        }
      }
    }

    return true;
  }

Setting Image Watermark

An image watermark can be set to cover the entire background of a document, or just to cover a specific area (for example, to display a logo). Specify the placement and size of the image using rectangular coordinates as follows:

float[] rct = {LowerLeft X, LowerLeft Y, UpperRight X, UpperRight Y}

For example:

float[] rct = {100f, 100f, 200f, 200f}

The image will be sized to fit the rectangular area defined.

To use the actual image size, without sizing it, define the LowerLeft X and LowerLeft Y positions to define the placement and specify the UpperRight X and UpperRight Y coordinates as -1f. For example:

float[] rct = {100f, 100f, -1f, -1f}

Input:

  • PDF Documents (InputStream)

  • Image File (InputStream)

Output:

  • PDF Document (OutputStream)

Sample Code for Setting an Image Watermark in PDF Documents

import java.io.*;
import oracle.xdo.common.pdf.util.PDFDocMerger;
.
.
.
  public boolean mergeDocs(InputStream[] inputStreams, OutputStream outputStream, String imageFilePath)
  {
    PDFMerger merger = null;

    try
    {
      // Initialize PDFMerger
      merger = new PDFMerger(outputStream);
      
      FileInputStream wmStream = new FileInputStream(imageFilePath);
      float[] rct = {100f, 100f, -1f, -1f};
      merger.setImageWatermark(wmStream, rct);

      
      // Add input stream one by one
      for (InputStream inputStream : inputStreams)
      {
        merger.addDocument(inputStream);
      }
    }
    catch (Exception exc)
    {
      exc.printStackTrace();
      return false;
    }
    finally
    {
      if (merger != null)
      {
        // Close the merged document
        try
        {
          merger.close();
        }
        catch (Exception exc)
        {
          exc.printStackTrace();
          return false;
        }
      }
    }

    return true;
  }

Oracle Fusion Middleware Release Notes for Business Intelligence, Release 12.2.1.2.0

E77675-04

Copyright © 2010, 2017, Oracle and/or its affiliates. All rights reserved.

This document describes new features and other notable changes for Oracle Business Intelligence Enterprise Edition.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.