source: pst/ps/fop.xml@ 6182494b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 6182494b was 6634def, checked in by Pierre Labastie <pieere@…>, 8 years ago

Another small set of tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17032 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 "13b5b497dfb0ba8a01093dfc1a89d106">
10 <!ENTITY fop-size "23 MB">
11 <!ENTITY fop-buildsize "342 MB">
12 <!ENTITY fop-time "0.3 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 &lfs79_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://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html">JIMI SDK</ulink>,
132 <ulink url="http://www.xmlunit.org/">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="https://pmd.github.io/">PMD</ulink>
136 (requires <ulink url="http://jaxen.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;
215
216ant compile &amp;&amp;
217ant jar-main &amp;&amp;
218ant javadocs &amp;&amp;
219mv build/javadocs .</userinput></screen>
220
221<!-- ant docs target is not present anymore in fop-2.0
222 <para>
223 If <application>Forrest</application> is installed,
224 build the full set of documentation:
225 </para>
226
227<screen><userinput>ant docs</userinput></screen>
228-->
229 <para>
230 To test the application, run <command>ant junit-all</command>. The
231 hyphenation tests will fail. To see a list of other test targets, use
232 <command>ant -p</command>. You must run the tests from an X-window using
233 a GL-aware <application>Xorg</application> server or some of the
234 <application>JUnit</application> tests will hang.
235 </para>
236
237 <para>
238 Now, as the <systemitem class="username">root</systemitem> user:
239 </para>
240
241<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
242cp -v KEYS LICENSE NOTICE README /opt/fop-&fop-version; &amp;&amp;
243cp -va build conf examples fop* javadocs lib /opt/fop-&fop-version; &amp;&amp;
244
245ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
246
247 </sect3>
248
249 </sect2>
250
251 <sect2 role="commands">
252 <title>Command Explanations</title>
253
254 <para>
255 <command>ant <option>target</option></command>: This reads the file
256 <filename>build.xml</filename> and builds the target files.
257 </para>
258
259 <para>
260 <command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
261 optional and creates a convenience symlink so that
262 <envar>$FOP_HOME</envar> doesn't have to be changed each time there's a
263 package version change.
264 </para>
265
266 </sect2>
267
268 <sect2 role="configuration">
269 <title>Configuring fop</title>
270
271 <sect3 id="fop-config">
272 <title>Config Files</title>
273
274 <para>
275 <filename>~/.foprc</filename>
276 </para>
277
278 <indexterm zone="fop fop-config">
279 <primary sortas="e-AA.foprc">~/.foprc</primary>
280 </indexterm>
281
282 </sect3>
283
284 <sect3>
285 <title>Configuration Information</title>
286
287 <para>
288 Using <application>fop</application> to process some large FO's
289 (including the FO derived from the BLFS XML sources), can lead to
290 memory errors. Unless you add a parameter to the
291 <command>java</command> command used in the <command>fop</command>
292 script you may receive messages similar to the one shown below:
293 </para>
294
295 <para>
296 <computeroutput>
297 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
298 space
299 </computeroutput>
300 </para>
301
302 <para>
303 To avoid errors like this, you need to pass an extra parameter to
304 the <command>java</command> command used in the <command>fop</command>
305 script. This can be accomplished by creating a
306 <filename>~/.foprc</filename> (which is sourced by the
307 <command>fop</command> script) and adding the parameter to the
308 <envar>FOP_OPTS</envar> environment variable.
309 </para>
310
311 <para>
312 The <command>fop</command> script looks for a
313 <envar>FOP_HOME</envar> environment variable to locate the
314 <application>fop</application> class libraries. You can create this
315 variable using the <filename>~/.foprc</filename> file as well. Create
316 a <filename>~/.foprc</filename> file using the following commands:
317 </para>
318
319<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
320<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
321FOP_HOME="/opt/fop"</literal>
322EOF</userinput></screen>
323
324 <para>
325 Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
326 number representing the amount of RAM installed in your computer (in
327 megabytes). An example would be
328 <userinput>FOP_OPTS="-Xmx768m"</userinput>.
329 <!-- the URL is broken
330 For more information about
331 memory issues running <application>fop</application>, see
332 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.
333 -->
334 </para>
335
336 <para>
337 To include the <command>fop</command> script in your path,
338 update your personal or system-wide profile with the following:
339 </para>
340
341<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
342
343 <note>
344 <para>
345 Running <command>fop</command> can be somewhat verbose.
346 The default logging level can be changed from INFO to any of
347 FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF.
348 To do this, edit
349 <filename>$JAVA_HOME/jre/lib/logging.properties</filename> and change
350 the entries for <option>.leval</option> and
351 <option>java.util.logging.ConsoleHandler.level</option> to
352 the desired value.
353 </para>
354 </note>
355
356 </sect3>
357
358 </sect2>
359
360 <sect2 role="content">
361 <title>Contents</title>
362
363 <segmentedlist>
364 <segtitle>Installed Programs</segtitle>
365 <segtitle>Installed Libraries</segtitle>
366 <segtitle>Installed Directory</segtitle>
367
368 <seglistitem>
369 <seg>fop</seg>
370 <seg>fop.jar and numerous support library classes located in
371 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
372 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
373 mlibwrapper_jai.jar</seg>
374 <seg>/opt/fop-&fop-version;</seg>
375 </seglistitem>
376 </segmentedlist>
377
378 <variablelist>
379 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
380 <?dbfo list-presentation="list"?>
381 <?dbhtml list-presentation="table"?>
382
383 <varlistentry id="fop-prog">
384 <term><command>fop</command></term>
385 <listitem>
386 <para>is a wrapper script to the <command>java</command> command
387 which sets up the <application>fop</application>
388 environment and passes the required parameters.</para>
389 <indexterm zone="fop fop-prog">
390 <primary sortas="b-fop">fop</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="fop.jar">
396 <term><filename class='libraryfile'>fop.jar</filename></term>
397 <listitem>
398 <para>contains all the <application>fop</application>
399 <application>Java</application> classes.</para>
400 <indexterm zone="fop fop.jar">
401 <primary sortas="c-fop.jar">fop.jar</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 </variablelist>
407
408 </sect2>
409
410</sect1>
Note: See TracBrowser for help on using the repository browser.