Changeset f570280


Ignore:
Timestamp:
05/16/2005 12:19:15 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
8dbc61f2
Parents:
46daaa1
Message:

Tagged fop.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4294 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pst/ps/fop.xml

    r46daaa1 rf570280  
    1818
    1919<sect1 id="fop" xreflabel="FOP-&fop-version;">
    20 <sect1info>
    21 <othername>$LastChangedBy$</othername>
    22 <date>$Date$</date>
    23 </sect1info>
    24 <?dbhtml filename="fop.html"?>
    25 <title><application><acronym>FOP</acronym></application>-&fop-version;</title>
    26 <indexterm zone="fop">
    27 <primary sortas="a-FOP">FOP</primary></indexterm>
    28 
    29 <sect2>
    30 <title>Introduction to <application><acronym>FOP</acronym></application></title>
    31 
    32 <para>The <application><acronym>FOP</acronym></application> (Formatting
    33 Objects Processor) package contains a print formatter driven by
    34 <acronym>XSL</acronym> formatting objects
    35 (<acronym>XSL</acronym>-<acronym>FO</acronym>). It is a
    36 <application>Java</application> application that reads a formatting object
    37 tree and renders the resulting pages to a specified output. Output formats
    38 currently supported include <acronym>PDF</acronym>, <acronym>PCL</acronym>,
    39 PostScript, <acronym>SVG</acronym>, <acronym>XML</acronym> (area tree
    40 representation), print, <acronym>AWT</acronym>, <acronym>MIF</acronym> and
    41 <acronym>ASCII</acronym> text. The primary output target is
    42 <acronym>PDF</acronym>.</para>
    43 
    44 <sect3><title>Package information</title>
    45 <itemizedlist spacing="compact">
    46 <listitem><para>Download (HTTP):
    47 <ulink url="&fop-download-http;"/></para></listitem>
    48 <listitem><para>Download (FTP):
    49 <ulink url="&fop-download-ftp;"/></para></listitem>
    50 <listitem><para>Download MD5 sum:
    51 &fop-md5sum;</para></listitem>
    52 <listitem><para>Download size:
    53 &fop-size;</para></listitem>
    54 <listitem><para>Estimated disk space required:
    55 &fop-buildsize;</para></listitem>
    56 <listitem><para>Estimated build time:
    57 &fop-time;</para></listitem></itemizedlist>
    58 </sect3>
    59 
    60 <sect3><title>Additional downloads</title>
    61 <sect4><title>Required package</title>
    62 <itemizedlist spacing="compact">
    63 <listitem><para><application>Java</application> Advanced Imaging
    64 (<acronym>JAI</acronym>) <acronym>API</acronym> components:
    65 <ulink url="&jai-download;">
    66 http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;</ulink>
    67 <ulink url="&jai-download;">
    68 PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg</ulink>
    69 </para></listitem>
    70 <listitem><para>Download MD5 sum: &jai-md5sum;</para></listitem>
    71 <listitem><para>Download size: &jai-size;</para></listitem>
    72 </itemizedlist>
    73 
    74 <para>Choose the <quote><application>Linux</application>
    75 <application><acronym>JDK</acronym></application> Install</quote> file after
    76 accepting the license agreement.</para>
    77 </sect4>
    78 
    79 <sect4><title>Required patch</title>
    80 <itemizedlist spacing='compact'>
    81 <listitem><para><ulink
    82 url="&patch-root;/fop_&fop-version;-jdk_&jdk-src-version;-1.patch"/></para>
    83 </listitem>
    84 </itemizedlist>
    85 </sect4>
    86 </sect3>
    87 
    88 <sect3><title><application>FOP</application> dependencies</title>
    89 <sect4><title>Required</title>
    90 <para><xref linkend="jdk"/></para>
    91 </sect4>
    92 
    93 <sect4><title>Optional</title>
    94 <para><xref linkend="libxslt"/>,
    95 <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
    96 <ulink url="http://xml.apache.org/batik/">Batik</ulink> and
    97 <ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
    98 the documentation)</para>
    99 </sect4>
    100 </sect3>
    101 
    102 </sect2>
    103 
    104 <sect2>
    105 <title>Installation of <application>FOP</application></title>
    106 
    107 <note><para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
    108 the build.</para></note>
    109 
    110 <para>Some versions of tar will display a message similar to
    111 <quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
    112 when unpacking the source tarball. You may safely ignore this message.</para>
    113 
    114 <sect3><title>Installing <acronym>JAI</acronym></title>
    115 <para>Install the <acronym>JAI</acronym> components by running the following
    116 commands as the root user while in the root of the
    117 <application><acronym>FOP</acronym></application> source tree:</para>
    118 
    119 <screen><userinput role='root'><command>chmod 755 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
     20  <?dbhtml filename="fop.html"?>
     21
     22  <sect1info>
     23    <othername>$LastChangedBy$</othername>
     24    <date>$Date$</date>
     25  </sect1info>
     26
     27  <title>FOP-&fop-version;</title>
     28
     29  <indexterm zone="fop">
     30    <primary sortas="a-FOP">FOP</primary>
     31  </indexterm>
     32
     33  <sect2 role="package">
     34    <title>Introduction to FOP</title>
     35
     36    <para>The <application>FOP</application> (Formatting Objects Processor)
     37    package contains a print formatter driven by XSL formatting objects
     38    (XSL-FO). It is a <application>Java</application> application that reads
     39    a formatting object tree and renders the resulting pages to a specified
     40    output. Output formats currently supported include PDF, PCL, PostScript,
     41    SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
     42    primary output target is PDF.</para>
     43
     44    <bridgehead renderas="sect3">Package Information</bridgehead>
     45    <itemizedlist spacing="compact">
     46      <listitem>
     47        <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
     48      </listitem>
     49      <listitem>
     50        <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
     51      </listitem>
     52      <listitem>
     53        <para>Download MD5 sum: &fop-md5sum;</para>
     54      </listitem>
     55      <listitem>
     56        <para>Download size: &fop-size;</para>
     57      </listitem>
     58      <listitem>
     59        <para>Estimated disk space required: &fop-buildsize;</para>
     60      </listitem>
     61      <listitem>
     62        <para>Estimated build time: &fop-time;</para>
     63      </listitem>
     64    </itemizedlist>
     65
     66    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
     67
     68    <itemizedlist spacing="compact">
     69      <title>Required package</title>
     70      <listitem>
     71        <para><application>Java</application> Advanced Imaging (JAI) API
     72        components: <ulink url="&jai-download;">
     73        http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;</ulink>
     74        <ulink url="&jai-download;">
     75        PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg</ulink>
     76        </para>
     77      </listitem>
     78      <listitem>
     79        <para>Download MD5 sum: &jai-md5sum;</para>
     80      </listitem>
     81      <listitem>
     82        <para>Download size: &jai-size;</para>
     83      </listitem>
     84    </itemizedlist>
     85
     86    <para>Choose the <quote><application>Linux</application>
     87    <application>JDK</application> Install</quote> file after
     88    accepting the license agreement.</para>
     89
     90    <itemizedlist spacing='compact'>
     91      <title>Required patch</title>
     92      <listitem>
     93        <para><ulink
     94        url="&patch-root;/fop_&fop-version;-jdk_&jdk-src-version;-1.patch"/></para>
     95      </listitem>
     96    </itemizedlist>
     97
     98    <bridgehead renderas="sect3">FOP Dependencies</bridgehead>
     99
     100    <bridgehead renderas="sect4">Required</bridgehead>
     101    <para><xref linkend="jdk"/></para>
     102
     103    <bridgehead renderas="sect4">Optional</bridgehead>
     104    <para><xref linkend="libxslt"/>,
     105    <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
     106    <ulink url="http://xml.apache.org/batik/">Batik</ulink> and
     107    <ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
     108    the documentation)</para>
     109
     110  </sect2>
     111
     112  <sect2 role="installation">
     113    <title>Installation of FOP</title>
     114
     115    <note>
     116      <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
     117      the build.</para>
     118    </note>
     119
     120    <para>Some versions of tar will display a message similar to
     121    <quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
     122    when unpacking the source tarball. You may safely ignore this message.</para>
     123
     124    <sect3>
     125      <title>Installing JAI</title>
     126
     127      <para>Install the JAI components by running the following commands as
     128      the <systemitem class="username">root</systemitem> user while in the
     129      root of the <application>FOP</application> source tree:</para>
     130
     131<screen role="root"><userinput>chmod 755 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
    120132FOP_BUILD_DIR=$(pwd) &amp;&amp;
    121133cd $JAVA_HOME &amp;&amp;
    122134yes | $FOP_BUILD_DIR/../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
    123 cd $FOP_BUILD_DIR</command></userinput></screen>
    124 </sect3>
    125 
    126 <sect3><title>Installing <application><acronym>FOP</acronym></application>
    127 required components</title>
    128 <para>Install <application><acronym>FOP</acronym></application> by running the
    129 following commands:</para>
    130 
    131 <screen><userinput><command>patch -Np1 -i ../fop_&fop-version;-jdk_&jdk-src-version;-1.patch &amp;&amp;
     135cd $FOP_BUILD_DIR</userinput></screen>
     136
     137    </sect3>
     138
     139    <sect3>
     140      <title>Installing FOP required components</title>
     141
     142      <para>Install <application>FOP</application> by running the
     143      following commands:</para>
     144
     145<screen><userinput>patch -Np1 -i ../fop_&fop-version;-jdk_&jdk-src-version;-1.patch &amp;&amp;
    132146./build.sh &amp;&amp;
    133 sed -i -e "s/build/lib/" fop.sh</command></userinput></screen>
    134 
    135 <para>Now, as the root user:</para>
    136 
    137 <screen><userinput role='root'><command>install -v -d -m755 \
     147sed -i -e "s/build/lib/" fop.sh</userinput></screen>
     148
     149      <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
     150
     151<screen role="root"><userinput>install -v -d -m755 \
    138152    /opt/fop-&fop-version;/{bin,lib,docs/{general,lib,site}} &amp;&amp;
    139153install -v -m755 fop.sh /opt/fop-&fop-version;/bin &amp;&amp;
     
    146160    /opt/fop-&fop-version;/docs/lib &amp;&amp;
    147161cp -v -R build/site/* /opt/fop-&fop-version;/docs/site &amp;&amp;
    148 ln -svf fop-&fop-version; /opt/fop</command></userinput></screen>
    149 </sect3>
    150 
    151 <sect3><title>Installing the <application>Batik</application>
    152 <acronym>JAR</acronym></title>
    153 <para>You'll need to install one additional <application>Java</application>
    154 class library to process <acronym>SVG</acronym> objects. This library is part
    155 of the <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
    156 also included with the <application><acronym>FOP</acronym></application>
    157 package. If you have <application>Batik</application> installed, ensure the
    158 <filename>batik.jar</filename> library is included in your
    159 <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
    160 symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
    161 pointing to the full path of the installed <filename>batik.jar</filename>
    162 file so that the <command>fop.sh</command> script will automatically pick it
    163 up.</para>
    164 
    165 <para>If you don't have the <application>Batik</application> package installed,
    166 run the following commands as the root user:</para>
    167 
    168 <screen><userinput role='root'><command>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
     162ln -svf fop-&fop-version; /opt/fop</userinput></screen>
     163
     164    </sect3>
     165
     166    <sect3>
     167      <title>Installing the Batik JAR</title>
     168
     169      <para>You'll need to install one additional <application>Java</application>
     170      class library to process SVG objects. This library is part of the
     171      <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
     172      also included with the <application>FOP</application> package. If you
     173      have <application>Batik</application> installed, ensure the
     174      <filename>batik.jar</filename> library is included in your
     175      <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
     176      symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
     177      pointing to the full path of the installed <filename>batik.jar</filename>
     178      file so that the <command>fop.sh</command> script will automatically pick it
     179      up.</para>
     180
     181      <para>If you don't have the <application>Batik</application> package
     182      installed, run the following commands as the <systemitem
     183      class="username">root</systemitem> user:</para>
     184
     185<screen role="root"><userinput>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
    169186install -v -m644 lib/batik.LICENSE.txt \
    170     /opt/fop-&fop-version;/docs/lib</command></userinput></screen>
    171 </sect3>
    172 
    173 <sect3><title>Installing the <application>Xalan-Java</application>
    174 components</title>
    175 <para>The components of <application><acronym>FOP</acronym></application>
    176 required to process <acronym>FO</acronym> files created by an
    177 <acronym>XSL</acronym> transformation engine (also known as an
    178 <acronym>XSLT</acronym> processor) is now complete. An
    179 <acronym>XSL</acronym> transformation engine (<command>xsltproc</command>)
    180 is included with the <xref linkend="libxslt"/> package in
    181 <acronym>BLFS</acronym>. The <application><acronym>FOP</acronym></application>
    182 package includes components of
    183 <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to accomplish
    184 <acronym>XSL</acronym> transformations. If you have the
    185 <application>Xalan-Java</application> package installed, skip to the next
    186 section.</para>
    187 
    188 <para>If you wish to install the <application>Xalan-Java</application>
    189 components provided by the <application><acronym>FOP</acronym></application>
    190 package, run the following commands as the root user:</para>
    191 
    192 <screen><userinput role='root'><command>sed -i -e "s/build/lib/" xalan.sh &amp;&amp;
     187    /opt/fop-&fop-version;/docs/lib</userinput></screen>
     188
     189    </sect3>
     190
     191    <sect3>
     192      <title>Installing the Xalan-Java components</title>
     193
     194      <para>The components of <application>FOP</application> required to
     195      process FO files created by an XSL transformation engine (also known
     196      as an XSLT processor) is now complete. An XSL transformation engine
     197      (<command>xsltproc</command>) is included with the
     198      <xref linkend="libxslt"/> package in BLFS. The
     199      <application>FOP</application> package includes components of
     200      <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to
     201      accomplish XSL transformations. If you have the
     202      <application>Xalan-Java</application> package installed, skip to
     203      the next section.</para>
     204
     205      <para>If you wish to install the <application>Xalan-Java</application>
     206      components provided by the <application>FOP</application>
     207      package, run the following commands as the <systemitem
     208      class="username">root</systemitem> user:</para>
     209
     210<screen role="root"><userinput>sed -i -e "s/build/lib/" xalan.sh &amp;&amp;
    193211install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
    194212install -v -m644 lib/xml-apis.jar \
     
    198216install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
    199217                 lib/xml-apis.README.txt \
    200     /opt/fop-&fop-version;/docs/lib</command></userinput></screen>
    201 </sect3>
    202 
    203 <sect3><title>Installing the
    204 <application>Jimi <acronym>SDK</acronym></application>
    205 <acronym>JAR</acronym></title>
    206 <para>If you installed the Java Image I/O class library
    207 (<application>Jimi <acronym>SDK</acronym></application>) into the
    208 <application><acronym>FOP</acronym></application> source tree
    209 <filename class='directory'>lib</filename> directory before building
    210 <application><acronym>FOP</acronym></application> (this will enable Jimi
    211 support), ensure you also install this <acronym>JAR</acronym> file into
    212 <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
    213 </sect3>
    214 
    215 </sect2>
    216 
    217 <sect2>
    218 <title>Command explanations</title>
    219 
    220 <para><command>yes | $FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This command
    221 installs the <application><acronym>JAI</acronym></application> components
    222 into the <application><acronym>JDK</acronym></application> file structure. The
    223 <command>yes</command> command is piped through so that you don't have to
    224 scroll through four pages of the license agreement and automatically responds
    225 <quote>yes</quote> to the agreement. <envar>$FOP_BUILD_DIR</envar> is used as
    226 a reference point to the source executable and as a method to return back to
    227 the <application><acronym>FOP</acronym></application> source tree.</para>
    228 
    229 <para><command>sed -i -e "s/build/lib/" ...</command>: These commands modify
    230 the installed shell scripts so that the location of the installed
    231 <filename>fop.jar</filename> file is correctly identified.</para>
    232 
    233 <para><command>install -v ...; cp -v ...</command>: There is no installation
    234 script provided by the <application><acronym>FOP</acronym></application>
    235 package. These commands install the package.</para>
    236 
    237 <para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
    238 convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
    239 changed each time there's a package version change.</para>
    240 </sect2>
    241 
    242 <sect2>
    243 <title>Configuring <application>FOP</application></title>
    244 
    245 <sect3 id="fop-config"><title>Config files</title>
    246 <para><filename>~/.foprc</filename></para>
    247 <indexterm zone="fop fop-config">
    248 <primary sortas="e-AA.foprc">~/.foprc</primary></indexterm>
    249 </sect3>
    250 
    251 <sect3><title>Configuration Information</title>
    252 
    253 <para>Using <application><acronym>FOP</acronym></application> to process some
    254 large <acronym>FO</acronym>'s (including the <acronym>FO</acronym> derived from
    255 the <acronym>BLFS</acronym> <acronym>XML</acronym> sources), can lead to memory
    256 errors. Unless you add a parameter to the <command>java</command> command used
    257 in the <command>fop.sh</command> script you may receive messages similar to the
    258 one shown below:</para>
    259 
    260 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
    261 Java heap space</computeroutput></para>
    262 
    263 <para>To avoid errors like this, you need to pass an extra parameter to the
    264 <command>java</command> command used in the <command>fop.sh</command> script.
    265 This can be accomplished by creating a <filename>~/.foprc</filename> (which
    266 is sourced by the <command>fop.sh</command> script) and adding the parameter
    267 to the <envar>FOP_OPTS</envar> environment variable.</para>
    268 
    269 <para>The <command>fop.sh</command> script looks for a <envar>FOP_HOME</envar>
    270 environment variable to locate the
    271 <application><acronym>FOP</acronym></application> class libraries. You can
    272 create this variable using the <filename>~/.foprc</filename> file as
    273 well. Create a <filename>~/.foprc</filename> file using the following
    274 commands:</para>
    275 
    276 <screen><userinput><command>cat &gt; ~/.foprc &lt;&lt; "EOF"</command>
    277 FOP_OPTS="-Xmx<replaceable>[RAM_Installed]</replaceable>m"
    278 FOP_HOME="/opt/fop"
    279 
    280 <command>EOF</command></userinput></screen>
    281 
    282 <para>Replace <replaceable>[RAM_Installed]</replaceable> with a number
    283 representing the amount of RAM installed in your computer. An example would
    284 be <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
    285 memory issues running <application><acronym>FOP</acronym></application>, see
    286 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
    287 
    288 <para>To include the <command>fop.sh</command> script in your path, update
    289 your personal or system-wide profile with the following:</para>
    290 
    291 <screen><userinput>PATH=$PATH:/opt/fop/bin</userinput></screen>
    292 </sect3>
    293 
    294 </sect2>
    295 
    296 <sect2>
    297 <title>Contents</title>
    298 
    299 <segmentedlist>
    300 <segtitle>Installed Programs</segtitle>
    301 <segtitle>Installed Libraries</segtitle>
    302 <segtitle>Installed Directory</segtitle>
    303 <seglistitem>
    304 <seg>fop.sh and xalan.sh</seg>
    305 <seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar, xalan-2.4.1.jar,
    306 xercesImpl-2.2.1.jar and xml-apis.jar. <acronym>JAI</acronym> components
    307 include libmlib_jai.so, jai_codec.jar, jai_core.jar and
    308 mlibwrapper_jai.jar</seg>
    309 <seg>/opt/fop-&fop-version;</seg>
    310 </seglistitem>
    311 </segmentedlist>
    312 
    313 <variablelist>
    314 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    315 <?dbfo list-presentation="list"?>
    316 
    317 <varlistentry id="fop.sh">
    318 <term><command>fop.sh</command></term>
    319 <listitem><para>is a wrapper script to the <command>java</command> command
    320 which sets up the <application><acronym>FOP</acronym></application>
    321 environment and passes the required parameters.</para>
    322 <indexterm zone="fop fop.sh">
    323 <primary sortas="b-fop.sh">fop.sh</primary></indexterm>
    324 </listitem>
    325 </varlistentry>
    326 
    327 <varlistentry id="fop.jar">
    328 <term><filename class='libraryfile'>fop.jar</filename></term>
    329 <listitem><para>contains all the
    330 <application><acronym>FOP</acronym></application>
    331 <application>Java</application> classes.</para>
    332 <indexterm zone="fop fop.jar">
    333 <primary sortas="c-fop.jar">fop.jar</primary></indexterm>
    334 </listitem>
    335 </varlistentry>
    336 </variablelist>
    337 
    338 </sect2>
     218    /opt/fop-&fop-version;/docs/lib</userinput></screen>
     219
     220    </sect3>
     221
     222    <sect3>
     223      <title>Installing the Jimi SDK JAR</title>
     224
     225      <para>If you installed the Java Image I/O class library
     226      (<application>Jimi SDK</application>) into the
     227      <application>FOP</application> source tree
     228      <filename class='directory'>lib</filename> directory before building
     229      <application>FOP</application> (this will enable Jimi
     230      support), ensure you also install this JAR file into
     231      <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
     232
     233    </sect3>
     234
     235  </sect2>
     236
     237  <sect2 role="commands">
     238    <title>Command Explanations</title>
     239
     240    <para><command>yes | $FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This
     241    command installs the <application>JAI</application> components
     242    into the <application>JDK</application> file structure. The
     243    <command>yes</command> command is piped through so that you don't have to
     244    scroll through four pages of the license agreement and automatically responds
     245    <quote>yes</quote> to the agreement. <envar>$FOP_BUILD_DIR</envar> is used as
     246    a reference point to the source executable and as a method to return back to
     247    the <application>FOP</application> source tree.</para>
     248
     249    <para><command>sed -i -e "s/build/lib/" ...</command>: These commands modify
     250    the installed shell scripts so that the location of the installed
     251    <filename>fop.jar</filename> file is correctly identified.</para>
     252
     253    <para><command>install -v ...; cp -v ...</command>: There is no installation
     254    script provided by the <application>FOP</application>
     255    package. These commands install the package.</para>
     256
     257    <para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
     258    convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
     259    changed each time there's a package version change.</para>
     260
     261  </sect2>
     262
     263  <sect2 role="configuration">
     264    <title>Configuring FOP</title>
     265
     266    <sect3 id="fop-config">
     267      <title>Config Files</title>
     268
     269      <para><filename>~/.foprc</filename></para>
     270
     271      <indexterm zone="fop fop-config">
     272        <primary sortas="e-AA.foprc">~/.foprc</primary>
     273      </indexterm>
     274
     275    </sect3>
     276
     277    <sect3>
     278      <title>Configuration Information</title>
     279
     280      <para>Using <application>FOP</application> to process some large FO's
     281      (including the FO derived from the BLFS XML sources), can lead to memory
     282      errors. Unless you add a parameter to the <command>java</command> command
     283      used in the <command>fop.sh</command> script you may receive messages
     284      similar to the one shown below:</para>
     285
     286      <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
     287      Java heap space</computeroutput></para>
     288
     289      <para>To avoid errors like this, you need to pass an extra parameter to the
     290      <command>java</command> command used in the <command>fop.sh</command> script.
     291      This can be accomplished by creating a <filename>~/.foprc</filename> (which
     292      is sourced by the <command>fop.sh</command> script) and adding the parameter
     293      to the <envar>FOP_OPTS</envar> environment variable.</para>
     294
     295      <para>The <command>fop.sh</command> script looks for a
     296      <envar>FOP_HOME</envar> environment variable to locate the
     297      <application>FOP</application> class libraries. You can create this
     298      variable using the <filename>~/.foprc</filename> file as well. Create
     299      a <filename>~/.foprc</filename> file using the following commands:</para>
     300
     301<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
     302<literal>FOP_OPTS="-Xmx<replaceable>[RAM_Installed]</replaceable>m"
     303FOP_HOME="/opt/fop"</literal>
     304
     305EOF</userinput></screen>
     306
     307      <para>Replace <replaceable>[RAM_Installed]</replaceable> with a number
     308      representing the amount of RAM installed in your computer. An example would
     309      be <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
     310      memory issues running <application>FOP</application>, see
     311      <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
     312
     313      <para>To include the <command>fop.sh</command> script in your path, update
     314      your personal or system-wide profile with the following:</para>
     315
     316<screen><literal>PATH=$PATH:/opt/fop/bin</literal></screen>
     317
     318    </sect3>
     319
     320  </sect2>
     321
     322  <sect2 role="content">
     323    <title>Contents</title>
     324
     325    <segmentedlist>
     326      <segtitle>Installed Programs</segtitle>
     327      <segtitle>Installed Libraries</segtitle>
     328      <segtitle>Installed Directory</segtitle>
     329
     330      <seglistitem>
     331        <seg>fop.sh and xalan.sh</seg>
     332        <seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar,
     333        xalan-2.4.1.jar, xercesImpl-2.2.1.jar, and xml-apis.jar. JAI components
     334        include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
     335        mlibwrapper_jai.jar</seg>
     336        <seg>/opt/fop-&fop-version;</seg>
     337      </seglistitem>
     338    </segmentedlist>
     339
     340    <variablelist>
     341      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
     342      <?dbfo list-presentation="list"?>
     343      <?dbhtml list-presentation="table"?>
     344
     345      <varlistentry id="fop.sh">
     346        <term><command>fop.sh</command></term>
     347        <listitem>
     348          <para>is a wrapper script to the <command>java</command> command
     349          which sets up the <application>FOP</application>
     350          environment and passes the required parameters.</para>
     351          <indexterm zone="fop fop.sh">
     352            <primary sortas="b-fop.sh">fop.sh</primary>
     353          </indexterm>
     354        </listitem>
     355      </varlistentry>
     356
     357      <varlistentry id="fop.jar">
     358        <term><filename class='libraryfile'>fop.jar</filename></term>
     359        <listitem>
     360          <para>contains all the <application>FOP</application>
     361          <application>Java</application> classes.</para>
     362          <indexterm zone="fop fop.jar">
     363            <primary sortas="c-fop.jar">fop.jar</primary>
     364          </indexterm>
     365        </listitem>
     366      </varlistentry>
     367
     368    </variablelist>
     369
     370  </sect2>
    339371
    340372</sect1>
    341 
Note: See TracChangeset for help on using the changeset viewer.