Monday, June 25, 2007

Adding common MS Windows Fonts to 10g Reports server on UNIX OS

Cross-Platform issues when you develop Reports on Windows AS ,
and deploy it on Linux AS.

Backup the files/direcories before your work with it

$ORACLE_HOME/guicommon/tk/admin/AFM
$ORACLE_HOME/guicommon/tk/admin/TTF
-------------------------------------------------------------------
Modifies the following files:

$ORACLE_HOME/guicommon/tk/admin/uiprint.txt
dummy:PostScript:2:dummy printer for PDF output:default.ppd:
----------------------------------------------------
$ORACLE_HOME/guicommon/tk/admin/uifont.ali
Comment out any font aliases found under the sections [ Global ] , [ Printer:PostScript1 ] and [PDF] e.g.
The order here is important, the plain font alias must be last in the PDF subset list)
[ PDF:Subset ]
Arial..Italic.Bold.. = "arialbi.ttf"
Arial...Bold.. = "arialbd.ttf"
Arial..Italic... = "ariali.ttf"
Arial..... = "arial.ttf"
-----------------------------------------

$ORACLE_HOME/guicommon/tk/admin/PPD/datap462.ppd
*DefaultFont: Arial
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%Font Arial: Standard "(001.004)" Standard ROM
*%Font Arial-Italic: Standard "(001.004)" Standard ROM
*%Font Arial-Bold: Standard "(001.004)" Standard ROM
*%Font Arial-BoldItalic: Standard "(001.004)" Standard ROM
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*Font Arial: Special "(001.001)" Special ROM
*Font Ariali: Special "(001.001)" Special ROM
*Font Arialbd: Special "(001.001)" Special ROM
*Font Arialbi: Special "(001.001)" Special ROM
----------------------------------------------------

screenprinter.ppd
*DefaultFont: Arial
*Font Arial: Standard "(001.001)" Standard ROM
*Font Ariali: Standard "(001.001)" Standard ROM
*Font Arialbd: Standard "(001.001)" Standard ROM
*Font Arialbi: Standard "(001.001)" Standard ROM

---------------------------------------------------
$ORACLE_HOME/bin/reports.sh
make sure you define REPORTS_PATH=$REPORTS_PATH:$ORACLE_HOME/guicommon/tk/admin/TTF; export REPORTS_PATH

RW=$ORACLE_HOME/reports; export RW
#REPORTS_PATH=$REPORTS_PATH:$ORACLE_HOME/guicommon/tk/admin/TTF:$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo:$ORACLE_HOME/reports/integ:$ORACLE_HOME/reports/printers:${REPORTS_PATH}; export REPORTS_PATH
#REPORTS_PATH=$REPORTS_PATH:$ORACLE_HOME/guicommon/tk/admin/TTF; export REPORTS_PATH
#REPORTS_PATH=$ORACLE_HOME/guicommon/tk/admin/TTF; export REPORTS_PATH
REPORTS_PATH=$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo:/home/oracleas/OraHome_1/guicommon/tk/admin/PPD:/home/oracleas/OraHome_1/guicommon/tk/admin/AFM:$REPORTS_PATH:$ORACLE_HOME/guicommon/tk/admin/TTF:$ORACLE_HOME/reports/integ:$ORACLE_HOME/reports/printers:${REPORTS_PATH}; export REPORTS_PATH
REPORTS_TMP=/tmp; export REPORTS_TMP
REPORTS_NO_DUMMY_PRINTER=TRUE; export REPORTS_NO_DUMMY_PRINTER
REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar; export REPORTS_TAGLIB_URI
REPORTS_CLASSPATH=$ORACLE_HOME/reports/jlib/rwbuilder.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/j2ee/home/oc4j.jar:$ORACLE_HOME/j2ee/home/lib/ojsp.jar; export REPORTS_CLASSPATH
#NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
#NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256; export NLS_LANG
NLS_LANG=ARABIC_*.AR8MSWIN1256; export NLS_LANG
## Icon variable for Solaris platform
TK_ICON=$ORACLE_HOME/reports/plugins/resource; export TK_ICON
#PRINTER=fontprinter;export PRINTER
#TK_PRINT_STATUS=echo;export TK_PRINT_STATUS
TK_PRINTER=dummy ; export TK_PRINTER
TK_PRINT_STATUS='echo %n is valid'; export TK_PRINT_STATUS
DEBUG_SLFIND=/tmp/reports.log export DEBUG_SLFIND
#PRINTER=fontprinter;export PRINTER
#TK_PRINT_STATUS=echo;export TK_PRINT_STATUS
REPORTS_PATH=$REPORTS_PATH:$ORACLE_HOME/guicommon/tk/admin/TTF:$ORACLE_HOME/guicommon/tk/admin/TTF;export REPORTS_PATH
#PRINTER=fontprinter;export PRINTER
#TK_PRINT_STATUS=echo;export TK_PRINT_STATUS

--------------------------------------------------------------
In the file datap462.ppd Comment the Symbol font by changing

*Font Symbol: Special "(001.001)" Special ROM
*%Font Symbol: Special "(001.001)" Special ROM

in the $ORACLE_HOME/guicommon/tk/admin/AFM Rename file
rename Symbol to Symbol.afm
--------------------------------------------------------------------------
From the MS Windows machine, ftp (in binary mode) the ttf files for the font styles to the target Unix machine e.g.
Arial fonts
----------------------------------------------------------------------
download ttf2pt1 open source tools
http://sourceforge.net/project/showfiles.php?group_id=4594
----------------------------------------------------------------------------
use the ttf2pt1 open source tools to convert AFM
/downloads/ttf2pt1-3.4.4/ttf2pt1 -l plane+0x06 arial.ttf
repeat this for all arial types will be used in the form

-----------------------------------------------------------------------------------------
place the generated AFM files through the ttf files to the AFM folders under Oracle AS /gui.../tk/admin/AFM
/AFM folder should show this
ls -al Ar*
ArabicTransparent
ArabicTransparent-Bold
Arial
Arialbd
Arialbi
Arial-BoldItalicMT
Arial-BoldMT
Ariali
Arial-ItalicMT
ArialMT
ArialNarrow
ArialNarrow-Bold
ArialNarrow-BoldItalic
ArialNarrow-Italic
------------------------------
/TTF folder should show this
$ls -al ar*
arialbd.ttf
arialbi.ttf
ariali.ttf
arial.ttf
ariblk.ttf
artrbdo.ttf
artro.ttf
-------------------------------------------------------

No comments: