To be able to print PDF documents, configure the external processor XSL-FO (XSL formatting objects). This article describes how to configure Apache FOP.
- Connect to the server with the platform via SSH.
-
Specify the parameters for calling the FO processor. Add the following line to the BILLmanager configuration file — /usr/local/mgr5/etc/billmgr.conf:
billmgr.confXSLFOProc fop -c /etc/fop.conf.d/userconfig.xml -xml __xml__ -xsl __xsl__ -pdf __pdf__
Parameters in double underscores ("__xml__", "__xsl__" and "__pdf__") will automatically be replaced with the directories of the corresponding files.
Click here to expand... -
Upload the font file into the /etc/fop.conf.d/fonts/fonts/ directory.
The font used for the example is Arial.Once the file is posted, generate the metrics file:
/etc/fop.conf.d/fonts/fop-ttfreader /etc/fop.conf.d/fonts/arial.ttf /etc/fop.conf.d/fonts/arial.xml
-
Register the font you are using. The FOP configuration file is used to register fonts: /etc/fop.conf.d/userconfig.xml. If such a file does not exist, create it manually.
The contents of the FOP configuration file in which the Arial font is registered:userconfig.xml'<?xml version="1.0"?> <fop> <renderers> <renderer mime="application/pdf"> <fonts> <font metrics-url="/etc/fop.conf.d/fonts/arial.xml" kerning="yes" embed-url="/etc/fop.conf.d/fonts/arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> <font-triplet name="ArialMT" style="normal" weight="normal"/> </font> </fonts> </renderer> </renderers> </fop>
- Restart BILLmanager:
/usr/local/mgr5/sbin/mgrctl -m billmgr exit