source: pst/ps/fop.xml@ 977061b0

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 977061b0 was 977061b0, checked in by Randy McMurchy <randy@…>, 18 years ago

Added the 'User Notes' wiki link to each package page; changed all instances of .[so,a] to .{so,a} (brackets changed to braces); changed all replaceable tags to use angle brackets instead of square brackets to encapsulate the text - commit #8

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

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