This recipe demonstrates how to Map & Encode font in both Repertoire & Ambience 3.x/4.x. This example uses the Arial font to render out the missing Superscript into a PDF output from the report template.
Notes:
- This example uses the Arial font family.
- Tested on Repertoire 8.8.0 & Ambience 4.6.2
- If fonts other than Arial is used, please do ensure that the selected font supports the desired SubScripts & SuperScripts.
- For Linux Environment, do ensure that required fonts are loaded in your system cache. (Click here for the steps to ensure that fonts have been loaded)
Initial State:
Configuration steps for Repertoire:
- Go to Repertoire Designer config/EREngine-config.xml & add the following to
<pdf-font-map> </pdf-font-map>
:<map-encoding logical-font-name="Arial" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Regular" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Black" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold Italic" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Italic" encoding="Identity-H"/>
- In
<properties></properties>
, ensure that the font path configuration points to the font path in your local machine. For e.g.,<property name="elixirtech.fonts.path" value="C:\\Windows\\Fonts"/>
- Start Repertoire Designer and render out the report template to a PDF output.
Configuration steps for Ambience 4.x & below
Using 7-ZIP
Prerequisites:
//Uses the utility “7-ZIP”.
//To install, do refer here
- Go to the Ambience Server /lib directory and look for the elx-report-[version].jar file.
(e.g. elx-report-2.11-4.6.4.jar)- Open up the elx-report-[version].jar archive using 7-ZIP.
- Edit the elx-report-[version].jar by going into config/EREngine-config.xml and add the following to
<pdf-font-map> </pdf-font-map>
:<map-encoding logical-font-name="Arial" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Regular" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Black" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold Italic" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Italic" encoding="Identity-H"/>
- In
<properties></properties>
, ensure that the font path configuration points to the font path in your local machine. For e.g.,<property name="elixirtech.fonts.path" value="C:\\Windows\\Fonts"/>
- Make sure to save the configuration file before closing config/EREngine-config.xml.
- Start Ambience Designer and render out the report template to a PDF output.
Configuration steps for Ambience 4.x & below
Using Ubuntu Linux Command Line
Prerequisites:
//Uses the Command-Line utility “zip” & “unzip”.
//To install, do refer here
- Go to the Ambience Server /lib directory on the Linux command line.
For example,
- Unzip elx-report-[version].jar (e.g. elx-report-2.11-4.6.4.jar) file by using
$ unzip [jar_filename] -d [destination_foldername]
For example,
$ unzip elx-report_2.12-4.6.2.jar -d elx-report_2.12-4.6.2
- Edit the elx-report-[version].jar by going into config/EREngine-config.xml and add the following to >
<pdf-font-map> </pdf-font-map>
:<map-encoding logical-font-name="Arial" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Regular" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Black" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Bold Italic" encoding="Identity-H"/> <map-encoding logical-font-name="Arial Italic" encoding="Identity-H"/>
- In
<properties></properties>
, ensure that the font path configuration points to the font path in >your local machine. For e.g.,<property name="elixirtech.fonts.path" value="C:\\Windows\\Fonts"/>
- Make sure to save the configuration file before closing.
- Delete the initial elx-report-[version].jar in Amience Server /lib directory.
- Go to the /[destination_foldername] directory on the command line.
For example,
- Zip the contents back into a .jar file using
zip -r [jar_filename].jar ./*
For example,
$ zip -r elx-report_2.12-4.6.2.jar ./*
- Move the .jar file over to Ambience Server /lib.
- Start Ambience Designer and render out the report template to a PDF output.
Final Output:
Report Template can be downloaded here:
Superscript.zip (47.2 KB)
PDF Template Reference:
Initial.pdf (26.4 KB)
Final.pdf (22.9 KB)