source: pst/ps/fop.xml@ b9d85e6c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.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 b9d85e6c was b9d85e6c, checked in by Randy McMurchy <randy@…>, 19 years ago

Moved patch download to 'Additional downloads' section and re-added the note about JAVA_HOME to the FOP instructions

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

  • Property mode set to 100644
File size: 14.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 <!ENTITY fop-download-http "http://www.apache.org/dist/xml/fop/fop-&fop-version;-src.tar.gz">
8 <!ENTITY fop-download-ftp "ftp://apache.mirrors.pair.com/xml/fop/source/fop-&fop-version;-src.tar.gz">
9 <!ENTITY fop-md5sum "1a31eb1357e5d4b8d32d4cb3edae2da2">
10 <!ENTITY fop-size "7.8 MB">
11 <!ENTITY fop-buildsize "45.3 MB">
12 <!ENTITY fop-time "0.25 SBU">
13
14 <!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">
15 <!ENTITY jai-md5sum "f2be3619a8d002eff3874355e96327eb">
16 <!ENTITY jai-size "2.6 MB">
17]>
18
19<sect1 id="fop" xreflabel="FOP-&fop-version;">
20<sect1info>
21<othername>$LastChangedBy$</othername>
22<date>$Date$</date>
23</sect1info>
24<?dbhtml filename="fop.html"?>
25<title><application><acronym>FOP</acronym></application>-&fop-version;</title>
26<indexterm zone="fop">
27<primary sortas="a-FOP">FOP</primary></indexterm>
28
29<sect2>
30<title>Introduction to <application><acronym>FOP</acronym></application></title>
31
32<para>The <application><acronym>FOP</acronym></application> (Formatting
33Objects Processor) package contains a print formatter driven by
34<acronym>XSL</acronym> formatting objects
35(<acronym>XSL</acronym>-<acronym>FO</acronym>). It is a
36<application>Java</application> application that reads a formatting object
37tree and renders the resulting pages to a specified output. Output formats
38currently supported include <acronym>PDF</acronym>, <acronym>PCL</acronym>,
39PostScript, <acronym>SVG</acronym>, <acronym>XML</acronym> (area tree
40representation), print, <acronym>AWT</acronym>, <acronym>MIF</acronym> and
41<acronym>ASCII</acronym> text. The primary output target is
42<acronym>PDF</acronym>.</para>
43
44<sect3><title>Package information</title>
45<itemizedlist spacing="compact">
46<listitem><para>Download (HTTP):
47<ulink url="&fop-download-http;"/></para></listitem>
48<listitem><para>Download (FTP):
49<ulink url="&fop-download-ftp;"/></para></listitem>
50<listitem><para>Download MD5 sum:
51&fop-md5sum;</para></listitem>
52<listitem><para>Download size:
53&fop-size;</para></listitem>
54<listitem><para>Estimated disk space required:
55&fop-buildsize;</para></listitem>
56<listitem><para>Estimated build time:
57&fop-time;</para></listitem></itemizedlist>
58</sect3>
59
60<sect3><title>Additional downloads</title>
61<sect4><title>Required package</title>
62<itemizedlist spacing="compact">
63<listitem><para><application>Java</application> Advanced Imaging
64(<acronym>JAI</acronym>) <acronym>API</acronym> components:
65<ulink url="&jai-download;">
66http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;</ulink>
67<ulink url="&jai-download;">
68PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg</ulink>
69</para></listitem>
70<listitem><para>Download MD5 sum: &jai-md5sum;</para></listitem>
71<listitem><para>Download size: &jai-size;</para></listitem>
72</itemizedlist>
73
74<para>Choose the <quote><application>Linux</application>
75<application><acronym>JDK</acronym></application> Install</quote> file after
76accepting the license agreement.</para>
77</sect4>
78
79<sect4><title>Required patch</title>
80<itemizedlist spacing='compact'>
81<listitem><para><ulink
82url="&patch-root;/fop_&fop-version;-jdk_&jdk-src-version;-1.patch"/></para>
83</listitem>
84</itemizedlist>
85</sect4>
86</sect3>
87
88<sect3><title><application>FOP</application> dependencies</title>
89<sect4><title>Required</title>
90<para><xref linkend="jdk"/></para>
91</sect4>
92
93<sect4><title>Optional</title>
94<para><xref linkend="libxslt"/>,
95<ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
96<ulink url="http://xml.apache.org/batik/">Batik</ulink> and
97<ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
98the documentation)</para>
99</sect4>
100</sect3>
101
102</sect2>
103
104<sect2>
105<title>Installation of <application>FOP</application></title>
106
107<note><para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
108the build.</para></note>
109
110<para>Some versions of tar will display a message similar to
111<quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
112when unpacking the source tarball. You may safely ignore this message.</para>
113
114<sect3><title>Installing <acronym>JAI</acronym></title>
115<para>Install the <acronym>JAI</acronym> components by running the following
116commands as the root user while in the root of the
117<application><acronym>FOP</acronym></application> source tree:</para>
118
119<screen><userinput role='root'><command>chmod 755 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
120FOP_BUILD_DIR=$(pwd) &amp;&amp;
121cd $JAVA_HOME &amp;&amp;
122yes | $FOP_BUILD_DIR/../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
123cd $FOP_BUILD_DIR</command></userinput></screen>
124</sect3>
125
126<sect3><title>Installing <application><acronym>FOP</acronym></application>
127required components</title>
128<para>Install <application><acronym>FOP</acronym></application> by running the
129following commands:</para>
130
131<screen><userinput><command>patch -Np1 -i ../fop_&fop-version;-jdk_&jdk-src-version;-1.patch &amp;&amp;
132./build.sh &amp;&amp;
133sed -i -e "s/build/lib/" fop.sh</command></userinput></screen>
134
135<para>Now, as the root user:</para>
136
137<screen><userinput role='root'><command>install -v -d -m755 \
138 /opt/fop-&fop-version;/{bin,lib,docs/{general,lib,site}} &amp;&amp;
139install -v -m755 fop.sh /opt/fop-&fop-version;/bin &amp;&amp;
140install -v -m644 build/fop.jar lib/avalon-framework-cvs-20020806.jar \
141 /opt/fop-&fop-version;/lib &amp;&amp;
142install -v -m644 docs/* /opt/fop-&fop-version;/docs &amp;&amp;
143install -v -m644 CHANGES LICENSE README ReleaseNotes.html STATUS \
144 /opt/fop-&fop-version;/docs/general &amp;&amp;
145install -v -m644 lib/{avalon.LICENSE.txt,readme} \
146 /opt/fop-&fop-version;/docs/lib &amp;&amp;
147cp -v -R build/site/* /opt/fop-&fop-version;/docs/site &amp;&amp;
148ln -svf fop-&fop-version; /opt/fop</command></userinput></screen>
149</sect3>
150
151<sect3><title>Installing the <application>Batik</application>
152<acronym>JAR</acronym></title>
153<para>You'll need to install one additional <application>Java</application>
154class library to process <acronym>SVG</acronym> objects. This library is part
155of the <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
156also included with the <application><acronym>FOP</acronym></application>
157package. If you have <application>Batik</application> installed, ensure the
158<filename>batik.jar</filename> library is included in your
159<envar>$CLASSPATH</envar> environment variable. Alternatively, create a
160symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
161pointing to the full path of the installed <filename>batik.jar</filename>
162file so that the <command>fop.sh</command> script will automatically pick it
163up.</para>
164
165<para>If you don't have the <application>Batik</application> package installed,
166run the following commands as the root user:</para>
167
168<screen><userinput role='root'><command>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
169install -v -m644 lib/batik.LICENSE.txt \
170 /opt/fop-&fop-version;/docs/lib</command></userinput></screen>
171</sect3>
172
173<sect3><title>Installing the <application>Xalan-Java</application>
174components</title>
175<para>The components of <application><acronym>FOP</acronym></application>
176required to process <acronym>FO</acronym> files created by an
177<acronym>XSL</acronym> transformation engine (also known as an
178<acronym>XSLT</acronym> processor) is now complete. An
179<acronym>XSL</acronym> transformation engine (<command>xsltproc</command>)
180is included with the <xref linkend="libxslt"/> package in
181<acronym>BLFS</acronym>. The <application><acronym>FOP</acronym></application>
182package includes components of
183<ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to accomplish
184<acronym>XSL</acronym> transformations. If you have the
185<application>Xalan-Java</application> package installed, skip to the next
186section.</para>
187
188<para>If you wish to install the <application>Xalan-Java</application>
189components provided by the <application><acronym>FOP</acronym></application>
190package, run the following commands as the root user:</para>
191
192<screen><userinput role='root'><command>sed -i -e "s/build/lib/" xalan.sh &amp;&amp;
193install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
194install -v -m644 lib/xml-apis.jar \
195 lib/xercesImpl-2.2.1.jar \
196 lib/xalan-2.4.1.jar \
197 /opt/fop-&fop-version;/lib &amp;&amp;
198install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
199 lib/xml-apis.README.txt \
200 /opt/fop-&fop-version;/docs/lib</command></userinput></screen>
201</sect3>
202
203<sect3><title>Installing the
204<application>Jimi <acronym>SDK</acronym></application>
205<acronym>JAR</acronym></title>
206<para>If you installed the Java Image I/O class library
207(<application>Jimi <acronym>SDK</acronym></application>) into the
208<application><acronym>FOP</acronym></application> source tree
209<filename class='directory'>lib</filename> directory before building
210<application><acronym>FOP</acronym></application> (this will enable Jimi
211support), ensure you also install this <acronym>JAR</acronym> file into
212<filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
213</sect3>
214
215</sect2>
216
217<sect2>
218<title>Command explanations</title>
219
220<para><command>yes | $FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This command
221installs the <application><acronym>JAI</acronym></application> components
222into the <application><acronym>JDK</acronym></application> file structure. The
223<command>yes</command> command is piped through so that you don't have to
224scroll through four pages of the license agreement and automatically responds
225<quote>yes</quote> to the agreement. <envar>$FOP_BUILD_DIR</envar> is used as
226a reference point to the source executable and as a method to return back to
227the <application><acronym>FOP</acronym></application> source tree.</para>
228
229<para><command>sed -i -e "s/build/lib/" ...</command>: These commands modify
230the installed shell scripts so that the location of the installed
231<filename>fop.jar</filename> file is correctly identified.</para>
232
233<para><command>install -v ...; cp -v ...</command>: There is no installation
234script provided by the <application><acronym>FOP</acronym></application>
235package. These commands install the package.</para>
236
237<para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
238convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
239changed each time there's a package version change.</para>
240</sect2>
241
242<sect2>
243<title>Configuring <application>FOP</application></title>
244
245<sect3 id="fop-config"><title>Config files</title>
246<para><filename>~/.foprc</filename></para>
247<indexterm zone="fop fop-config">
248<primary sortas="e-AA.foprc">~/.foprc</primary></indexterm>
249</sect3>
250
251<sect3><title>Configuration Information</title>
252
253<para>Using <application><acronym>FOP</acronym></application> to process some
254large <acronym>FO</acronym>'s (including the <acronym>FO</acronym> derived from
255the <acronym>BLFS</acronym> <acronym>XML</acronym> sources), can lead to memory
256errors. Unless you add a parameter to the <command>java</command> command used
257in the <command>fop.sh</command> script you may receive messages similar to the
258one shown below:</para>
259
260<para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
261Java heap space</computeroutput></para>
262
263<para>To avoid errors like this, you need to pass an extra parameter to the
264<command>java</command> command used in the <command>fop.sh</command> script.
265This can be accomplished by creating a <filename>~/.foprc</filename> (which
266is sourced by the <command>fop.sh</command> script) and adding the parameter
267to the <envar>FOP_OPTS</envar> environment variable.</para>
268
269<para>The <command>fop.sh</command> script looks for a <envar>FOP_HOME</envar>
270environment variable to locate the
271<application><acronym>FOP</acronym></application> class libraries. You can
272create this variable using the <filename>~/.foprc</filename> file as
273well. Create a <filename>~/.foprc</filename> file using the following
274commands:</para>
275
276<screen><userinput><command>cat &gt; ~/.foprc &lt;&lt; "EOF"</command>
277FOP_OPTS="-Xmx<replaceable>[RAM_Installed]</replaceable>m"
278FOP_HOME="/opt/fop"
279
280<command>EOF</command></userinput></screen>
281
282<para>Replace <replaceable>[RAM_Installed]</replaceable> with a number
283representing the amount of RAM installed in your computer. An example would
284be <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
285memory issues running <application><acronym>FOP</acronym></application>, see
286<ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
287
288<para>To include the <command>fop.sh</command> script in your path, update
289your personal or system-wide profile with the following:</para>
290
291<screen><userinput>PATH=$PATH:/opt/fop/bin</userinput></screen>
292</sect3>
293
294</sect2>
295
296<sect2>
297<title>Contents</title>
298
299<segmentedlist>
300<segtitle>Installed Programs</segtitle>
301<segtitle>Installed Libraries</segtitle>
302<segtitle>Installed Directory</segtitle>
303<seglistitem>
304<seg>fop.sh and xalan.sh</seg>
305<seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar, xalan-2.4.1.jar,
306xercesImpl-2.2.1.jar and xml-apis.jar. <acronym>JAI</acronym> components
307include libmlib_jai.so, jai_codec.jar, jai_core.jar and
308mlibwrapper_jai.jar</seg>
309<seg>/opt/fop-&fop-version;</seg>
310</seglistitem>
311</segmentedlist>
312
313<variablelist>
314<bridgehead renderas="sect3">Short Descriptions</bridgehead>
315<?dbfo list-presentation="list"?>
316
317<varlistentry id="fop.sh">
318<term><command>fop.sh</command></term>
319<listitem><para>is a wrapper script to the <command>java</command> command
320which sets up the <application><acronym>FOP</acronym></application>
321environment and passes the required parameters.</para>
322<indexterm zone="fop fop.sh">
323<primary sortas="b-fop.sh">fop.sh</primary></indexterm>
324</listitem>
325</varlistentry>
326
327<varlistentry id="fop.jar">
328<term><filename class='libraryfile'>fop.jar</filename></term>
329<listitem><para>contains all the
330<application><acronym>FOP</acronym></application>
331<application>Java</application> classes.</para>
332<indexterm zone="fop fop.jar">
333<primary sortas="c-fop.jar">fop.jar</primary></indexterm>
334</listitem>
335</varlistentry>
336</variablelist>
337
338</sect2>
339
340</sect1>
341
Note: See TracBrowser for help on using the repository browser.