Adding a Barcode or Cheque font to a RTF template when using Template Builder for Word.


We have recently had demand from a client to create RTF templates for both printing cheques and invoices. Both of which require using fonts which are not default in Microsoft Word. 

This blog will firstly talk through how to add these fonts both to your local machine for use in the RTF template, and to the server for use within Oracle EBS. 

RTF Template 

The two fonts we are interested in are called Code 128 and Micr MT and are both of font type TrueType (.ttf). Its very easy to find a free download of the fonts using your search engine of choice. You can see examples of the fonts below:

Once the fonts were downloaded, they were saved in the font’s directory on windows:


Make a note of the exact directory path as it will need to be referenced.

The font now needs to be referenced within the Template Builder for Word directory, which will point towards the windows font directory we have saved the font in. This is done by creating a xdo.cfg file.

On my machine this was added in the following directory, though this may differ dependant on the location of Template Builder for Word on your machine.

C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config

Below is the layout for the xdo.cfg file which will be saved in the location above. See that it contains the file location of the two fonts we are adding.

<config version=”1.0.0″xmlns=””>
 <!– Font setting –>
   <font family=”Code 128″ style=”normal” weight=”normal”>
   <truetype path=”C:\windows\fonts\code128.ttf” />
   <font family=”Micr MT” style=”normal” weight=”normal”>
   <truetype path=”C:\Windows\Fonts\MICR___.TTF”/>

After following these steps, close and reopen Word and you should be able to see and use the fonts.

Adding the fonts to the Server 

Below are the steps needed to add the barcode font to the server – the cheque font is added in the same way.

After logging onto XML Publisher, Navigate to Administration > Font Files > Create Font File.

For the barcode font the name is Code 128 and the file name is code128.ttf

Then, navigate to Administration > Font Mappings

Any fonts added can be added to a Font Mapping which is essentially a grouping of added fonts that can be used in Oracle EBS.

Here the Mapping name is Bar Code Fonts, the Mapping code is BAR_CODE_FONTS and the type is FO To PDF. Of course, the Mapping Name and Mapping Code can be anything you wish. The Type is FO To PDF because we will be producing reports in PDF format. A font mapping is then made, with the detail shown below:

The Final step is to navigate to Configuration, FO Processing > Font mapping set and then add the font using the search and select.

The cheque font is added in the same way as the above. To have both fonts used at the same time ensure they are added to the same font mapping.

NOTE: If you are using the bursting functionality there is a patch that must be applied for barcodes to appear correctly on PDFs (Oracle Support note linked below):

In XML Publisher Bursting Barcode Font is Ignored (Doc ID 1136423.1)

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × three =

This site uses Akismet to reduce spam. Learn how your comment data is processed.