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