Problem: A report, designed for generating PDF with the true-type font Univers in it, does not work while deployed on the web, and uses other fonts instead.
Cause: there’s no Univers installed in the Reports Services on Unix.
Solution: install the font and configure the Reports Service! Sounds simple…
In the process of figuring this out, I had several error-messages, like rep-1352 (The fonts specified for this report cannot be found for the character set specified by NLS_LANG) , and rep-1 (nothing else…).
Took a lot of time to eliminate those errors, partly because there was a feature in the specified report what did’nt speed up the process of resolving this issue: embedded html. This caused for example the “rep-1”-error.
With special thanks to Marc Riesewijk, developer:
1. First, make a so called ‘AFM’-file of the font-files from your windows-client, which will be used to copy to the Linux-server.
In the case of Univers there are the following files in c:\windows\fonts:
Download the free tool ttf2pt1 .
Install this in a seperate directory on your windows client. Unpack, en run ‘winbuild.bat’. Probably you get errors for missing dll’s. Put these dll’s in your path, or copy these to the ttf2pt1-directory, or download them to this directory. Run winbuild.bat again until it’s without errors.
Copy also the TTF-files in this directory on your client.
Run the following commands on the prompt on your client:
ttf2pt1 -a -e -Ob OW unvr55w.TTF
ttf2pt1 -a -e -Ob OW unvr56w.TTF
Then you ought to get .afm- and .pfa -files for every font.
2. Copy the .afm-files to the Linux-machine in the directory: <ORACLE_HOME>/guicommon/tk/admin/AFM
Important: Binary-transfer !!
3. Rename the files to names which are in the files:
oracle@uttltto:/software/oracle/product/10.2/middle/guicommon/tk/admin/AFM> head unvr55w.TTF
FullName Univers Medium
Notice Copyright 1992-97 Hewlett-Packard. All rights reserved.
Version Version 1.3 [Hewlett-Packard]
Rename this unvr55w.TTF to Univers-Medium:
==> mv unvr55w.TTF Univers-Medium
Perform this to all the other files.
4. Very important step: check these files on Carriage-returns with a script, e.q. check_afm.sh:
for fic in `ls *`
(od -a $fic |grep -i cr) && echo “File containing a Carriage Return: ” $fic
There should be no output. When there’s output, probably something went wrong with copying from the client to Linux.
5. Now the necessary files are on Linux. What left is the configuration.
The following files are of vital importance:
a – $ORACLE_HOME/guicommon/tk/admin/uiprint.txt
One line (the last) is active:
# — Note that the following two printers are aliases for the same
# — physical printer, with different names for different types:
# tk2hp4m:PCL:5:HP printer in 771 for testing PCL:ui4.hpd:
# tk2bw1ps:PostScript:1:HP printer in 771 for testing PS:hp4mp6_1.ppd:
# Not A Printer:ASCII:1:Configure your uiprint.txt file:none:
b – $ORACLE_HOME/guicommon/tk/admin/PPD/default.ppd
Changed the include-line:
*% To modify this, change the filename in quotations to the base
*% filename (no directory) of your default printer’s PPD file.
*% If you move this to the end, the included file’s info will override
*% the defaults above.
Created a $ORACLE_HOME/guicommon/tk/admin/PPD/projectx.ppd by copying datap462.ppd, and add the following lines:
*% Font Information =====================
*Font Univers-Medium: Standard “(001.001)” Standard ROM
*Font Univers-MediumItalic: Standard “(001.001)” Standard ROM
*Font Univers-Bold: Standard “(001.001)” Standard ROM
*Font Univers-BoldItalic: Standard “(001.001)” Standard ROM
*Font Univers-Condensed-Medium: Standard “(001.001)” Standard ROM
*Font Univers-Condensed-MediumItalic: Standard “(001.001)” Standard ROM
*Font Univers-Condensed-Bold: Standard “(001.001)” Standard ROM
*Font Univers-Condensed-BoldItalic: Standard “(001.001)” Standard ROM
However all the notes are mentioning the editing of this file, we didn’t touch the file, and it seems to work. But the font wouldn’t get bold in pdf. So added the following line under the PDF-section:
[ PDF ]
univers = Univers
Only be sure that your report-directory is in the REPORTS_PATH.
6. Post-configuration of the AFM-files.
It appeared to be that the Italic-Univers fonts had a different look, they a wrong ‘angle’, leaning back in stead of the other way how it should be.
Changed this ( through ‘vi’) in these files from
Other files contained 17 instead of 16 by the way.
Doc B14048-02 – Oracle Application Server Reports Services Publishing Reports to the web (10.1.2), chapter 4
350971.1 – Troubleshouting guide for Font Aliasing / Font Subsetting / Font Embedding Issues.
272063.1 – Using Reports PDF Subsetting, Font Size and Styles bold, Italic, Bold-Italic Are Ignored
203781.1 – Rep-1352 while running Reports deployed on the Web.
223949.1 – How to Configure Reports to Generate PDF with Eastern European National Characters.
I would like to Thank you very much for the lovely article , I searched alot over the web but didnt get the solution like you explained.
i need some clarification. Should we rename both .AFM and .TTF files same e.g.
Univers-Medium.TTF and Univers-Medium.AFM
Univers-MediumItalic.TTF and Univers-MediumItalic.AFM
Univers-Bold.TTF and Univers-Bold.AFM
waiting for your prompt reply.
Ugh, this is a post from 11 years ago… This is quite a tricky configuration, all kind of tiny things can go wrong: binary transfer of the AFM files, Carriage-return in files, wrong ppd file inclusion (or typo), or some configuration in the AFM-file. Most obvious is the REPORTS_PATH. Don’t know your configuration at the moment, but if it helps I can take a look at some configuration files, however it’s been a looong time ago. See also my other answer.
Hi Sohail, did some digging. In your ppd-file the AFM-file is mentioned, and that must be a file apparently without the extension AFM. See also note 356221.1:
In this example mentioned:
“Rename the files with the name “FontName” property as follows :
* mv AAJAX.TTF.afm AajaxSurrealFreak
* mv AAJAX.TTF.pfa AajaxSurrealFreak.pfa
o Copy/ftp the afm file “AajaxSurrealFreak” to the AFM directory on
linux/unix (“Caution: This is an ASCII file”). The AFM directory by
default is “$ORACLE_HOME/guicommon/tk/admin/AFM”