source: pst/ps/fop.xml@ 7e8964e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7e8964e was 0ebd681c, checked in by Pierre Labastie <pieere@…>, 9 years ago

Update to FOP-2.0 (and tidy up changelog source)

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

  • Property mode set to 100644
File size: 14.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 "https://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
8 <!ENTITY fop-download-ftp " ">
9 <!ENTITY fop-md5sum "754e5307a73433afb5c4c9b11d45e302">
10 <!ENTITY fop-size "22 MB">
11 <!ENTITY fop-buildsize "206 MB">
12 <!ENTITY fop-time "0.5 SBU">
13
14 <!ENTITY jai-version "1_1_3">
15 <!ENTITY jai-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-i586.tar.gz">
16 <!ENTITY jai-md5sum "a2cbc155ef3899bcde9c74a8035764b3">
17 <!ENTITY jai-size "3.4 MB">
18
19 <!ENTITY jai64-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-amd64.tar.gz">
20 <!ENTITY jai64-md5sum "4a906db35612f668aeef2c0606d7075b">
21 <!ENTITY jai64-size "3.4 MB">
22<!--
23 <!ENTITY offo-download "&sourceforge-repo;/offo/offo-hyphenation_v2.0.zip">
24 <!ENTITY offo-md5sum "a78171d47c9af223c51bbd42df36f26d">
25 <!ENTITY offo-size "858 KB">
26-->
27]>
28
29<sect1 id="fop" xreflabel="fop-&fop-version;">
30 <?dbhtml filename="fop.html"?>
31
32 <sect1info>
33 <othername>$LastChangedBy$</othername>
34 <date>$Date$</date>
35 </sect1info>
36
37 <title>fop-&fop-version;</title>
38
39 <indexterm zone="fop">
40 <primary sortas="a-fop">fop</primary>
41 </indexterm>
42
43 <sect2 role="package">
44 <title>Introduction to fop</title>
45
46 <para>
47 The <application>FOP</application> (Formatting Objects Processor)
48 package contains a print formatter driven by XSL formatting objects
49 (XSL-FO). It is a <application>Java</application> application that reads
50 a formatting object tree and renders the resulting pages to a specified
51 output. Output formats currently supported include PDF, PCL, PostScript,
52 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
53 primary output target is PDF.
54 </para>
55
56 &lfs78_checked;
57
58 <bridgehead renderas="sect3">Package Information</bridgehead>
59 <itemizedlist spacing="compact">
60 <listitem>
61 <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
62 </listitem>
63 <listitem>
64 <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
65 </listitem>
66 <listitem>
67 <para>Download MD5 sum: &fop-md5sum;</para>
68 </listitem>
69 <listitem>
70 <para>Download size: &fop-size;</para>
71 </listitem>
72 <listitem>
73 <para>Estimated disk space required: &fop-buildsize;</para>
74 </listitem>
75 <listitem>
76 <para>Estimated build time: &fop-time;</para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81 <itemizedlist spacing="compact">
82 <title>Recommended packages</title>
83
84<!--
85 <listitem>
86 <para>Objects for Formatting Objects (OFFO) hyphenation patterns:
87 <simplelist>
88 <member><ulink url="&offo-download;"/></member>
89 <member>&offo-md5sum;</member>
90 <member>&offo-size;</member>
91 </simplelist>
92 </para>
93 </listitem>
94-->
95 <listitem>
96 <para>Java Advanced Imaging (JAI) API components (architecture dependent):
97 <simplelist>
98 <member><ulink url="&jai-download;"/></member>
99 <member>&jai-md5sum;</member>
100 <member>&jai-size;</member>
101 </simplelist>
102 <literallayout>or</literallayout> <!-- Force some space -->
103 <simplelist>
104 <member><ulink url="&jai64-download;"/></member>
105 <member>&jai64-md5sum;</member>
106 <member>&jai64-size;</member>
107 </simplelist>
108 </para>
109 </listitem>
110 </itemizedlist>
111 <itemizedlist spacing="compact">
112 <title>Required patch</title>
113 <listitem>
114 <para>
115 <ulink url="&patch-root;/fop-&fop-version;-listNPE-1.patch"/>
116 </para>
117 </listitem>
118 </itemizedlist>
119
120 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
121
122 <bridgehead renderas="sect4">Required</bridgehead>
123 <para role="required">
124 <xref linkend="apache-ant"/>
125 </para>
126
127 <bridgehead renderas="sect4">Optional</bridgehead>
128 <para role="optional">
129 <xref linkend="junit"/> (to run tests),
130 <xref linkend="x-window-system"/> (to run tests),
131 <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
132 <ulink url="http://xmlunit.sourceforge.net/">XMLUnit</ulink>,
133 <ulink url="https://java.net/projects/jai-imageio">JAI Image I/O Tools</ulink>,
134 <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>,
135 <ulink url="http://pmd.sourceforge.net">PMD</ulink>
136 (requires <ulink url="http://jaxen.codehaus.org/">Jaxen</ulink>), and
137 <ulink url="http://forrest.apache.org/">Forrest</ulink> (Forrest used only
138 to build the documentation)
139 </para>
140
141 <para condition="html" role="usernotes">User Notes:
142 <ulink url="&blfs-wiki;/fop"/></para>
143
144 </sect2>
145
146 <sect2 role="installation">
147 <title>Installation of fop</title>
148
149 <para>
150 Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
151 the build. To build the <application>JIMI SDK</application> and/or
152 <application>XMLUnit</application> extension classes, ensure the
153 corresponding <filename class='extension'>.jar</filename> files can be
154 found via the <envar>CLASSPATH</envar> environment variable.
155 </para>
156<!--
157 <sect3>
158 <title>Installing OFFO Hyphenation Patterns</title>
159
160 <para>
161 First, unpack the <application>fop</application> source tarball and
162 the hyphenation zipfile from the same directory, then change directories
163 into the root of the <application>fop</application> source tree. Copy
164 the XML hyphenation patterns into the <application>fop</application>
165 source tree by running the following commands:
166 </para>
167
168<screen><userinput>cp ../offo-hyphenation/hyph/* hyph &amp;&amp;
169rm -rf ../offo-hyphenation</userinput></screen>
170
171 </sect3>
172-->
173 <sect3>
174 <title>Installing Java Advanced Imaging (JAI) API components</title>
175
176 <para>
177 Install the JAI API components. As the <systemitem
178 class="username">root</systemitem> user:
179 </para>
180
181<screen role="root"><userinput>case `uname -m` in
182 i?86)
183 tar -xf ../jai-&jai-version;-lib-linux-i586.tar.gz
184 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
185 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/i386/
186 ;;
187
188 x86_64)
189 tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
190 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
191 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/amd64/
192 ;;
193esac</userinput></screen>
194 </sect3>
195
196 <sect3>
197 <title>Installing fop Components</title>
198
199 <para>
200 The <command>javadoc</command> command coming with OpenJDK 8 has
201 become much stricter than before regarding the conformance of the
202 Javadoc comments in source code to HTML. The FOP documentation does
203 not meet those standard, so the conformance checks have to be
204 disabled. This can be done with the following command:
205 </para>
206
207<screen><userinput>sed -i '\@&lt;/javad@i&lt;arg value="-Xdoclint:none"/&gt;' build.xml</userinput></screen>
208
209 <para>
210 Then, compile <application>fop</application> by running the
211 following commands:
212 </para>
213
214<screen><userinput>patch -Np1 -i ../fop-&fop-version;-listNPE-1.patch &amp;&amp;
215ant compile &amp;&amp;
216ant jar-main &amp;&amp;
217ant javadocs &amp;&amp;
218mv build/javadocs .</userinput></screen>
219
220<!-- ant docs target is not present anymore in fop-2.0
221 <para>
222 If <application>Forrest</application> is installed,
223 build the full set of documentation:
224 </para>
225
226<screen><userinput>ant docs</userinput></screen>
227-->
228 <para>
229 To test the application, run <command>ant junit-all</command>. The
230 hyphenation tests will fail. To see a list of other test targets, use
231 <command>ant -p</command>. You must run the tests from an X-window using
232 a GL-aware <application>Xorg</application> server or some of the
233 <application>JUnit</application> tests will hang.
234 </para>
235
236 <para>
237 Now, as the <systemitem class="username">root</systemitem> user:
238 </para>
239
240<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
241cp -v KEYS LICENSE NOTICE README /opt/fop-&fop-version; &amp;&amp;
242cp -va build conf examples fop* javadocs lib status.xml /opt/fop-&fop-version; &amp;&amp;
243
244ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
245
246 </sect3>
247
248 </sect2>
249
250 <sect2 role="commands">
251 <title>Command Explanations</title>
252
253 <para>
254 <command>ant <option>target</option></command>: This reads the file
255 <filename>build.xml</filename> and builds the target files.
256 </para>
257
258 <para>
259 <command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
260 optional and creates a convenience symlink so that
261 <envar>$FOP_HOME</envar> doesn't have to be changed each time there's a
262 package version change.
263 </para>
264
265 </sect2>
266
267 <sect2 role="configuration">
268 <title>Configuring fop</title>
269
270 <sect3 id="fop-config">
271 <title>Config Files</title>
272
273 <para>
274 <filename>~/.foprc</filename>
275 </para>
276
277 <indexterm zone="fop fop-config">
278 <primary sortas="e-AA.foprc">~/.foprc</primary>
279 </indexterm>
280
281 </sect3>
282
283 <sect3>
284 <title>Configuration Information</title>
285
286 <para>
287 Using <application>fop</application> to process some large FO's
288 (including the FO derived from the BLFS XML sources), can lead to
289 memory errors. Unless you add a parameter to the
290 <command>java</command> command used in the <command>fop</command>
291 script you may receive messages similar to the one shown below:
292 </para>
293
294 <para>
295 <computeroutput>
296 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
297 space
298 </computeroutput>
299 </para>
300
301 <para>
302 To avoid errors like this, you need to pass an extra parameter to
303 the <command>java</command> command used in the <command>fop</command>
304 script. This can be accomplished by creating a
305 <filename>~/.foprc</filename> (which is sourced by the
306 <command>fop</command> script) and adding the parameter to the
307 <envar>FOP_OPTS</envar> environment variable.
308 </para>
309
310 <para>
311 The <command>fop</command> script looks for a
312 <envar>FOP_HOME</envar> environment variable to locate the
313 <application>fop</application> class libraries. You can create this
314 variable using the <filename>~/.foprc</filename> file as well. Create
315 a <filename>~/.foprc</filename> file using the following commands:
316 </para>
317
318<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
319<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
320FOP_HOME="/opt/fop"</literal>
321EOF</userinput></screen>
322
323 <para>
324 Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
325 number representing the amount of RAM installed in your computer (in
326 megabytes). An example would be
327 <userinput>FOP_OPTS="-Xmx768m"</userinput>.
328 <!-- the URL is broken
329 For more information about
330 memory issues running <application>fop</application>, see
331 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.
332 -->
333 </para>
334
335 <para>
336 To include the <command>fop</command> script in your path,
337 update your personal or system-wide profile with the following:
338 </para>
339
340<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
341
342 <note>
343 <para>
344 Running <command>fop</command> can be somewhat verbose.
345 The default logging level can be changed from INFO to any of
346 FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF.
347 To do this, edit
348 <filename>$JAVA_HOME/jre/lib/logging.properties</filename> and change
349 the entries for <option>.leval</option> and
350 <option>java.util.logging.ConsoleHandler.level</option> to
351 the desired value.
352 </para>
353 </note>
354
355 </sect3>
356
357 </sect2>
358
359 <sect2 role="content">
360 <title>Contents</title>
361
362 <segmentedlist>
363 <segtitle>Installed Programs</segtitle>
364 <segtitle>Installed Libraries</segtitle>
365 <segtitle>Installed Directory</segtitle>
366
367 <seglistitem>
368 <seg>fop</seg>
369 <seg>fop.jar and numerous support library classes located in
370 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
371 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
372 mlibwrapper_jai.jar</seg>
373 <seg>/opt/fop-&fop-version;</seg>
374 </seglistitem>
375 </segmentedlist>
376
377 <variablelist>
378 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
379 <?dbfo list-presentation="list"?>
380 <?dbhtml list-presentation="table"?>
381
382 <varlistentry id="fop-prog">
383 <term><command>fop</command></term>
384 <listitem>
385 <para>is a wrapper script to the <command>java</command> command
386 which sets up the <application>fop</application>
387 environment and passes the required parameters.</para>
388 <indexterm zone="fop fop-prog">
389 <primary sortas="b-fop">fop</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="fop.jar">
395 <term><filename class='libraryfile'>fop.jar</filename></term>
396 <listitem>
397 <para>contains all the <application>fop</application>
398 <application>Java</application> classes.</para>
399 <indexterm zone="fop fop.jar">
400 <primary sortas="c-fop.jar">fop.jar</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 </variablelist>
406
407 </sect2>
408
409</sect1>
Note: See TracBrowser for help on using the repository browser.