source: pst/ps/fop.xml@ de27951

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

Removed 'keywordset' blocks and extra spaces from the XML files (note this was by accident as I meant to do just in the gnome directory but I was in the root of BOOK when I ran the script, but this was going to happen anyway so I don't think it is a big deal)

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

  • Property mode set to 100644
File size: 16.1 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 "45.3 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>sed -i 's/tail +122/tail -n +122/' \
160 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
161chmod 755 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
162FOP_BUILD_DIR=$(pwd) &amp;&amp;
163cd $JAVA_HOME &amp;&amp;
164$FOP_BUILD_DIR/../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
165cd $FOP_BUILD_DIR</userinput></screen>
166
167 </sect3>
168
169 <sect3>
170 <title>Installing FOP required components</title>
171
172 <para>Install <application>FOP</application> by running the
173 following commands:</para>
174
175<screen><userinput>patch -Np1 -i ../fop-&fop-version;-jdk_1.5.0-1.patch &amp;&amp;
176./build.sh &amp;&amp;
177sed -i "s/build/lib/" fop.sh</userinput></screen>
178
179 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
180
181<screen role="root"><userinput>install -v -d -m755 \
182 /opt/fop-&fop-version;/{bin,lib,docs/{general,lib,site}} &amp;&amp;
183install -v -m755 fop.sh /opt/fop-&fop-version;/bin &amp;&amp;
184install -v -m644 build/fop.jar lib/avalon-framework-cvs-20020806.jar \
185 /opt/fop-&fop-version;/lib &amp;&amp;
186install -v -m644 docs/* /opt/fop-&fop-version;/docs &amp;&amp;
187install -v -m644 CHANGES LICENSE README ReleaseNotes.html STATUS \
188 /opt/fop-&fop-version;/docs/general &amp;&amp;
189install -v -m644 lib/{avalon.LICENSE.txt,readme} \
190 /opt/fop-&fop-version;/docs/lib &amp;&amp;
191cp -v -R build/site/* /opt/fop-&fop-version;/docs/site &amp;&amp;
192ln -svf fop-&fop-version; /opt/fop</userinput></screen>
193
194 </sect3>
195
196 <sect3>
197 <title>Installing the Batik JAR</title>
198
199 <para>You'll need to install one additional <application>Java</application>
200 class library to process SVG objects. This library is part of the
201 <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
202 also included with the <application>FOP</application> package. If you
203 have <application>Batik</application> installed, ensure the
204 <filename>batik.jar</filename> library is included in your
205 <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
206 symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
207 pointing to the full path of the installed <filename>batik.jar</filename>
208 file so that the <command>fop.sh</command> script will automatically pick it
209 up.</para>
210
211 <para>If you don't have the <application>Batik</application> package
212 installed, run the following commands as the <systemitem
213 class="username">root</systemitem> user:</para>
214
215<screen role="root"><userinput>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
216install -v -m644 lib/batik.LICENSE.txt \
217 /opt/fop-&fop-version;/docs/lib</userinput></screen>
218
219 </sect3>
220
221 <sect3>
222 <title>Installing the Xalan-Java components</title>
223
224 <para>The components of <application>FOP</application> required to
225 process FO files created by an XSL transformation engine (also known
226 as an XSLT processor) is now complete. An XSL transformation engine
227 (<command>xsltproc</command>) is included with the
228 <xref linkend="libxslt"/> package in BLFS. The
229 <application>FOP</application> package includes components of
230 <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to
231 accomplish XSL transformations. If you have the
232 <application>Xalan-Java</application> package installed, skip to
233 the next section.</para>
234
235 <para>If you wish to install the <application>Xalan-Java</application>
236 components provided by the <application>FOP</application>
237 package, run the following commands as the <systemitem
238 class="username">root</systemitem> user:</para>
239
240<screen role="root"><userinput>sed -i "s/build/lib/" xalan.sh &amp;&amp;
241install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
242install -v -m644 lib/xml-apis.jar \
243 lib/xercesImpl-2.2.1.jar \
244 lib/xalan-2.4.1.jar \
245 /opt/fop-&fop-version;/lib &amp;&amp;
246install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
247 lib/xml-apis.README.txt \
248 /opt/fop-&fop-version;/docs/lib</userinput></screen>
249
250 </sect3>
251
252 <sect3>
253 <title>Installing the Jimi SDK JAR</title>
254
255 <para>If you installed the Java Image I/O class library
256 (<application>Jimi SDK</application>) into the
257 <application>FOP</application> source tree
258 <filename class='directory'>lib</filename> directory before building
259 <application>FOP</application> (this will enable Jimi
260 support), ensure you also install this JAR file into
261 <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
262
263 </sect3>
264
265 </sect2>
266
267 <sect2 role="commands">
268 <title>Command Explanations</title>
269
270 <para><command>sed -i 's/tail +122/tail -n +122/' ...</command>:
271 The <application>JAI</application> binary file has a <command>tail</command>
272 command imbedded in the file which uses obsolete syntax and causes the
273 file to not unpack correctly. This command fixes the obsolete
274 syntax.</para>
275
276 <para><command>$FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This
277 command installs the <application>JAI</application> components
278 into the <application>JDK</application> file structure.
279 <envar>$FOP_BUILD_DIR</envar> is used as a reference point to the source
280 executable and as a method to return back to the
281 <application>FOP</application> source tree.</para>
282
283 <para><command>sed -i "s/build/lib/" ...</command>: These commands modify
284 the installed shell scripts so that the location of the installed
285 <filename>fop.jar</filename> file is correctly identified.</para>
286
287 <para><command>install -v ...; cp -v ...</command>: There is no installation
288 script provided by the <application>FOP</application>
289 package. These commands install the package.</para>
290
291 <para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
292 convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
293 changed each time there's a package version change.</para>
294
295 </sect2>
296
297 <sect2 role="configuration">
298 <title>Configuring FOP</title>
299
300 <sect3 id="fop-config">
301 <title>Config Files</title>
302
303 <para><filename>~/.foprc</filename></para>
304
305 <indexterm zone="fop fop-config">
306 <primary sortas="e-AA.foprc">~/.foprc</primary>
307 </indexterm>
308
309 </sect3>
310
311 <sect3>
312 <title>Configuration Information</title>
313
314 <para>Using <application>FOP</application> to process some large FO's
315 (including the FO derived from the BLFS XML sources), can lead to memory
316 errors. Unless you add a parameter to the <command>java</command> command
317 used in the <command>fop.sh</command> script you may receive messages
318 similar to the one shown below:</para>
319
320 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
321 Java heap space</computeroutput></para>
322
323 <para>To avoid errors like this, you need to pass an extra parameter to
324 the <command>java</command> command used in the <command>fop.sh</command>
325 script. This can be accomplished by creating a
326 <filename>~/.foprc</filename> (which is sourced by the
327 <command>fop.sh</command> script) and adding the parameter to the
328 <envar>FOP_OPTS</envar> environment variable.</para>
329
330 <para>The <command>fop.sh</command> script looks for a
331 <envar>FOP_HOME</envar> environment variable to locate the
332 <application>FOP</application> class libraries. You can create this
333 variable using the <filename>~/.foprc</filename> file as well. Create
334 a <filename>~/.foprc</filename> file using the following commands:</para>
335
336<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
337<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
338FOP_HOME="/opt/fop"</literal>
339
340EOF</userinput></screen>
341
342 <para>Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
343 number representing the amount of RAM installed in your computer (in
344 megabytes). An example would be
345 <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
346 memory issues running <application>FOP</application>, see
347 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
348
349 <para>To include the <command>fop.sh</command> script in your path,
350 update your personal or system-wide profile with the following:</para>
351
352<screen><literal>PATH=$PATH:/opt/fop/bin</literal></screen>
353
354 </sect3>
355
356 </sect2>
357
358 <sect2 role="content">
359 <title>Contents</title>
360
361 <segmentedlist>
362 <segtitle>Installed Programs</segtitle>
363 <segtitle>Installed Libraries</segtitle>
364 <segtitle>Installed Directory</segtitle>
365
366 <seglistitem>
367 <seg>fop.sh and xalan.sh</seg>
368 <seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar,
369 xalan-2.4.1.jar, xercesImpl-2.2.1.jar, and xml-apis.jar. JAI components
370 include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
371 mlibwrapper_jai.jar</seg>
372 <seg>/opt/fop-&fop-version;</seg>
373 </seglistitem>
374 </segmentedlist>
375
376 <variablelist>
377 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
378 <?dbfo list-presentation="list"?>
379 <?dbhtml list-presentation="table"?>
380
381 <varlistentry id="fop.sh">
382 <term><command>fop.sh</command></term>
383 <listitem>
384 <para>is a wrapper script to the <command>java</command> command
385 which sets up the <application>FOP</application>
386 environment and passes the required parameters.</para>
387 <indexterm zone="fop fop.sh">
388 <primary sortas="b-fop.sh">fop.sh</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="fop.jar">
394 <term><filename class='libraryfile'>fop.jar</filename></term>
395 <listitem>
396 <para>contains all the <application>FOP</application>
397 <application>Java</application> classes.</para>
398 <indexterm zone="fop fop.jar">
399 <primary sortas="c-fop.jar">fop.jar</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 </variablelist>
405
406 </sect2>
407
408</sect1>
Note: See TracBrowser for help on using the repository browser.