Configuring Desktop PDR for Report Generation

For every desktop where a user must be able to generate Patient Data Reports or Blank Casebook Reports from the command line, you must:

  • Install the Java Runtime Environment (JRE)
  • Copy the desktoppdr folder and files to the appropriate location on each desktop
  • Copy and Configure the xdobookbinder.cfg File for Embedding Type 1 Fonts
  • Copy the xdobookbinder.cfg file to the JRE installation folder, and then modify the file to define the location of the PC's Windows directory
  • Edit settings in the RunPDR.cmd file and the RunBlankCasebook.cmd file to configure the user's environment

For more information, see:

Contents of the desktoppdr Folder

During the installation of Oracle Clinical, the system creates a desktoppdr folder in the installation directory.

The desktoppdr folder has the following files:

  • charsets.jar, olsablankpdr.jar, and olsapdr.jar — Java ARchive (JAR) files containing the required class files for generating Patient Data Reports and Blank Casebook Reports.
  • RunBlankCasebook.cmd — Command file used to generate a Blank Casebook Report from the command line.
  • RunPDR.cmd — Command file used to generate a Patient Data Report from the command line.
  • xdobookbinder.cfg — Configuration file with information about the Arial font generation in the reports.
Sample PC Desktop Showing the desktoppdr Folder

Installing the Java Runtime Environment

You must install the Java Runtime Environment (JRE) on the PC desktop if it is not already installed.

The desktop PDR supports Java SE 8 Update 311 (Standard Edition, Version 1.8.0.311) or later.

You can download the JRE from the Oracle Clinical launch page.

Check with the system administrator which method to use, if you are not sure.

Copying the Files in the desktoppdr Folder

Copy the desktoppdr folder and its files to the RDC directory on your PC desktop. For example:

C:\opapps54\rdc

In addition, you need to copy the xdobookbinder.cfg file from the desktoppdr folder to the directory where you installed the JRE. For more information, see Copying and Configuring the xdobookbinder.cfg File for Fully Embedding Fonts

Copying and Modifying the xdo.cfg File

The xdo.cfg file stores system information about the Arial font, which is the font used by the Patient Data Report and the Blank Casebook Report.

During the installation of the Report Server component of Oracle Clinical, the system automatically creates and copies the xdo.cfg file to the following location:

middleware_home/jdk/jre/lib

In addition, any PC that will be used to generate reports from the command line must have a copy of the xdo.cfg file in the JRE installation directory on the desktop. You must also edit the file to define the location of the Windows directory.

To copy and modify the xdo.cfg file:

  1. Copy the xdo.cfg file to the following directory where you installed the JRE on your PC desktop:
    JRE_Install_Directory/jdk/jre/lib
  2. Open the xdo.cfg file with a text editor.
  3. Locate the following two lines in the file:
    <truetype path="%OUI_WIN_DIR%\fonts\Arial.ttf" />

    <truetype path="%OUI_WIN_DIR%\fonts\arialbd.ttf" />

  4. Replace each occurrence of the %OUI_WIN_DIR% variable with the location of the Windows directory on your PC.
    For example:

    <truetype path="C:\WINDOWS\fonts\Arial.ttf" />

Embedding Fonts into the Patient Data Report

By default, when you generate a Patient Data Report, the system:

  • Does not embed any Adobe (Type 1) fonts.
  • Embeds a subset of the TrueType fonts—only those TrueType font characters that are actually used in the report.

When you use the RunPDR command to generate a Patient Data Report from the command line, you can specify the -cfg parameter to embed the full character set for the fonts used in the report. This may be required for official submissions. Additionally, embedding Acrobat fonts is required if you use Wingbat or Symbol characters. The system uses the information that you specify in the xdobookbinder.cfg file to determine the fonts to embed.

To embed fonts into Patient Data Reports, follow the steps presented in the following section:

Copying and Configuring the xdobookbinder.cfg File for Fully Embedding Fonts

The xdobookbinder.cfg file controls font embedding in the Patient Data Reports. When you install this patch, the system automatically copies the xdobookbinder.cfg file into the desktoppdr folder on the Application Server.

You must copy the xdobookbinder.cfg file to every PC that you will use to generate reports from the command line and embed fonts into the report PDF file. In addition, you must edit the xdobookbinder.cfg file to define the fonts to embed, the location of the Windows font directory, and the location of the Adobe font directory.

To copy and configure the xdobookbinder.cfg file for embedding fonts:

  1. Copy the xdobookbinder.cfg file from the desktoppdr folder on the Application Server to the PC. You can copy the xdobookbinder.cfg file to any directory on the PC. You specify the location of the xdobookbinder.cfg file when you execute the RunPDR command.
  2. Open the xdobookbinder.cfg file with a text editor.
  3. Locate the following lines in the file and verify that the value of the process-font-substitution property is set to true:
    <properties><property name="process-font-substitution">true</property></properties>
  4. To embed TrueType fonts, replace each occurrence of the %OUI_WIN_DIR% variable with the path to the Windows directory on this PC:

    <font-substitute name="Arial"><truetype path="%OUI_WIN_DIR%\fonts\arial.ttf"/></font-substitute>

  5. To embed Wingbat or symbol characters, replace each occurrence of the %OUI_ADOBE_FONT_DIR% variable with the path to the Adobe fonts directory on this PC:

    <font-substitute name="Symbol"><type1 pfb="%OUI_ADOBE_FONT_DIR%\Sy______.pfb" pfm="%OUI_ADOBE_FONT_DIR%\pfm\Sy______.pfm"/></font-substitute>

    Note:

    The Symbol and ZapfDingbats fonts are Adobe fonts, also called Type 1 fonts. . The fonts must be present on this PC and in the specified directory if you want to embed them into Patient Data Reports.
  6. Save your changes.
    Here is a sample of xdobookbinder.cfg file:
    <config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">
        <fonts> 
           <!-- Core 14 PDF fonts --> 
           <font-substitute name="Helvetica"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Helvetica-Oblique"> 
             <truetype path="c:\windows\fonts\ariali.ttf"/> 
           </font-substitute> 
           <font-substitute name="Helvetica-Bold"> 
             <truetype path="c:\windows\fonts\arialbd.ttf"/> 
           </font-substitute> 
           <font-substitute name="Helvetica-BoldOblique"> 
             <truetype path="c:\windows\fonts\arialbi.ttf"/> 
           </font-substitute> 
           <font-substitute name="Times-Roman"> 
             <truetype path="c:\windows\fonts\times.ttf"/> 
           </font-substitute> 
           <font-substitute name="Times-Bold"> 
             <truetype path="c:\windows\fonts\timesbd.ttf"/> 
           </font-substitute> 
           <font-substitute name="Times-Italic"> 
             <truetype path="c:\windows\fonts\timesi.ttf"/> 
           </font-substitute> 
           <font-substitute name="Times-BoldItalic"> 
             <truetype path="c:\windows\fonts\timesbi.ttf"/> 
           </font-substitute> 
           <font-substitute name="Courier"> 
             <truetype path="c:\windows\fonts\cour.ttf"/> 
           </font-substitute> 
           <font-substitute name="Courier-Bold"> 
             <truetype path="c:\windows\fonts\courbd.ttf"/> 
           </font-substitute> 
           <font-substitute name="Courier-Oblique"> 
             <truetype path="c:\windows\fonts\couri.ttf"/> 
           </font-substitute> 
           <font-substitute name="Courier-BoldOblique"> 
             <truetype path="c:\windows\fonts\courbi.ttf"/> 
           </font-substitute> 
           <font-substitute name="Symbol"> 
             <truetype path="c:\windows\fonts\courbi.ttf"/> 
           </font-substitute> 
           <font-substitute name="Symbol"> 
             <type1 pfb="C:\windows\fonts\adobecore14\Sy______.pfb" 
     pfm="C:\windows\fonts\adobecore14\pfm\Sy______.pfm"/> 
           </font-substitute> 
           <font-substitute name="ZapfDingbats"> 
             <type1 pfb="C:\windows\fonts\Zd______.pfb" 
     pfm="C:\windows\fonts\Zd______.pfm"/> 
           </font-substitute> 
           <!-- Arial is not a core PDF font, but sometiimes used --> 
           <font-substitute name="Arial"> 
              <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial,Italic"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial,Bold"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial,BoldItalic"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="ArialMT"> 
              <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial-ItalicMT"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial-BoldMT"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Arial-BoldItalicMT"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="Univers"> 
              <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="UniversItalic"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="UniversBold"> 
             <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <font-substitute name="UniversBoldItalic"> 
            <truetype path="c:\windows\fonts\arial.ttf"/> 
           </font-substitute> 
           <!-- TrueType version of TimesNewRoman --> 
           <font-substitute name="TimesNewRoman"> 
             <truetype path="c:\windows\fonts\times.ttf"/> 
           </font-substitute> 
           <font-substitute name="TimesNewRoman,Bold"> 
             <truetype path="c:\windows\fonts\timesbd.ttf"/> 
           </font-substitute> 
           <font-substitute name="TimesNewRoman,Italic"> 
             <truetype path="c:\windows\fonts\timesi.ttf"/> 
           </font-substitute> 
           <font-substitute name="TimesNewRoman,BoldItalic"> 
             <truetype path="c:\windows\fonts\timesbi.ttf"/> 
           </font-substitute> 
           <font-substitute name="TimesNewRomanPSMT">          <truetype path="c:\windows\fonts\times.ttf"/>        </font-substitute>        <font-substitute name="TimesNewRomanPS-BoldMT">          <truetype path="c:\windows\fonts\timesbd.ttf"/>        </font-substitute>        <font-substitute name="TimesNewRomanPS-ItalicMT">          <truetype path="c:\windows\fonts\timesi.ttf"/>        </font-substitute>        <font-substitute name="TimesNewRomanPS-BoldItalicMT">          <truetype path="c:\windows\fonts\timesbi.ttf"/>        </font-substitute>        <!-- Fonts used for W-2 -->        <font-substitute name="FranklinGothic-Demi">          <truetype path="c:\windows\fonts\framd.ttf"/>        </font-substitute>        <font-substitute name="Helvetica-Condensed">          <truetype path="c:\windows\fonts\arialn.ttf"/>        </font-substitute>        <font-substitute name="Helvetica-Condensed-Black">          <truetype path="c:\windows\fonts\arialnb.ttf"/>        </font-substitute>        <font-substitute name="HelveticaNeue-Bold">          <truetype path="c:\windows\fonts\arialbd.ttf"/>        </font-substitute>        <font-substitute name="HelveticaNeue-BoldItalic">          <truetype path="c:\windows\fonts\arialbi.ttf"/>        </font-substitute>        <font-substitute name="HelveticaNeue-Italic">          <truetype path="c:\windows\fonts\ariali.ttf"/>        </font-substitute>        <font-substitute name="HelveticaNeue-Roman">          <truetype path="c:\windows\fonts\arial.ttf"/>        </font-substitute>        <!-- For Canadian
    T-4A -->        <font-substitute name="ArialNarrow">          <truetype path="c:\windows\fonts\arialn.ttf"/>        </font-substitute>     </fonts>     <properties>         <!-- The below option can be set to true to adjust character layout,  but setting this option to true may affect page layout -->         <property name="replace-character-widths">false</property>         <!-- Set process-font-substitution=true when you want to process font  substitution in PDFBookBinder -->         <property name="process-font-substitution">true</property>     </properties>  </config>

Note:

The font embedding is configurable. Please set the following property to false in xdobookbider.cfg file if you do not want embedding, like this:
 <properties> 
   <property name="process-font-substitution">false</property> 
  </properties> 

When you execute RunPdr command (see 13.2) you must include the -cfg parameter to specify the location of the xdobookbinder.cfg file on your PC. In addition, the fonts must be located on the same machine that you use to run the report.

For example:

RunPDR.cmd -st test3 -l D:\temp -u jsmith -cfg D:\pdr\xdobookbinder.cfg

Modifying the RunPDR.cmd File

To modify the RunPDR.cmd file:

  1. Navigate to the desktoppdr folder on your PC.
  2. Open the RunPDR.cmd file with a text editor.
  3. Modify the following lines in the file:
    1. set JAVA_CMD to the directory path where you installed the JRE. For example:

      set JAVA_CMD=C:\Progra~1\Java\jre\bin\java

    2. set JAR_PATH to the directory path where you installed the JAR files (charsets.jar, olsapdr.jar, and olsablankpdr.jar). For example:

      set JAR_PATH=C:\OLSAPDR

    3. set DB_CONNECT_STRING in the following format to specify the database connection:

      host-name:port-number:database-sid

      For example, if you have a database with sid, proddb, that is installed on the prodserver host machine at port number 1532, then you define your database connection string as follow:

      set DB_CONNECTION=prodserver:1532:proddb

    4. In the command line, add the -Xms and the -Xmx options to set the initial and maximum amount of memory for the report generation. For example:

      %JAVA_CMD% -classpath %CLASSPATH% -Xms64M -Xmx512M %JAV…

      For more information on these options, see Adjusting the Heap Size for the Java Virtual Machine (JVM)

  4. Save your changes.
  5. Copy and rename the RunPDR.cmd file for every database that your users need to connect to and access. For example, if your users need to connect to a production database and a test database, create the following two new files: RunPDRprod.cmd and RunPDRtest.cmd.
  6. Open each copy of the RunPDR.cmd file.
    1. Modify the set DB_CONNECT_STRING parameter for each database connection.
    2. Save your changes.

Modifying the RunBlankCasebook.cmd File

To modify the RunBlankCasebook.cmd file:

  1. Navigate to the desktoppdr folder on your PC.
  2. Open the RunBlankCasebook.cmd file with a text editor.
  3. Modify the following lines in the file:
    1. set JAVA_CMD to the directory path where you installed the JRE. For example:

      set JAVA_CMD=C:\Progra~1\Java\jre\bin\java

    2. set JAR_PATH to the directory path where you installed the JAR files (charsets.jar, olsapdr.jar, and olsablankpdr.jar). For example:

      set JAR_PATH=C:\OLSAPDR

    3. Use the following lines to specify the database connection:

      set HOST=host-name set PORT=port-number set SID=database-sid

    4. In the command line, add the -Xms and the -Xmx options to set the initial and maximum amount of memory for the report generation. For example:

      %JAVA_CMD% -classpath %CLASSPATH% -Xms64M -Xmx512M %JAV…

      For more information on these options, see Adjusting the Heap Size for the Java Virtual Machine (JVM)

  4. Save your changes.
  5. Copy and rename the RunBlankCasebook.cmd file for every database that your users need to connect to and access. For example, if your users need to connect to a production database and a test database, create the following two new files:
    • RunBlankCasebookprod.cmd
    • RunBlankCasebooktest.cmd
  6. Open each copy of the RunBlankCasebook.cmd file.
    1. Modify the set HOST, set PORT, and set SID parameters for each database connection.
    2. Save your changes.

Adjusting the Heap Size for the Java Virtual Machine (JVM)

Report generation may fail with an OutOfMemoryError message. This failure occurs when the Java program needs more memory than the amount currently allocated. As the number of pages in the Patient Data Reports and the Blank Casebook Reports increases, you may need to increase the JVM heap size accordingly.

To support large reports, use the following JVM options to specify the heap size:

  • Use the -Xms option to set the initial amount of memory allocated for the program.
  • Use the -Xmx option to set the maximum amount of memory that can be allocated for the program.

As a benchmark, Oracle has successfully generated a 4000-page report with an allocation of 4GB.

For more information, see:

Adjusting JVM Heap Size Options for the Desktop

To adjust the heap size available for reports generated from the command line, you need to modify the RunPDR.cmd file (for Patient Data Reports) and the RunBlankCasebook.cmd file (for Blank Casebook Reports).

To adjust the heap size in the files:

  1. Open the RunPDR.cmd file or the RunBlankCasebook.cmd file.
  2. Locate the following line in the file:

    %JAVA_CMD% -classpath %CLASSPATH% …

  3. Add the -Xms and -Xmx options to the line. For example:

    %JAVA_CMD% -classpath %CLASSPATH% -Xms64M -Xmx512M %JAVA…

    Substitute the 64M value for the initial amount of memory to allocate, and the 512M value for the maximum amount of memory to allocate.

  4. Save your changes.

Adjusting JVM Heap Size Options on the Reports Server

You can adjust the heap size available to reports generated from either the RDC or the Oracle Clinical application.

To adjust the heap size on the Reports Server:

  1. Log in to Oracle Enterprise Manager 10g Application Server Control.
  2. Click the name of the Reports Server (for example, oclw2k36) in the System Components table.
  3. Click the Configuration link in the Administration section. The system opens the Configuration page and displays the Reports Engine Parameters section.
    Reports Engine Parameters section
  4. Click the JVM Option field. Set the appropriate values for the JVM heap size options as follows:

    -Xms64M -Xmx512M

    Substitute the 64M value for the initial amount of memory to allocate, and the 512M value for the maximum amount of memory to allocate.

  5. Click OK to save your changes. The system prompts for confirmation to restart the Reports Server now.
  6. Click Yes. You must restart the Reports Server before your changes to the JVM heap size will take effect.

    When the system confirms that the Reports Server has been restarted, click OK.