Menu

Monday, October 22, 2012

Barcode Font Does Not Appear In PDF Output


Barcode is shown in RTF/EXCEL output,in PDF it is coming as standard font but not in barcode. 

Solution

The fonts need to be declared in the xdo.cfg file that normally reside in $OA_JRE_TOP/jre/lib.
If the font mappings are not set in xdo.cfg the produced PDF does not includes them, so no barcode font will be shown.

To make sure that PDF output includes all the fonts, please do this:
  • Copy the font file (i.e. FRE3OF9X.TTF) in $OA_JRE_TOP/jre/lib/fonts
  • Add the following lines in xdo.cfg (must resides in $OA_JRE_TOP/jre/lib)

    <font family="Free 3 of 9 Extended" style="normal" weight="normal">
    <truetype path="/usr/java14/jre/lib/fonts/FRE3OF9X.TTF" />
    </font>
Please check what $OA_JRE_TOP is set to in your environment
and use this actual path in xdo.cfg


This is an example xdo.cfg
Please modify it to your needs:
<config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">
<!-- Properties -->
<properties>
<!-- System level properties -->

<!-- PLEASE SELECT A VALID TEMPFILE DIRECTORY!!! -->
<property name="system-temp-dir">D:/Temp</property>

<!-- PDF compression -->
<property name="pdf-compression">true</property>

<!-- Checkbox Appearance -->
<property name="rtf-checkbox-glyph">Wingdings;253;111</property>

<!-- PDF security ->
<property name="pdf-security">false</property>
<property name="pdf-open-password">user</property>
<property name="pdf-permissions-password">owner</property>
<property name="pdf-no-printing">true</property>
<property name="pdf-no-changing-the-document">true</property>
-->
</properties>


<!-- Font setting -->
<fonts>

<!-- Windows Wingdings font -->
<font family="Wingdings" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/WINGDING.TTF" />
</font>

<font family="GnuMICR" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/GnuMICR.ttf" />
</font>

<font family="Times New Roman" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/TIMES.TTF" />
</font>

<font family="Tahoma" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/TAHOMA.TTF" />
</font>

<font family="Tahoma" style="normal" weight="bold">
<truetype path="/usr/java14/jre/lib/fonts/TAHOMABD.TTF" />
</font>

<font family="Free 3 of 9 Extended" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/FRE3OF9X.TTF" />
</font>

<font family="IDAutomationHC39M" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/IDAutomationHC39M.ttf" />
</font>

<font family="BC 3of9" style="normal" weight="normal">
<truetype path="/usr/java14/jre/lib/fonts/B39R00.TTF" />
</font>
</fonts>
</config>

No comments:

Post a Comment