source: pst/ps/fop.xml@ 91a9ba6

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 91a9ba6 was 91a9ba6, checked in by Randy McMurchy <randy@…>, 13 years ago

Fixed typos in the FOP instructions

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

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