source: pst/ps/fop.xml@ 48bd327

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

Updated to FOP-1.0

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

  • Property mode set to 100644
File size: 13.7 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 "95dcc4c2dd08b4bc88ce9ce1ee88c439">
11 <!ENTITY fop-size "16.1 MB">
12 <!ENTITY fop-buildsize "360 MB">
13 <!ENTITY fop-time "2.8 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_v2.0.zip">
21 <!ENTITY offo-md5sum "a78171d47c9af223c51bbd42df36f26d">
22 <!ENTITY offo-size "858 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>,
115 <ulink url="https://jai-imageio.dev.java.net/">JAI Image I/O Tools</ulink>,
116 <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>,
117 <ulink url="http://pmd.sourceforge.net">PMD</ulink>
118 (requires <ulink url="http://jaxen.codehaus.org/">Jaxen</ulink>), and
119 <ulink url="http://forrest.apache.org/">Forrest</ulink> (Forrest used only
120 to rebuild 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 <important>
131 <para>You must run this installation from an X-window using a GL-aware
132 <application>Xorg</application> server or some of the
133 <application>JUnit</application> tests will hang. Using an X-window from
134 the console is the preferred method.</para>
135 </important>
136
137 <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
138 the build. To build the <application>JIMI SDK</application> and/or
139 <application>XMLUnit</application> extension classes, ensure the
140 corresponding <filename class='extension'>.jar</filename> files are
141 identified in the <envar>CLASSPATH</envar> environment variable.</para>
142
143 <sect3>
144 <title>Installing OFFO Hyphenation Patterns</title>
145
146 <para>Before beginning the build, unpack the
147 <application>FOP</application> source tarball and the hyphenation zipfile
148 from the same directory, then change directories into the root of the
149 <application>FOP</application> source tree. Copy the XML hyphenation
150 patterns into the <application>FOP</application> source tree by
151 running the following commands:</para>
152
153<screen><userinput>cp ../offo-hyphenation/hyph/* hyph &amp;&amp;
154rm -rf ../offo-hyphenation</userinput></screen>
155
156 </sect3>
157
158 <sect3>
159 <title>Installing JAI</title>
160
161 <tip>
162 <para>The <command>$FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin</command>
163 command below installs the JAI components in the JDK tree. You will be
164 required to view, and then accept (by entering a <keycap>y</keycap>
165 keypress), a license agreement before the installation will continue.
166 If you are scripting (automating) the build, you'll need to account for
167 this. There is information about automating build commands in the
168 <xref linkend="automating-builds"/> section of Chapter 2. Towards the
169 end of this section, specific information for automating this type of
170 installation is discussed.</para>
171 </tip>
172
173 <para>Install the JAI components by running the following commands as
174 the <systemitem class="username">root</systemitem> user while in the
175 root of the <application>FOP</application> source tree:</para>
176
177<!-- JAI make tail +nnn only for SunOS now
178<screen role="root"><userinput>install -m755 ../jai-&jai-version;-lib-linux-i586-jdk.bin JAI.bin &amp;&amp;
179sed -i 's/tail +122/tail -n +122/' JAI.bin &amp;&amp;
180-->
181<screen role="root"><userinput>FOP_PKG_DIR=$(pwd)/.. &amp;&amp;
182pushd $JAVA_HOME &amp;&amp;
183sh $FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin &amp;&amp;
184popd</userinput></screen>
185
186 </sect3>
187
188 <sect3>
189 <title>Installing FOP Components</title>
190
191 <para>If <application>Forrest</application> is not installed, remove
192 a reference to it in the build.xml:</para>
193
194<screen><userinput>sed -i -e "s/all,javadocs,docs/all,javadocs/" \
195 -e '\#${dist.bin.result.dir}/docs#,\#&lt;/copy&gt;#d' build.xml</userinput></screen>
196
197 <para>Compile <application>FOP</application> by running the
198 following commands:</para>
199
200<screen><userinput>ant dist</userinput></screen>
201
202 <para>The unit regression tests were performed in the build step
203 above.</para>
204
205 <para>Now, as the <systemitem class="username">root</systemitem>
206 user:</para>
207
208<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
209mv -v dist-bin/fop-&fop-version;/* /opt/fop-&fop-version; &amp;&amp;
210ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
211
212 </sect3>
213
214 </sect2>
215
216 <sect2 role="commands">
217 <title>Command Explanations</title>
218
219 <para><command>FOP_PKG_DIR=$(pwd)/..</command>: This assumes that the
220 source packages are stored one level above the current working directory.
221 This is always the default; but may be different because of personal
222 taste. If necessary, change this to match the directory where the
223 <application>FOP</application> tarball can be found.</para>
224
225 <para><command>sh
226 $FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin</command>: This
227 command installs the <application>JAI</application> components
228 into the <application>JDK</application> file structure.
229 <envar>$FOP_PKG_DIR</envar> is used as a reference point to the source
230 executable.</para>
231
232 <para><command>ant dist</command>: This reads the
233 <filename>build.xml</filename> file's <option>dist</option> target,
234 builds the package and runs the unit regression tests. It also creates the
235 Java API documentation and a directory where the newly created binaries
236 are placed. This directory is used to install <application>FOP</application>
237 into its final place.</para>
238
239 <para><command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
240 optional and creates a convenience symlink so that <envar>$FOP_HOME</envar>
241 doesn't have to be changed each time there's a package version change.</para>
242
243 </sect2>
244
245 <sect2 role="configuration">
246 <title>Configuring FOP</title>
247
248 <sect3 id="fop-config">
249 <title>Config Files</title>
250
251 <para><filename>~/.foprc</filename></para>
252
253 <indexterm zone="fop fop-config">
254 <primary sortas="e-AA.foprc">~/.foprc</primary>
255 </indexterm>
256
257 </sect3>
258
259 <sect3>
260 <title>Configuration Information</title>
261
262 <para>Using <application>FOP</application> to process some large FO's
263 (including the FO derived from the BLFS XML sources), can lead to memory
264 errors. Unless you add a parameter to the <command>java</command> command
265 used in the <command>fop</command> script you may receive messages
266 similar to the one shown below:</para>
267
268 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
269 Java heap space</computeroutput></para>
270
271 <para>To avoid errors like this, you need to pass an extra parameter to
272 the <command>java</command> command used in the <command>fop</command>
273 script. This can be accomplished by creating a
274 <filename>~/.foprc</filename> (which is sourced by the
275 <command>fop</command> script) and adding the parameter to the
276 <envar>FOP_OPTS</envar> environment variable.</para>
277
278 <para>The <command>fop</command> script looks for a
279 <envar>FOP_HOME</envar> environment variable to locate the
280 <application>FOP</application> class libraries. You can create this
281 variable using the <filename>~/.foprc</filename> file as well. Create
282 a <filename>~/.foprc</filename> file using the following commands:</para>
283
284<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
285<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
286FOP_HOME="/opt/fop"</literal>
287
288EOF</userinput></screen>
289
290 <para>Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
291 number representing the amount of RAM installed in your computer (in
292 megabytes). An example would be
293 <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
294 memory issues running <application>FOP</application>, see
295 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
296
297 <para>To include the <command>fop</command> script in your path,
298 update your personal or system-wide profile with the following:</para>
299
300<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
301
302 </sect3>
303
304 </sect2>
305
306 <sect2 role="content">
307 <title>Contents</title>
308
309 <segmentedlist>
310 <segtitle>Installed Programs</segtitle>
311 <segtitle>Installed Libraries</segtitle>
312 <segtitle>Installed Directory</segtitle>
313
314 <seglistitem>
315 <seg>fop</seg>
316 <seg>fop.jar and numerous support library classes located in
317 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
318 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
319 mlibwrapper_jai.jar</seg>
320 <seg>/opt/fop-&fop-version;</seg>
321 </seglistitem>
322 </segmentedlist>
323
324 <variablelist>
325 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
326 <?dbfo list-presentation="list"?>
327 <?dbhtml list-presentation="table"?>
328
329 <varlistentry id="fop-prog">
330 <term><command>fop</command></term>
331 <listitem>
332 <para>is a wrapper script to the <command>java</command> command
333 which sets up the <application>FOP</application>
334 environment and passes the required parameters.</para>
335 <indexterm zone="fop fop-prog">
336 <primary sortas="b-fop">fop</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="fop.jar">
342 <term><filename class='libraryfile'>fop.jar</filename></term>
343 <listitem>
344 <para>contains all the <application>FOP</application>
345 <application>Java</application> classes.</para>
346 <indexterm zone="fop fop.jar">
347 <primary sortas="c-fop.jar">fop.jar</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 </variablelist>
353
354 </sect2>
355
356</sect1>
Note: See TracBrowser for help on using the repository browser.