FOP

FOP

cms config

Important settings in conf/config.inc.php

//path to your fop binary, only needed, if you want to produce pdfs
$bx_config['foPath'] = "/sw/bin/fop";
$bx_config['foConfig'] = BX_PROJECT_DIR."conf/fop-config.xml";
$bx_config['cacheDir'] = BX_TEMP_DIR;

sitemap entry

<map:serialize type="fo2pdf" commandline="{config://foPath}">
{panel}
 <map:parameter name="configFile" value="{config://foConfig}"/>
{panel}
</map:serialize>

The rest is as usual

userconf

http://xml.apache.org/fop/configuration.html

Example from one of our projects

<configuration>
<!-- 
  <entry>
    <key>baseDir</key>
    <value></value>
  </entry>
-->
 <entry>
    <key>fontBaseDir</key>
    <value>themes/messerli/fonts/</value>
  </entry>
<fonts>
 <font metrics-file="arial.xml" kerning="yes" embed-file="eu______.ttf">
    <font-triplet name="eurostyle" style="normal" weight="normal"/>
 </font>
 <font metrics-file="arial.xml" kerning="yes" embed-file="eub_____.ttf">
    <font-triplet name="eurostyle" style="normal" weight="bold"/>
 </font>
</fonts>
</configuration>

Generate Font Metrics

General Info

http://xml.apache.org/fop/fonts.html

java -cp /sw/share/java/fop/fop.jar org.apache.fop.fonts.apps.TTFReader eub_____.ttf eub.xml

worked for me on OS X

FOP and Batik on Linux Servers

Before JDK 1.4, you need an X11 instance on the server (urks..)

With JDK 1.4 you can add the option -Djava.awt.headless=true to java

under Linux for example, add to the /usr/bin/fop script

JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

and it should work. For other solutions, see http://koala.ilog.fr/batik/mlists/batik-users/archives/msg02676.html

commandline tools

To import a whole directory structure in the BX_DATA dir, use the following

./bin/fs2db -d data/ -p / -l de,en -ir

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
These projects are supported by Liip AG