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