[634c636c] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[634c636c] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[d0151ee] | 7 | <!ENTITY fop-download-http "http://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
|
---|
[75d53372] | 8 | <!ENTITY fop-download-ftp " ">
|
---|
[48bd327] | 9 | <!ENTITY fop-md5sum "95dcc4c2dd08b4bc88ce9ce1ee88c439">
|
---|
| 10 | <!ENTITY fop-size "16.1 MB">
|
---|
| 11 | <!ENTITY fop-buildsize "360 MB">
|
---|
| 12 | <!ENTITY fop-time "2.8 SBU">
|
---|
[460e986] | 13 |
|
---|
[50cc5ad] | 14 | <!ENTITY jai-version "1_1_3">
|
---|
[75d53372] | 15 | <!ENTITY jai-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-i586.tar.gz">
|
---|
| 16 | <!ENTITY jai-md5sum "a2cbc155ef3899bcde9c74a8035764b3">
|
---|
[50cc5ad] | 17 | <!ENTITY jai-size "3.4 MB">
|
---|
[492000e] | 18 |
|
---|
[75d53372] | 19 | <!ENTITY jai64-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-amd64.tar.gz">
|
---|
| 20 | <!ENTITY jai64-md5sum "4a906db35612f668aeef2c0606d7075b">
|
---|
| 21 | <!ENTITY jai64-size "3.4 MB">
|
---|
| 22 |
|
---|
[48bd327] | 23 | <!ENTITY offo-download "&sourceforge-repo;/offo/offo-hyphenation_v2.0.zip">
|
---|
| 24 | <!ENTITY offo-md5sum "a78171d47c9af223c51bbd42df36f26d">
|
---|
| 25 | <!ENTITY offo-size "858 KB">
|
---|
[634c636c] | 26 | ]>
|
---|
| 27 |
|
---|
[75d53372] | 28 | <sect1 id="fop" xreflabel="fop-&fop-version;">
|
---|
[f570280] | 29 | <?dbhtml filename="fop.html"?>
|
---|
| 30 |
|
---|
| 31 | <sect1info>
|
---|
| 32 | <othername>$LastChangedBy$</othername>
|
---|
| 33 | <date>$Date$</date>
|
---|
| 34 | </sect1info>
|
---|
| 35 |
|
---|
[75d53372] | 36 | <title>fop-&fop-version;</title>
|
---|
[f570280] | 37 |
|
---|
| 38 | <indexterm zone="fop">
|
---|
[75d53372] | 39 | <primary sortas="a-fop">fop</primary>
|
---|
[f570280] | 40 | </indexterm>
|
---|
| 41 |
|
---|
| 42 | <sect2 role="package">
|
---|
[75d53372] | 43 | <title>Introduction to fop</title>
|
---|
[f570280] | 44 |
|
---|
| 45 | <para>The <application>FOP</application> (Formatting Objects Processor)
|
---|
| 46 | package contains a print formatter driven by XSL formatting objects
|
---|
| 47 | (XSL-FO). It is a <application>Java</application> application that reads
|
---|
| 48 | a formatting object tree and renders the resulting pages to a specified
|
---|
| 49 | output. Output formats currently supported include PDF, PCL, PostScript,
|
---|
| 50 | SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
|
---|
| 51 | primary output target is PDF.</para>
|
---|
| 52 |
|
---|
[75d53372] | 53 | &lfs70_checked;
|
---|
[50929e8] | 54 |
|
---|
[f570280] | 55 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 56 | <itemizedlist spacing="compact">
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Download MD5 sum: &fop-md5sum;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Download size: &fop-size;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>Estimated disk space required: &fop-buildsize;</para>
|
---|
| 71 | </listitem>
|
---|
| 72 | <listitem>
|
---|
| 73 | <para>Estimated build time: &fop-time;</para>
|
---|
| 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
| 76 |
|
---|
| 77 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 78 |
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
[492000e] | 80 | <title>Required packages</title>
|
---|
[f570280] | 81 | <listitem>
|
---|
[492000e] | 82 | <para>Objects for Formatting Objects (OFFO) hyphenation patterns:
|
---|
| 83 | <simplelist>
|
---|
| 84 | <member><ulink url="&offo-download;"/></member>
|
---|
| 85 | <member>&offo-md5sum;</member>
|
---|
| 86 | <member>&offo-size;</member>
|
---|
| 87 | </simplelist>
|
---|
[f570280] | 88 | </para>
|
---|
| 89 | </listitem>
|
---|
| 90 | <listitem>
|
---|
[75d53372] | 91 | <para>Java Advanced Imaging (JAI) API components (architecture dependent):
|
---|
[492000e] | 92 | <simplelist>
|
---|
[50cc5ad] | 93 | <member><ulink url="&jai-download;"/></member>
|
---|
[492000e] | 94 | <member>&jai-md5sum;</member>
|
---|
| 95 | <member>&jai-size;</member>
|
---|
| 96 | </simplelist>
|
---|
[75d53372] | 97 | <simplelist>
|
---|
| 98 | <member><ulink url="&jai64-download;"/></member>
|
---|
| 99 | <member>&jai64-md5sum;</member>
|
---|
| 100 | <member>&jai64-size;</member>
|
---|
| 101 | </simplelist>
|
---|
[492000e] | 102 | </para>
|
---|
[f570280] | 103 | </listitem>
|
---|
| 104 | </itemizedlist>
|
---|
| 105 |
|
---|
[75d53372] | 106 | <bridgehead renderas="sect3">fop Dependencies</bridgehead>
|
---|
[f570280] | 107 |
|
---|
| 108 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[75d53372] | 109 | <para role="required">
|
---|
| 110 | <xref linkend="xorg7"/> and
|
---|
| 111 | <xref linkend="apache-ant"/>
|
---|
| 112 | </para>
|
---|
[f570280] | 113 |
|
---|
| 114 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[75d53372] | 115 | <para role="optional">
|
---|
| 116 | <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
|
---|
| 117 | <ulink url="http://xmlunit.sourceforge.net/">XMLUnit</ulink>,
|
---|
| 118 | <ulink url="https://jai-imageio.dev.java.net/">JAI Image I/O Tools</ulink>,
|
---|
| 119 | <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>,
|
---|
| 120 | <ulink url="http://pmd.sourceforge.net">PMD</ulink>
|
---|
| 121 | (requires <ulink url="http://jaxen.codehaus.org/">Jaxen</ulink>), and
|
---|
| 122 | <ulink url="http://forrest.apache.org/">Forrest</ulink> (Forrest used only
|
---|
| 123 | to rebuild the documentation)
|
---|
| 124 | </para>
|
---|
[f570280] | 125 |
|
---|
[977061b0] | 126 | <para condition="html" role="usernotes">User Notes:
|
---|
| 127 | <ulink url="&blfs-wiki;/fop"/></para>
|
---|
| 128 |
|
---|
[f570280] | 129 | </sect2>
|
---|
| 130 |
|
---|
| 131 | <sect2 role="installation">
|
---|
[75d53372] | 132 | <title>Installation of fop</title>
|
---|
[f570280] | 133 |
|
---|
[48bd327] | 134 | <important>
|
---|
| 135 | <para>You must run this installation from an X-window using a GL-aware
|
---|
| 136 | <application>Xorg</application> server or some of the
|
---|
[75d53372] | 137 | <application>JUnit</application> tests will hang.</para>
|
---|
[48bd327] | 138 | </important>
|
---|
[8159f350] | 139 |
|
---|
[492000e] | 140 | <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
|
---|
| 141 | the build. To build the <application>JIMI SDK</application> and/or
|
---|
| 142 | <application>XMLUnit</application> extension classes, ensure the
|
---|
[75d53372] | 143 | corresponding <filename class='extension'>.jar</filename> files can be
|
---|
| 144 | found via the <envar>CLASSPATH</envar> environment variable.</para>
|
---|
[f570280] | 145 |
|
---|
[492000e] | 146 | <sect3>
|
---|
| 147 | <title>Installing OFFO Hyphenation Patterns</title>
|
---|
| 148 |
|
---|
[75d53372] | 149 | <para>First, unpack the <application>fop</application> source tarball and
|
---|
| 150 | the hyphenation zipfile from the same directory, then change directories
|
---|
| 151 | into the root of the <application>fop</application> source tree. Copy the
|
---|
| 152 | XML hyphenation patterns into the <application>fop</application> source
|
---|
| 153 | tree by running the following commands:</para>
|
---|
[492000e] | 154 |
|
---|
| 155 | <screen><userinput>cp ../offo-hyphenation/hyph/* hyph &&
|
---|
| 156 | rm -rf ../offo-hyphenation</userinput></screen>
|
---|
| 157 |
|
---|
| 158 | </sect3>
|
---|
[f570280] | 159 |
|
---|
| 160 | <sect3>
|
---|
[75d53372] | 161 | <title>Installing Java Advanced Imaging (JAI) API components</title>
|
---|
| 162 |
|
---|
| 163 | <para>Next install the JAI API components. As the <systemitem
|
---|
| 164 | class="username">root</systemitem> user:</para>
|
---|
| 165 |
|
---|
| 166 | <screen><userinput>case `uname -m` in
|
---|
| 167 | i?86)
|
---|
| 168 | tar -xf ../jai-&jai-version;-lib-linux-i586.tar.gz
|
---|
| 169 | cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
|
---|
| 170 | cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/i386/
|
---|
| 171 | ;;
|
---|
| 172 |
|
---|
| 173 | x86_64)
|
---|
| 174 | tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
|
---|
| 175 | cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
|
---|
| 176 | cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/amd64/
|
---|
| 177 | ;;
|
---|
| 178 | esac</userinput></screen>
|
---|
[634c636c] | 179 |
|
---|
[f570280] | 180 | </sect3>
|
---|
[634c636c] | 181 |
|
---|
[f570280] | 182 | <sect3>
|
---|
[75d53372] | 183 | <title>Installing fop Components</title>
|
---|
[f570280] | 184 |
|
---|
[48bd327] | 185 | <para>If <application>Forrest</application> is not installed, remove
|
---|
[50cc5ad] | 186 | a reference to it in the build.xml:</para>
|
---|
[48bd327] | 187 |
|
---|
[50cc5ad] | 188 | <screen><userinput>sed -i -e "s/all,javadocs,docs/all,javadocs/" \
|
---|
[48bd327] | 189 | -e '\#${dist.bin.result.dir}/docs#,\#</copy>#d' build.xml</userinput></screen>
|
---|
[50cc5ad] | 190 |
|
---|
[75d53372] | 191 | <para>Compile <application>fop</application> by running the
|
---|
[f570280] | 192 | following commands:</para>
|
---|
| 193 |
|
---|
[50cc5ad] | 194 | <screen><userinput>ant dist</userinput></screen>
|
---|
[492000e] | 195 |
|
---|
| 196 | <para>The unit regression tests were performed in the build step
|
---|
| 197 | above.</para>
|
---|
[d260aaf4] | 198 |
|
---|
[48bd327] | 199 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
| 200 | user:</para>
|
---|
[d260aaf4] | 201 |
|
---|
[48bd327] | 202 | <screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &&
|
---|
| 203 | mv -v dist-bin/fop-&fop-version;/* /opt/fop-&fop-version; &&
|
---|
[492000e] | 204 | ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
|
---|
[f570280] | 205 |
|
---|
| 206 | </sect3>
|
---|
| 207 |
|
---|
| 208 | </sect2>
|
---|
[634c636c] | 209 |
|
---|
[f570280] | 210 | <sect2 role="commands">
|
---|
| 211 | <title>Command Explanations</title>
|
---|
| 212 |
|
---|
[48bd327] | 213 | <para><command>ant dist</command>: This reads the
|
---|
| 214 | <filename>build.xml</filename> file's <option>dist</option> target,
|
---|
| 215 | builds the package and runs the unit regression tests. It also creates the
|
---|
| 216 | Java API documentation and a directory where the newly created binaries
|
---|
[75d53372] | 217 | are placed. This directory is used to install <application>fop</application>
|
---|
[48bd327] | 218 | into its final place.</para>
|
---|
[f570280] | 219 |
|
---|
[492000e] | 220 | <para><command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
|
---|
| 221 | optional and creates a convenience symlink so that <envar>$FOP_HOME</envar>
|
---|
| 222 | doesn't have to be changed each time there's a package version change.</para>
|
---|
[f570280] | 223 |
|
---|
| 224 | </sect2>
|
---|
| 225 |
|
---|
| 226 | <sect2 role="configuration">
|
---|
[75d53372] | 227 | <title>Configuring fop</title>
|
---|
[f570280] | 228 |
|
---|
| 229 | <sect3 id="fop-config">
|
---|
| 230 | <title>Config Files</title>
|
---|
| 231 |
|
---|
| 232 | <para><filename>~/.foprc</filename></para>
|
---|
| 233 |
|
---|
| 234 | <indexterm zone="fop fop-config">
|
---|
| 235 | <primary sortas="e-AA.foprc">~/.foprc</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 |
|
---|
| 238 | </sect3>
|
---|
| 239 |
|
---|
| 240 | <sect3>
|
---|
| 241 | <title>Configuration Information</title>
|
---|
| 242 |
|
---|
[75d53372] | 243 | <para>Using <application>fop</application> to process some large FO's
|
---|
[f570280] | 244 | (including the FO derived from the BLFS XML sources), can lead to memory
|
---|
| 245 | errors. Unless you add a parameter to the <command>java</command> command
|
---|
[492000e] | 246 | used in the <command>fop</command> script you may receive messages
|
---|
[f570280] | 247 | similar to the one shown below:</para>
|
---|
| 248 |
|
---|
| 249 | <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
|
---|
| 250 | Java heap space</computeroutput></para>
|
---|
| 251 |
|
---|
[977061b0] | 252 | <para>To avoid errors like this, you need to pass an extra parameter to
|
---|
[492000e] | 253 | the <command>java</command> command used in the <command>fop</command>
|
---|
[977061b0] | 254 | script. This can be accomplished by creating a
|
---|
| 255 | <filename>~/.foprc</filename> (which is sourced by the
|
---|
[492000e] | 256 | <command>fop</command> script) and adding the parameter to the
|
---|
[977061b0] | 257 | <envar>FOP_OPTS</envar> environment variable.</para>
|
---|
[f570280] | 258 |
|
---|
[492000e] | 259 | <para>The <command>fop</command> script looks for a
|
---|
[f570280] | 260 | <envar>FOP_HOME</envar> environment variable to locate the
|
---|
[75d53372] | 261 | <application>fop</application> class libraries. You can create this
|
---|
[f570280] | 262 | variable using the <filename>~/.foprc</filename> file as well. Create
|
---|
| 263 | a <filename>~/.foprc</filename> file using the following commands:</para>
|
---|
| 264 |
|
---|
| 265 | <screen><userinput>cat > ~/.foprc << "EOF"
|
---|
[977061b0] | 266 | <literal>FOP_OPTS="-Xmx<replaceable><RAM_Installed></replaceable>m"
|
---|
[f570280] | 267 | FOP_HOME="/opt/fop"</literal>
|
---|
| 268 |
|
---|
| 269 | EOF</userinput></screen>
|
---|
| 270 |
|
---|
[977061b0] | 271 | <para>Replace <replaceable><RAM_Installed></replaceable> with a
|
---|
| 272 | number representing the amount of RAM installed in your computer (in
|
---|
| 273 | megabytes). An example would be
|
---|
| 274 | <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
|
---|
[75d53372] | 275 | memory issues running <application>fop</application>, see
|
---|
[f570280] | 276 | <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
|
---|
| 277 |
|
---|
[492000e] | 278 | <para>To include the <command>fop</command> script in your path,
|
---|
[977061b0] | 279 | update your personal or system-wide profile with the following:</para>
|
---|
[f570280] | 280 |
|
---|
[492000e] | 281 | <screen><literal>PATH=$PATH:/opt/fop</literal></screen>
|
---|
[f570280] | 282 |
|
---|
| 283 | </sect3>
|
---|
| 284 |
|
---|
| 285 | </sect2>
|
---|
| 286 |
|
---|
| 287 | <sect2 role="content">
|
---|
| 288 | <title>Contents</title>
|
---|
| 289 |
|
---|
| 290 | <segmentedlist>
|
---|
| 291 | <segtitle>Installed Programs</segtitle>
|
---|
| 292 | <segtitle>Installed Libraries</segtitle>
|
---|
| 293 | <segtitle>Installed Directory</segtitle>
|
---|
| 294 |
|
---|
| 295 | <seglistitem>
|
---|
[492000e] | 296 | <seg>fop</seg>
|
---|
| 297 | <seg>fop.jar and numerous support library classes located in
|
---|
| 298 | <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
|
---|
| 299 | components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
|
---|
[f570280] | 300 | mlibwrapper_jai.jar</seg>
|
---|
| 301 | <seg>/opt/fop-&fop-version;</seg>
|
---|
| 302 | </seglistitem>
|
---|
| 303 | </segmentedlist>
|
---|
| 304 |
|
---|
| 305 | <variablelist>
|
---|
| 306 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 307 | <?dbfo list-presentation="list"?>
|
---|
| 308 | <?dbhtml list-presentation="table"?>
|
---|
| 309 |
|
---|
[492000e] | 310 | <varlistentry id="fop-prog">
|
---|
| 311 | <term><command>fop</command></term>
|
---|
[f570280] | 312 | <listitem>
|
---|
| 313 | <para>is a wrapper script to the <command>java</command> command
|
---|
[75d53372] | 314 | which sets up the <application>fop</application>
|
---|
[f570280] | 315 | environment and passes the required parameters.</para>
|
---|
[492000e] | 316 | <indexterm zone="fop fop-prog">
|
---|
| 317 | <primary sortas="b-fop">fop</primary>
|
---|
[f570280] | 318 | </indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
| 321 |
|
---|
| 322 | <varlistentry id="fop.jar">
|
---|
| 323 | <term><filename class='libraryfile'>fop.jar</filename></term>
|
---|
| 324 | <listitem>
|
---|
[75d53372] | 325 | <para>contains all the <application>fop</application>
|
---|
[f570280] | 326 | <application>Java</application> classes.</para>
|
---|
| 327 | <indexterm zone="fop fop.jar">
|
---|
| 328 | <primary sortas="c-fop.jar">fop.jar</primary>
|
---|
| 329 | </indexterm>
|
---|
| 330 | </listitem>
|
---|
| 331 | </varlistentry>
|
---|
| 332 |
|
---|
| 333 | </variablelist>
|
---|
| 334 |
|
---|
| 335 | </sect2>
|
---|
| 336 |
|
---|
| 337 | </sect1>
|
---|