Valdis,
there is a property in openbravo web.xml named FopConfig where you can define
the location for the userconfig.xml file for FOP. By default this xml file is
located in webapps/openbravo/WEB-INF/userconfig.xml
Within userconfig.xml file there is a key named fontBaseDir: this key is used
to define where to place any font file required (*.ttf)
Here you can find some info about fonts in FOP.
Hope it helps,
Ismael
-----Mensaje original-----
De: Valdis Vitolinš [mailto:valdis.vitol...@odo.lv]
Enviado el: martes, 09 de febrero de 2010 9:08
Para: Openbravo-development
Asunto: Re: [Openbravo-development] Openbravo and FOP PDF reports with
UTFcharacters
It seems problem is not related to FOP. I added lines to
../webapps/openbravo/WEB-INF/userconfig.xml
<!-- /webapps is symlink to /var/lib/tomcat5.5/webapps/ -->
<font kerning="yes"
embed-url="/webapps/openbravo/WEB-INF/fonts/Courier_New.ttf">
<font-triplet name="Times-Roman" style="normal" weight="normal"/>
</font>
and also changed settings for conf/userconfig.xml file in
../webapps/openbravo/WEB-INF/lib/fop.jar archive.
Then changed
../webapps/openbravo/src-loc/design/org/openbravo/erpReports/RptC_OrderPO.jrxml
file
to use "Times New Roman" fonts, and added "aāeēiīoōuū" for labels.
Noted that font style was not changed, even labels were (with dropped unknown
characters resulting to "aeio").
So, seems these settings/data are dropped somewhere before fop. Any help or
suggestions will be appreciated.
Valdis
I'm trying to teach Openbravo print UTF characters. There are 2 issues:
1. Fonts with UTF characters for FOP (resolved using custom config file and
unicode TTF fonts).
2. Fonts in Openbravo reports and FOP invocation parameters (not solved).
FOP with custom config can be downloaded from http://odo.lv/ftp/temp/FOP.zip
There are FOP jars and "Lucida Sans Unicode" TTF font with generated
metrics file. Metrics can be created using generate_font_metrics.bat script.
Test PDF can be generated with test1.bat script. Though when I run Openbravo
report where all fonts are changed to "Lucida Sans Unicode", UTF characters are
dropped anyway as they seem filtered out as unsupported.
Questions are:
1. How to prepare FOP to handle added custom fonts internally without
custom config file and parameter? Then there is chance, it will work without
changing Openbravo invocation mechanism.
2. How to change Openbravo to pass additional parameters for FOP to use
custom config file. Then it can be solved in different ways:
2a. to use custom config file (I changed ../config/userconfig.xml but it
didn't affect anything).
2b. to generate RTF where UTF fonts are working in place of PDF.
Thanks in advance!
Valdis
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Openbravo-development mailing list
Openbravo-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-development