[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 |
|
---|
[93343b6] | 54 | &lfs74_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">
|
---|
[0d7900a] | 114 | <xref linkend="xorg7"/> and
|
---|
[75d53372] | 115 | <xref linkend="apache-ant"/>
|
---|
| 116 | </para>
|
---|
[f570280] | 117 |
|
---|
| 118 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[75d53372] | 119 | <para role="optional">
|
---|
[cbfc7b61] | 120 | <xref linkend="junit"/> (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>,
|
---|
| 123 | <ulink url="https://jai-imageio.dev.java.net/">JAI Image I/O Tools</ulink>,
|
---|
| 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 |
|
---|
[48bd327] | 139 | <important>
|
---|
| 140 | <para>You must run this installation from an X-window using a GL-aware
|
---|
| 141 | <application>Xorg</application> server or some of the
|
---|
[75d53372] | 142 | <application>JUnit</application> tests will hang.</para>
|
---|
[48bd327] | 143 | </important>
|
---|
[8159f350] | 144 |
|
---|
[492000e] | 145 | <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
|
---|
| 146 | the build. To build the <application>JIMI SDK</application> and/or
|
---|
| 147 | <application>XMLUnit</application> extension classes, ensure the
|
---|
[75d53372] | 148 | corresponding <filename class='extension'>.jar</filename> files can be
|
---|
| 149 | found via the <envar>CLASSPATH</envar> environment variable.</para>
|
---|
[cbfc7b61] | 150 | <!--
|
---|
[492000e] | 151 | <sect3>
|
---|
| 152 | <title>Installing OFFO Hyphenation Patterns</title>
|
---|
| 153 |
|
---|
[75d53372] | 154 | <para>First, unpack the <application>fop</application> source tarball and
|
---|
| 155 | the hyphenation zipfile from the same directory, then change directories
|
---|
| 156 | into the root of the <application>fop</application> source tree. Copy the
|
---|
| 157 | XML hyphenation patterns into the <application>fop</application> source
|
---|
| 158 | tree by running the following commands:</para>
|
---|
[492000e] | 159 |
|
---|
| 160 | <screen><userinput>cp ../offo-hyphenation/hyph/* hyph &&
|
---|
| 161 | rm -rf ../offo-hyphenation</userinput></screen>
|
---|
| 162 |
|
---|
| 163 | </sect3>
|
---|
[cbfc7b61] | 164 | -->
|
---|
[f570280] | 165 | <sect3>
|
---|
[75d53372] | 166 | <title>Installing Java Advanced Imaging (JAI) API components</title>
|
---|
| 167 |
|
---|
| 168 | <para>Next install the JAI API components. As the <systemitem
|
---|
| 169 | class="username">root</systemitem> user:</para>
|
---|
| 170 |
|
---|
| 171 | <screen><userinput>case `uname -m` in
|
---|
[0d7900a] | 172 | i?86)
|
---|
| 173 | tar -xf ../jai-&jai-version;-lib-linux-i586.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/i386/
|
---|
| 176 | ;;
|
---|
| 177 |
|
---|
[0d7900a] | 178 | x86_64)
|
---|
| 179 | tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
|
---|
[75d53372] | 180 | cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
|
---|
| 181 | cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/amd64/
|
---|
| 182 | ;;
|
---|
| 183 | esac</userinput></screen>
|
---|
[f570280] | 184 | </sect3>
|
---|
[634c636c] | 185 |
|
---|
[f570280] | 186 | <sect3>
|
---|
[75d53372] | 187 | <title>Installing fop Components</title>
|
---|
[f570280] | 188 |
|
---|
[75d53372] | 189 | <para>Compile <application>fop</application> by running the
|
---|
[f570280] | 190 | following commands:</para>
|
---|
| 191 |
|
---|
[cbfc7b61] | 192 | <screen><userinput>ant compile &&
|
---|
| 193 | ant jar-main &&
|
---|
| 194 | ant javadocs &&
|
---|
| 195 | mv build/javadocs .</userinput></screen>
|
---|
| 196 |
|
---|
| 197 | <para>If <application>Forrest</application> is installed,
|
---|
| 198 | build the full set of documentation:</para>
|
---|
| 199 |
|
---|
| 200 | <screen><userinput>ant docs</userinput></screen>
|
---|
[492000e] | 201 |
|
---|
[cbfc7b61] | 202 | <para>To test the application run <command>ant junit-all</command>.
|
---|
| 203 | The hyphenation tests will fail. To see a list of other
|
---|
| 204 | test targets, use <command>ant -p</command>.</para>
|
---|
[d260aaf4] | 205 |
|
---|
[48bd327] | 206 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
| 207 | user:</para>
|
---|
[d260aaf4] | 208 |
|
---|
[cbfc7b61] | 209 | <screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &&
|
---|
| 210 | cp -v KEYS LICENSE NOTICE README /opt/fop-&fop-version; &&
|
---|
| 211 | cp -va build conf examples fop* javadocs lib status.xml /opt/fop-&fop-version; &&
|
---|
| 212 |
|
---|
[492000e] | 213 | ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
|
---|
[f570280] | 214 |
|
---|
| 215 | </sect3>
|
---|
| 216 |
|
---|
| 217 | </sect2>
|
---|
[634c636c] | 218 |
|
---|
[f570280] | 219 | <sect2 role="commands">
|
---|
| 220 | <title>Command Explanations</title>
|
---|
| 221 |
|
---|
[cbfc7b61] | 222 | <para><command>ant <option>target</option></command>: This reads the file
|
---|
| 223 | <filename>build.xml</filename> and builds the target files.</para>
|
---|
[f570280] | 224 |
|
---|
[492000e] | 225 | <para><command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
|
---|
| 226 | optional and creates a convenience symlink so that <envar>$FOP_HOME</envar>
|
---|
| 227 | doesn't have to be changed each time there's a package version change.</para>
|
---|
[f570280] | 228 |
|
---|
| 229 | </sect2>
|
---|
| 230 |
|
---|
| 231 | <sect2 role="configuration">
|
---|
[75d53372] | 232 | <title>Configuring fop</title>
|
---|
[f570280] | 233 |
|
---|
| 234 | <sect3 id="fop-config">
|
---|
| 235 | <title>Config Files</title>
|
---|
| 236 |
|
---|
| 237 | <para><filename>~/.foprc</filename></para>
|
---|
| 238 |
|
---|
| 239 | <indexterm zone="fop fop-config">
|
---|
| 240 | <primary sortas="e-AA.foprc">~/.foprc</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 |
|
---|
| 243 | </sect3>
|
---|
| 244 |
|
---|
| 245 | <sect3>
|
---|
| 246 | <title>Configuration Information</title>
|
---|
| 247 |
|
---|
[75d53372] | 248 | <para>Using <application>fop</application> to process some large FO's
|
---|
[f570280] | 249 | (including the FO derived from the BLFS XML sources), can lead to memory
|
---|
| 250 | errors. Unless you add a parameter to the <command>java</command> command
|
---|
[492000e] | 251 | used in the <command>fop</command> script you may receive messages
|
---|
[f570280] | 252 | similar to the one shown below:</para>
|
---|
| 253 |
|
---|
| 254 | <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
|
---|
| 255 | Java heap space</computeroutput></para>
|
---|
| 256 |
|
---|
[977061b0] | 257 | <para>To avoid errors like this, you need to pass an extra parameter to
|
---|
[492000e] | 258 | the <command>java</command> command used in the <command>fop</command>
|
---|
[977061b0] | 259 | script. This can be accomplished by creating a
|
---|
| 260 | <filename>~/.foprc</filename> (which is sourced by the
|
---|
[492000e] | 261 | <command>fop</command> script) and adding the parameter to the
|
---|
[977061b0] | 262 | <envar>FOP_OPTS</envar> environment variable.</para>
|
---|
[f570280] | 263 |
|
---|
[492000e] | 264 | <para>The <command>fop</command> script looks for a
|
---|
[f570280] | 265 | <envar>FOP_HOME</envar> environment variable to locate the
|
---|
[75d53372] | 266 | <application>fop</application> class libraries. You can create this
|
---|
[f570280] | 267 | variable using the <filename>~/.foprc</filename> file as well. Create
|
---|
| 268 | a <filename>~/.foprc</filename> file using the following commands:</para>
|
---|
| 269 |
|
---|
| 270 | <screen><userinput>cat > ~/.foprc << "EOF"
|
---|
[977061b0] | 271 | <literal>FOP_OPTS="-Xmx<replaceable><RAM_Installed></replaceable>m"
|
---|
[f570280] | 272 | FOP_HOME="/opt/fop"</literal>
|
---|
| 273 | EOF</userinput></screen>
|
---|
| 274 |
|
---|
[977061b0] | 275 | <para>Replace <replaceable><RAM_Installed></replaceable> with a
|
---|
| 276 | number representing the amount of RAM installed in your computer (in
|
---|
| 277 | megabytes). An example would be
|
---|
| 278 | <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
|
---|
[75d53372] | 279 | memory issues running <application>fop</application>, see
|
---|
[f570280] | 280 | <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
|
---|
| 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>
|
---|