source: pst/ps/fop.xml@ 4dd0208d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 4dd0208d was 4dd0208d, checked in by DJ Lucas <dj@…>, 17 years ago

Removed modification of jai source file in fop instructions.

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

  • Property mode set to 100644
File size: 16.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- Inserted as a reminder to do this. The mention of a test suite
8 is usually right before the root user installation commands. Please
9 delete these 12 (including one blank) lines after you are done.-->
10
11 <!-- Use one of the two mentions below about a test suite,
12 delete the line that is not applicable. Of course, if the
13 test suite uses syntax other than "make check", revise the
14 line to reflect the actual syntax to run the test suite -->
15
16 <!-- <para>This package does not come with a test suite.</para> -->
17 <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
18
19 <!ENTITY fop-download-http "http://www.apache.org/dist/xml/fop/fop-&fop-version;-src.tar.gz">
20 <!ENTITY fop-download-ftp "ftp://apache.mirrors.pair.com/xml/fop/source/fop-&fop-version;-src.tar.gz">
21 <!ENTITY fop-md5sum "1a31eb1357e5d4b8d32d4cb3edae2da2">
22 <!ENTITY fop-size "7.8 MB">
23 <!ENTITY fop-buildsize "47.9 MB">
24 <!ENTITY fop-time "0.25 SBU">
25
26 <!ENTITY jai-download "http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg">
27 <!ENTITY jai-md5sum "f2be3619a8d002eff3874355e96327eb">
28 <!ENTITY jai-size "2.6 MB">
29]>
30
31<sect1 id="fop" xreflabel="FOP-&fop-version;">
32 <?dbhtml filename="fop.html"?>
33
34 <sect1info>
35 <othername>$LastChangedBy$</othername>
36 <date>$Date$</date>
37 </sect1info>
38
39 <title>FOP-&fop-version;</title>
40
41 <indexterm zone="fop">
42 <primary sortas="a-FOP">FOP</primary>
43 </indexterm>
44
45 <sect2 role="package">
46 <title>Introduction to FOP</title>
47
48 <para>The <application>FOP</application> (Formatting Objects Processor)
49 package contains a print formatter driven by XSL formatting objects
50 (XSL-FO). It is a <application>Java</application> application that reads
51 a formatting object tree and renders the resulting pages to a specified
52 output. Output formats currently supported include PDF, PCL, PostScript,
53 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
54 primary output target is PDF.</para>
55
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
80 <itemizedlist spacing="compact">
81 <title>Required package</title>
82 <listitem>
83 <para><application>Java</application> Advanced Imaging (JAI) API
84 components: <ulink url="&jai-download;">
85 http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;</ulink>
86 <ulink url="&jai-download;">
87 PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg</ulink>
88 </para>
89 </listitem>
90 <listitem>
91 <para>Download MD5 sum: &jai-md5sum;</para>
92 </listitem>
93 <listitem>
94 <para>Download size: &jai-size;</para>
95 </listitem>
96 </itemizedlist>
97
98 <para>Choose the <quote><application>Linux</application>
99 <application>JDK</application> Install</quote> file after
100 accepting the license agreement.</para>
101
102 <itemizedlist spacing='compact'>
103 <title>Required patch</title>
104 <listitem>
105 <para><ulink
106 url="&patch-root;/fop-&fop-version;-jdk_1.5.0-1.patch"/></para>
107 </listitem>
108 </itemizedlist>
109
110 <bridgehead renderas="sect3">FOP Dependencies</bridgehead>
111
112 <bridgehead renderas="sect4">Required</bridgehead>
113 <para role="required"><xref linkend="jdk"/></para>
114
115 <bridgehead renderas="sect4">Optional</bridgehead>
116 <para role="optional"><xref linkend="libxslt"/>,
117 <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
118 <ulink url="http://xml.apache.org/batik/">Batik</ulink> and
119 <ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
120 the documentation)</para>
121
122 <para condition="html" role="usernotes">User Notes:
123 <ulink url="&blfs-wiki;/fop"/></para>
124
125 </sect2>
126
127 <sect2 role="installation">
128 <title>Installation of FOP</title>
129
130 <note>
131 <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
132 the build.</para>
133 </note>
134
135 <para>Some versions of tar will display a message similar to
136 <quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
137 when unpacking the source tarball. You may safely ignore this message.</para>
138
139 <sect3>
140 <title>Installing JAI</title>
141
142 <tip>
143 <para>The
144 <command>$FOP_BUILD_DIR/jai-1_1_2_01-lib-linux-i586-jdk.bin</command>
145 command below installs the JAI components in the JDK tree. You will be
146 required to view, and then accept (by entering a <keycap>y</keycap>
147 keypress), a license agreement before the installation will continue.
148 If you are scripting (automating) the build, you'll need to account for
149 this. There is information about automating build commands in the
150 <xref linkend="automating-builds"/> section of Chapter 2. Towards the
151 end of this section, specific information for automating this type of
152 installation is discussed.</para>
153 </tip>
154
155 <para>Install the JAI components by running the following commands as
156 the <systemitem class="username">root</systemitem> user while in the
157 root of the <application>FOP</application> source tree:</para>
158
159<screen role="root"><userinput>cp ../jai-1_1_2_01-lib-linux-i586-jdk.bin . &amp;&amp;
160sed -i 's/tail +122/tail -n +122/' \
161 jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
162chmod 755 jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
163FOP_BUILD_DIR=$(pwd) &amp;&amp;
164cd $JAVA_HOME &amp;&amp;
165$FOP_BUILD_DIR/jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
166cd $FOP_BUILD_DIR</userinput></screen>
167
168 </sect3>
169
170 <sect3>
171 <title>Installing FOP required components</title>
172
173 <para>Install <application>FOP</application> by running the
174 following commands:</para>
175
176<screen><userinput>patch -Np1 -i ../fop-&fop-version;-jdk_1.5.0-1.patch &amp;&amp;
177./build.sh &amp;&amp;
178sed -i "s/build/lib/" fop.sh</userinput></screen>
179
180 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
181
182<screen role="root"><userinput>install -v -d -m755 \
183 /opt/fop-&fop-version;/{bin,lib,docs/{general,lib,site}} &amp;&amp;
184install -v -m755 fop.sh /opt/fop-&fop-version;/bin &amp;&amp;
185install -v -m644 build/fop.jar lib/avalon-framework-cvs-20020806.jar \
186 /opt/fop-&fop-version;/lib &amp;&amp;
187install -v -m644 docs/* /opt/fop-&fop-version;/docs &amp;&amp;
188install -v -m644 CHANGES LICENSE README ReleaseNotes.html STATUS \
189 /opt/fop-&fop-version;/docs/general &amp;&amp;
190install -v -m644 lib/{avalon.LICENSE.txt,readme} \
191 /opt/fop-&fop-version;/docs/lib &amp;&amp;
192cp -v -R build/site/* /opt/fop-&fop-version;/docs/site &amp;&amp;
193ln -svf fop-&fop-version; /opt/fop</userinput></screen>
194
195 </sect3>
196
197 <sect3>
198 <title>Installing the Batik JAR</title>
199
200 <para>You'll need to install one additional <application>Java</application>
201 class library to process SVG objects. This library is part of the
202 <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
203 also included with the <application>FOP</application> package. If you
204 have <application>Batik</application> installed, ensure the
205 <filename>batik.jar</filename> library is included in your
206 <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
207 symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
208 pointing to the full path of the installed <filename>batik.jar</filename>
209 file so that the <command>fop.sh</command> script will automatically pick it
210 up.</para>
211
212 <para>If you don't have the <application>Batik</application> package
213 installed, run the following commands as the <systemitem
214 class="username">root</systemitem> user:</para>
215
216<screen role="root"><userinput>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
217install -v -m644 lib/batik.LICENSE.txt \
218 /opt/fop-&fop-version;/docs/lib</userinput></screen>
219
220 </sect3>
221
222 <sect3>
223 <title>Installing the Xalan-Java components</title>
224
225 <para>The components of <application>FOP</application> required to
226 process FO files created by an XSL transformation engine (also known
227 as an XSLT processor) is now complete. An XSL transformation engine
228 (<command>xsltproc</command>) is included with the
229 <xref linkend="libxslt"/> package in BLFS. The
230 <application>FOP</application> package includes components of
231 <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to
232 accomplish XSL transformations. If you have the
233 <application>Xalan-Java</application> package installed, skip to
234 the next section.</para>
235
236 <para>If you wish to install the <application>Xalan-Java</application>
237 components provided by the <application>FOP</application>
238 package, run the following commands as the <systemitem
239 class="username">root</systemitem> user:</para>
240
241<screen role="root"><userinput>sed -i "s/build/lib/" xalan.sh &amp;&amp;
242install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
243install -v -m644 lib/xml-apis.jar \
244 lib/xercesImpl-2.2.1.jar \
245 lib/xalan-2.4.1.jar \
246 /opt/fop-&fop-version;/lib &amp;&amp;
247install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
248 lib/xml-apis.README.txt \
249 /opt/fop-&fop-version;/docs/lib</userinput></screen>
250
251 </sect3>
252
253 <sect3>
254 <title>Installing the Jimi SDK JAR</title>
255
256 <para>If you installed the Java Image I/O class library
257 (<application>Jimi SDK</application>) into the
258 <application>FOP</application> source tree
259 <filename class='directory'>lib</filename> directory before building
260 <application>FOP</application> (this will enable Jimi
261 support), ensure you also install this JAR file into
262 <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
263
264 </sect3>
265
266 </sect2>
267
268 <sect2 role="commands">
269 <title>Command Explanations</title>
270
271 <para><command>sed -i 's/tail +122/tail -n +122/' ...</command>:
272 The <application>JAI</application> binary file has a <command>tail</command>
273 command imbedded in the file which uses obsolete syntax and causes the
274 file to not unpack correctly. This command fixes the obsolete
275 syntax.</para>
276
277 <para><command>$FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This
278 command installs the <application>JAI</application> components
279 into the <application>JDK</application> file structure.
280 <envar>$FOP_BUILD_DIR</envar> is used as a reference point to the source
281 executable and as a method to return back to the
282 <application>FOP</application> source tree.</para>
283
284 <para><command>sed -i "s/build/lib/" ...</command>: These commands modify
285 the installed shell scripts so that the location of the installed
286 <filename>fop.jar</filename> file is correctly identified.</para>
287
288 <para><command>install -v ...; cp -v ...</command>: There is no installation
289 script provided by the <application>FOP</application>
290 package. These commands install the package.</para>
291
292 <para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
293 convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
294 changed each time there's a package version change.</para>
295
296 </sect2>
297
298 <sect2 role="configuration">
299 <title>Configuring FOP</title>
300
301 <sect3 id="fop-config">
302 <title>Config Files</title>
303
304 <para><filename>~/.foprc</filename></para>
305
306 <indexterm zone="fop fop-config">
307 <primary sortas="e-AA.foprc">~/.foprc</primary>
308 </indexterm>
309
310 </sect3>
311
312 <sect3>
313 <title>Configuration Information</title>
314
315 <para>Using <application>FOP</application> to process some large FO's
316 (including the FO derived from the BLFS XML sources), can lead to memory
317 errors. Unless you add a parameter to the <command>java</command> command
318 used in the <command>fop.sh</command> script you may receive messages
319 similar to the one shown below:</para>
320
321 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
322 Java heap space</computeroutput></para>
323
324 <para>To avoid errors like this, you need to pass an extra parameter to
325 the <command>java</command> command used in the <command>fop.sh</command>
326 script. This can be accomplished by creating a
327 <filename>~/.foprc</filename> (which is sourced by the
328 <command>fop.sh</command> script) and adding the parameter to the
329 <envar>FOP_OPTS</envar> environment variable.</para>
330
331 <para>The <command>fop.sh</command> script looks for a
332 <envar>FOP_HOME</envar> environment variable to locate the
333 <application>FOP</application> class libraries. You can create this
334 variable using the <filename>~/.foprc</filename> file as well. Create
335 a <filename>~/.foprc</filename> file using the following commands:</para>
336
337<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
338<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
339FOP_HOME="/opt/fop"</literal>
340
341EOF</userinput></screen>
342
343 <para>Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
344 number representing the amount of RAM installed in your computer (in
345 megabytes). An example would be
346 <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
347 memory issues running <application>FOP</application>, see
348 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
349
350 <para>To include the <command>fop.sh</command> script in your path,
351 update your personal or system-wide profile with the following:</para>
352
353<screen><literal>PATH=$PATH:/opt/fop/bin</literal></screen>
354
355 </sect3>
356
357 </sect2>
358
359 <sect2 role="content">
360 <title>Contents</title>
361
362 <segmentedlist>
363 <segtitle>Installed Programs</segtitle>
364 <segtitle>Installed Libraries</segtitle>
365 <segtitle>Installed Directory</segtitle>
366
367 <seglistitem>
368 <seg>fop.sh and xalan.sh</seg>
369 <seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar,
370 xalan-2.4.1.jar, xercesImpl-2.2.1.jar, and xml-apis.jar. JAI components
371 include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
372 mlibwrapper_jai.jar</seg>
373 <seg>/opt/fop-&fop-version;</seg>
374 </seglistitem>
375 </segmentedlist>
376
377 <variablelist>
378 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
379 <?dbfo list-presentation="list"?>
380 <?dbhtml list-presentation="table"?>
381
382 <varlistentry id="fop.sh">
383 <term><command>fop.sh</command></term>
384 <listitem>
385 <para>is a wrapper script to the <command>java</command> command
386 which sets up the <application>FOP</application>
387 environment and passes the required parameters.</para>
388 <indexterm zone="fop fop.sh">
389 <primary sortas="b-fop.sh">fop.sh</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="fop.jar">
395 <term><filename class='libraryfile'>fop.jar</filename></term>
396 <listitem>
397 <para>contains all the <application>FOP</application>
398 <application>Java</application> classes.</para>
399 <indexterm zone="fop fop.jar">
400 <primary sortas="c-fop.jar">fop.jar</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 </variablelist>
406
407 </sect2>
408
409</sect1>
Note: See TracBrowser for help on using the repository browser.