Debug Templates

If you don’t see the expected results in the template preview window, you can use Template Viewer to enable trace settings and view the debug messages to solve the problem.

You can also save and view the intermediate XSL file generated after the sample data and template are merged in the XSL-FO processor. If you already use XSL, you’ll quickly learn the debugging features in Template Viewer.

To preview template with Template Viewer and view log messages:

  1. Open Template Viewer:

    From the Windows desktop, click Start, then Programs, then Oracle BI Publisher Desktop, then Template Viewer.

  2. Click Browse to locate the working directory that contains the sample data file and template file. The data file and template file must reside in the same folder.

  3. In the Files tab, select the appropriate option. For example, if you’re testing a .xsl template, select Excel Templates. The Data and Template regions display the data files and template files present in the directory

  4. Click the appropriate data and template files to select them.

  5. Select the log (debug) level.

  6. If you want to test a sub-template, browse and specify the sub-template in the Style Template File field.

  7. If required, set the report parameters in the Setting (Default) tab.

  8. From the Output Format list, select the output format. For example, Excel.

  9. Click Start Processing.

    The Template Viewer merges the selected data with the selected master template and sub-template and opens the appropriate viewer. View the log messages in the message box.

  10. To view the generated XSL:

    1. Select the data and template files and choose Excel output.

    2. Select Tools, then Generate XSL file from, then Excel Template.

    3. At the prompt, save the generated XSL file.

    4. Navigate to the saved location and open the XSL file in an appropriate viewer.

Generate Reports in PDF/A, PDF/X, and PDF/UA Formats

You can generate reports in PDF/A, PDF/X, and PDF/UA formats in Template Viewer.

To generate reports in PDF/A, PDF/X, and PDF/UA formats in Template Viewer:
  1. Set the font directory to embed fonts in the document.
  2. Configure the PDF/A output by setting the properties. Add the key and value pairs for PDF/A output.
  3. Add the optional property settings for PDF/A and PDF/X outputs.

Set the Font Directory

You must set the font directory for Template Viewer.

To set the font directory for Template Viewer:
  1. Navigate to the c:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\TemplateViewer directory.
  2. Run the following command:
    java –j ar -DXDO_FONT_DIR="..\Template Builder for Word\fonts" tmplviewer.jar

Add Key and Value Pairs for PDF/A Output

Add the key and value pairs for PDF/A output

To add the key and value pairs for PDF/A output:
  1. Open Template Viewer.
  2. From the Windows desktop, click Start, Programs, Oracle BI Publisher Desktop, and then Template Viewer.
  3. Navigate to the Setting (Default) tab.
  4. (Optional) Load the xdo.cfg configuration file containing the font mapping.
    If you don’t specify the font mapping, the default font is TrueType.
  5. Add the following key and value pairs:
    • pdfx-dest-output-profile-data:File path of the ICC profile data file

      For PDF/X, ICC profile data file must be CMYK. For example, Coated Fogra 39.

    • pdfx-output-condition-identifier:Name of one of the standard printing conditions registered with ICC

      For example, FOGRA39.

Add the Optional Property Settings for PDF/A and PDF/X Outputs

Add the optional property settings for PDF/A and PDF/X outputs.

To add the optional property settings for PDF/A and PDF/X outputs:
  1. Open Template Viewer.
  2. From the Windows desktop, click Start, Programs, Oracle BI Publisher Desktop, and then Template Viewer.
  3. Navigate to the Setting (Default) tab.
  4. (Optional) Load the xdo.cfg configuration file containing the font mapping.
    If you don’t specify the font mapping, the default font is TrueType.
  5. For a PDF/A output, add the required optional property settings.

    Add the key and value pairs for the PDF/A properties you want to set. For the key, use the internal names of the PDF/A properties mentioned in the documentation for configuring the runtime property for PDF/A output.

  6. For a PDF/X output, add the required optional property settings.

    Add the key and value pairs for the PDF/X properties you want to set. For the key, use the internal names of the PDF/X properties mentioned in the documentation for configuring the runtime property for PDF/X output.