source: pst/ps/fop.xml@ 75d53372

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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
Last change on this file since 75d53372 was 75d53372, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Updated fop instructions to properly install
Java Advanced Imaging (JAI) API components.

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

  • Property mode set to 100644
File size: 12.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY fop-download-http "http://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
8 <!ENTITY fop-download-ftp " ">
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">
13
14 <!ENTITY jai-version "1_1_3">
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">
17 <!ENTITY jai-size "3.4 MB">
18
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
23 <!ENTITY offo-download "&sourceforge-repo;/offo/offo-hyphenation_v2.0.zip">
24 <!ENTITY offo-md5sum "a78171d47c9af223c51bbd42df36f26d">
25 <!ENTITY offo-size "858 KB">
26]>
27
28<sect1 id="fop" xreflabel="fop-&fop-version;">
29 <?dbhtml filename="fop.html"?>
30
31 <sect1info>
32 <othername>$LastChangedBy$</othername>
33 <date>$Date$</date>
34 </sect1info>
35
36 <title>fop-&fop-version;</title>
37
38 <indexterm zone="fop">
39 <primary sortas="a-fop">fop</primary>
40 </indexterm>
41
42 <sect2 role="package">
43 <title>Introduction to fop</title>
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
53 &lfs70_checked;
54
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">
80 <title>Required packages</title>
81 <listitem>
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>
88 </para>
89 </listitem>
90 <listitem>
91 <para>Java Advanced Imaging (JAI) API components (architecture dependent):
92 <simplelist>
93 <member><ulink url="&jai-download;"/></member>
94 <member>&jai-md5sum;</member>
95 <member>&jai-size;</member>
96 </simplelist>
97 <simplelist>
98 <member><ulink url="&jai64-download;"/></member>
99 <member>&jai64-md5sum;</member>
100 <member>&jai64-size;</member>
101 </simplelist>
102 </para>
103 </listitem>
104 </itemizedlist>
105
106 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
107
108 <bridgehead renderas="sect4">Required</bridgehead>
109 <para role="required">
110 <xref linkend="xorg7"/> and
111 <xref linkend="apache-ant"/>
112 </para>
113
114 <bridgehead renderas="sect4">Optional</bridgehead>
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>
125
126 <para condition="html" role="usernotes">User Notes:
127 <ulink url="&blfs-wiki;/fop"/></para>
128
129 </sect2>
130
131 <sect2 role="installation">
132 <title>Installation of fop</title>
133
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
137 <application>JUnit</application> tests will hang.</para>
138 </important>
139
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
143 corresponding <filename class='extension'>.jar</filename> files can be
144 found via the <envar>CLASSPATH</envar> environment variable.</para>
145
146 <sect3>
147 <title>Installing OFFO Hyphenation Patterns</title>
148
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>
154
155<screen><userinput>cp ../offo-hyphenation/hyph/* hyph &amp;&amp;
156rm -rf ../offo-hyphenation</userinput></screen>
157
158 </sect3>
159
160 <sect3>
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 ;;
178esac</userinput></screen>
179
180 </sect3>
181
182 <sect3>
183 <title>Installing fop Components</title>
184
185 <para>If <application>Forrest</application> is not installed, remove
186 a reference to it in the build.xml:</para>
187
188<screen><userinput>sed -i -e "s/all,javadocs,docs/all,javadocs/" \
189 -e '\#${dist.bin.result.dir}/docs#,\#&lt;/copy&gt;#d' build.xml</userinput></screen>
190
191 <para>Compile <application>fop</application> by running the
192 following commands:</para>
193
194<screen><userinput>ant dist</userinput></screen>
195
196 <para>The unit regression tests were performed in the build step
197 above.</para>
198
199 <para>Now, as the <systemitem class="username">root</systemitem>
200 user:</para>
201
202<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
203mv -v dist-bin/fop-&fop-version;/* /opt/fop-&fop-version; &amp;&amp;
204ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
205
206 </sect3>
207
208 </sect2>
209
210 <sect2 role="commands">
211 <title>Command Explanations</title>
212
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
217 are placed. This directory is used to install <application>fop</application>
218 into its final place.</para>
219
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>
223
224 </sect2>
225
226 <sect2 role="configuration">
227 <title>Configuring fop</title>
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
243 <para>Using <application>fop</application> to process some large FO's
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
246 used in the <command>fop</command> script you may receive messages
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
252 <para>To avoid errors like this, you need to pass an extra parameter to
253 the <command>java</command> command used in the <command>fop</command>
254 script. This can be accomplished by creating a
255 <filename>~/.foprc</filename> (which is sourced by the
256 <command>fop</command> script) and adding the parameter to the
257 <envar>FOP_OPTS</envar> environment variable.</para>
258
259 <para>The <command>fop</command> script looks for a
260 <envar>FOP_HOME</envar> environment variable to locate the
261 <application>fop</application> class libraries. You can create this
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 &gt; ~/.foprc &lt;&lt; "EOF"
266<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
267FOP_HOME="/opt/fop"</literal>
268
269EOF</userinput></screen>
270
271 <para>Replace <replaceable>&lt;RAM_Installed&gt;</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
275 memory issues running <application>fop</application>, see
276 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
277
278 <para>To include the <command>fop</command> script in your path,
279 update your personal or system-wide profile with the following:</para>
280
281<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
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>
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
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
310 <varlistentry id="fop-prog">
311 <term><command>fop</command></term>
312 <listitem>
313 <para>is a wrapper script to the <command>java</command> command
314 which sets up the <application>fop</application>
315 environment and passes the required parameters.</para>
316 <indexterm zone="fop fop-prog">
317 <primary sortas="b-fop">fop</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="fop.jar">
323 <term><filename class='libraryfile'>fop.jar</filename></term>
324 <listitem>
325 <para>contains all the <application>fop</application>
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>
Note: See TracBrowser for help on using the repository browser.