Skip to main content
Waters

How to use fonts in Jasper report templates in NuGenesis LMS - WKB30944

Article number: 30944

OBJECTIVE or GOAL

Use a font other than Helvetica (the default font for Jasper) with report templates in NuGenesis LMS.

ENVIRONMENT

  • NuGenesis 9 LMS
  • NuGenesis 8 LMS
  • NuGenesis 8 ELN

PROCEDURE

Procedure for NuGenesis 9 LMS

  1. Creating the fonts file:
    1. In JasperSoft Studio, click Window > Preferences. In the Preferences window, click JasperSoft Studio > Fonts
    2. The list of fonts available to JasperSoft appears. If the necessary font is not in the list, click the Add button
    3. Enter a name for the new font. This name will appear in the Studio client when working with text as one of the selectable fonts
    4. Use the browse buttons to find the TrueType Font (ttf) files for the normal, bold, italic, and bold-italic fonts
    5. Select "Identity-H (Unicode with horizontal writing)" for the PDF Encoding. If a non-Unicode character encoding is chosen, characters outside that encoding will not be visible in PDF reports. For example, with the CP1252 encoding, only characters in the extended Latin alphabet are supported; letters in the Greek or Cyrillic alphabets will not work
    6. Click the Finish button to add this font to JasperSoft Studio
    7. Select the font or fonts to export and click the Export button
    8. In the new dialog box, select a location for the export file; specify a name for the file; and select the file type *.jar
  2. Installing the fonts file:
    1. Copy the JAR file to the LMS server:
      • Drive:\WatersLMSServer\Wildfly-11.0.0.Final\modules\system\layers\base\waters\lms\reports\main
    2. Open the following file in Notepad:
      • Drive:\WatersLMSServer\Wildfly-11.0.0.Final\modules\system\layers\base\waters\lms\reports\main\module.xml
    3. Add a new line below "<!--Jasper Reports -->", where FontFileName.jar is the name of the .JAR file created in step 8:
      • <resource-root path="FontFileName.jar"/>
    4. Save and close module.xml
    5. Restart the "NuGenesis LMS Server" service.

Procedure for NuGenesis 8 LMS

  1. Creating the fonts file:
    • Follow the directions above for NuGenesis 9 to create the fonts file
  2. Installing the fonts file:
    1. Copy the JAR file to the LMS server:
      • Drive:\WatersLMSServer\Jboss-6.0.0.Final\server\eln\lib
    2. Restart the "NuGenesis LMS Server" service.

Procedure for NuGenesis 8 ELN

  1. Creating the fonts file:
    1. In the iReports client, go to Tools > Options. Click the Fonts tab under the "iReport" category.
    2. The fonts available to iReports are listed in the Fonts box. If the fonts are not listed, click the Install Font button.
    3. In the Font Installation box, browse to the TTF file for the font and click Next.
    4. Jasper reads the Font Name from the TTF file and displays it in the "Family Name" box.
    5. If necessary, browse to the separate TTF files for the Bold, Italic, and Bold-Italic variants of the font.
    6. Select "Identity-H (Unicode with horizontal writing)" for the PDF Encoding. If a non-Unicode character encoding is chosen, characters outside that encoding will not be visible in PDF reports. For example, with the CP1252 encoding, only characters in the extended Latin alphabet are supported; letters in the Greek or Cyrillic alphabets will not work.
    7. Click the Finish button to add this font to iReports.
    8. Select the font or fonts to export and click the "Export as extension" button.
    9. In the new dialog box, select a location for the export file; specify a name for the file; and select the file type *.jar.
  2. Installing the fonts file:
    1. Copy the JAR file to the ELN server:
      • Drive:\WatersELNServer\Jboss-6.0.0.Final\server\eln\lib
    2. Restart the "NuGenesis ELN Server" service.

ADDITIONAL INFORMATION

http://community.jaspersoft.com/ques...upport-and-pdf

If a user tries to pull a Jasper report and the report uses a font which is NOT loaded in LMS, then an error message will appear in the client.  the message reads, in part, "net.sf.jasperreports.engine.util.JRFontNotFoundException: Font "FontName" is not available to the JVM. See the Javadoc for more details."  Use the instructions in this article to check for the fonts as installed in the LMS server.  This error message is more likely to occur following a NuGenesis LMS 9.x upgrade, as the upgrade process will replace the "module.xml" file with the default file, and thus lose any custom entries for font-containing JAR files.

id30944, ELN, NGLMS, NGLMSLIC, NGLMSOPT, SUPNG

Not able to find a solution? Click here to request help.