source: pst/ps/fop.xml@ fda88cea

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.7 7.8 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 fda88cea was fda88cea, checked in by Pierre Labastie <pieere@…>, 9 years ago

Tags

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

  • Property mode set to 100644
File size: 13.8 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 "7b63af514b28c06fe710a794cbf4d68e">
10 <!ENTITY fop-size "23 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 &lfs77_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>Required 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
112 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
113
114 <bridgehead renderas="sect4">Required</bridgehead>
115 <para role="required">
116 <xref linkend="apache-ant"/>
117 </para>
118
119 <bridgehead renderas="sect4">Optional</bridgehead>
120 <para role="optional">
121 <xref linkend="junit"/> (to run tests),
122 <xref linkend="x-window-system"/> (to run tests),
123 <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
124 <ulink url="http://xmlunit.sourceforge.net/">XMLUnit</ulink>,
125 <ulink url="https://java.net/projects/jai-imageio">JAI Image I/O Tools</ulink>,
126 <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>,
127 <ulink url="http://pmd.sourceforge.net">PMD</ulink>
128 (requires <ulink url="http://jaxen.codehaus.org/">Jaxen</ulink>), and
129 <ulink url="http://forrest.apache.org/">Forrest</ulink> (Forrest used only
130 to build the documentation)
131 </para>
132
133 <para condition="html" role="usernotes">User Notes:
134 <ulink url="&blfs-wiki;/fop"/></para>
135
136 </sect2>
137
138 <sect2 role="installation">
139 <title>Installation of fop</title>
140
141 <para>
142 Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
143 the build. To build the <application>JIMI SDK</application> and/or
144 <application>XMLUnit</application> extension classes, ensure the
145 corresponding <filename class='extension'>.jar</filename> files can be
146 found via the <envar>CLASSPATH</envar> environment variable.
147 </para>
148<!--
149 <sect3>
150 <title>Installing OFFO Hyphenation Patterns</title>
151
152 <para>
153 First, unpack the <application>fop</application> source tarball and
154 the hyphenation zipfile from the same directory, then change directories
155 into the root of the <application>fop</application> source tree. Copy
156 the XML hyphenation patterns into the <application>fop</application>
157 source tree by running the following commands:
158 </para>
159
160<screen><userinput>cp ../offo-hyphenation/hyph/* hyph &amp;&amp;
161rm -rf ../offo-hyphenation</userinput></screen>
162
163 </sect3>
164-->
165 <sect3>
166 <title>Installing Java Advanced Imaging (JAI) API components</title>
167
168 <para>
169 Install the JAI API components. As the <systemitem
170 class="username">root</systemitem> user:
171 </para>
172
173<screen role="root"><userinput>case `uname -m` in
174 i?86)
175 tar -xf ../jai-&jai-version;-lib-linux-i586.tar.gz
176 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
177 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/i386/
178 ;;
179
180 x86_64)
181 tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
182 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
183 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/amd64/
184 ;;
185esac</userinput></screen>
186 </sect3>
187
188 <sect3>
189 <title>Installing fop Components</title>
190
191 <para>
192 The <command>javadoc</command> command coming with OpenJDK 8 has
193 become much stricter than before regarding the conformance of the
194 Javadoc comments in source code to HTML. The FOP documentation does
195 not meet those standard, so the conformance checks have to be
196 disabled. This can be done with the following command:
197 </para>
198
199<screen><userinput>sed -i '\@&lt;/javad@i&lt;arg value="-Xdoclint:none"/&gt;' build.xml</userinput></screen>
200
201 <para>
202 Then, compile <application>fop</application> by running the
203 following commands:
204 </para>
205
206<screen><userinput>ant compile &amp;&amp;
207ant jar-main &amp;&amp;
208ant javadocs &amp;&amp;
209mv build/javadocs .</userinput></screen>
210
211 <para>
212 If <application>Forrest</application> is installed,
213 build the full set of documentation:
214 </para>
215
216<screen><userinput>ant docs</userinput></screen>
217
218 <para>
219 To test the application, run <command>ant junit-all</command>. The
220 hyphenation tests will fail. To see a list of other test targets, use
221 <command>ant -p</command>. You must run the tests from an X-window using
222 a GL-aware <application>Xorg</application> server or some of the
223 <application>JUnit</application> tests will hang.
224 </para>
225
226 <para>
227 Now, as the <systemitem class="username">root</systemitem> user:
228 </para>
229
230<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
231cp -v KEYS LICENSE NOTICE README /opt/fop-&fop-version; &amp;&amp;
232cp -va build conf examples fop* javadocs lib status.xml /opt/fop-&fop-version; &amp;&amp;
233
234ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
235
236 </sect3>
237
238 </sect2>
239
240 <sect2 role="commands">
241 <title>Command Explanations</title>
242
243 <para>
244 <command>ant <option>target</option></command>: This reads the file
245 <filename>build.xml</filename> and builds the target files.
246 </para>
247
248 <para>
249 <command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
250 optional and creates a convenience symlink so that
251 <envar>$FOP_HOME</envar> doesn't have to be changed each time there's a
252 package version change.
253 </para>
254
255 </sect2>
256
257 <sect2 role="configuration">
258 <title>Configuring fop</title>
259
260 <sect3 id="fop-config">
261 <title>Config Files</title>
262
263 <para>
264 <filename>~/.foprc</filename>
265 </para>
266
267 <indexterm zone="fop fop-config">
268 <primary sortas="e-AA.foprc">~/.foprc</primary>
269 </indexterm>
270
271 </sect3>
272
273 <sect3>
274 <title>Configuration Information</title>
275
276 <para>
277 Using <application>fop</application> to process some large FO's
278 (including the FO derived from the BLFS XML sources), can lead to
279 memory errors. Unless you add a parameter to the
280 <command>java</command> command used in the <command>fop</command>
281 script you may receive messages similar to the one shown below:
282 </para>
283
284 <para>
285 <computeroutput>
286 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
287 space
288 </computeroutput>
289 </para>
290
291 <para>
292 To avoid errors like this, you need to pass an extra parameter to
293 the <command>java</command> command used in the <command>fop</command>
294 script. This can be accomplished by creating a
295 <filename>~/.foprc</filename> (which is sourced by the
296 <command>fop</command> script) and adding the parameter to the
297 <envar>FOP_OPTS</envar> environment variable.
298 </para>
299
300 <para>
301 The <command>fop</command> script looks for a
302 <envar>FOP_HOME</envar> environment variable to locate the
303 <application>fop</application> class libraries. You can create this
304 variable using the <filename>~/.foprc</filename> file as well. Create
305 a <filename>~/.foprc</filename> file using the following commands:
306 </para>
307
308<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
309<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
310FOP_HOME="/opt/fop"</literal>
311EOF</userinput></screen>
312
313 <para>
314 Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
315 number representing the amount of RAM installed in your computer (in
316 megabytes). An example would be
317 <userinput>FOP_OPTS="-Xmx768m"</userinput>.
318 <!-- the URL is broken
319 For more information about
320 memory issues running <application>fop</application>, see
321 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.
322 -->
323 </para>
324
325 <para>
326 To include the <command>fop</command> script in your path,
327 update your personal or system-wide profile with the following:
328 </para>
329
330<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
331
332 <note>
333 <para>
334 Running <command>fop</command> can be somewhat verbose.
335 The default logging level can be changed from INFO to any of
336 FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF.
337 To do this, edit
338 <filename>$JAVA_HOME/jre/lib/logging.properties</filename> and change
339 the entries for <option>.leval</option> and
340 <option>java.util.logging.ConsoleHandler.level</option> to
341 the desired value.
342 </para>
343 </note>
344
345 </sect3>
346
347 </sect2>
348
349 <sect2 role="content">
350 <title>Contents</title>
351
352 <segmentedlist>
353 <segtitle>Installed Programs</segtitle>
354 <segtitle>Installed Libraries</segtitle>
355 <segtitle>Installed Directory</segtitle>
356
357 <seglistitem>
358 <seg>fop</seg>
359 <seg>fop.jar and numerous support library classes located in
360 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
361 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
362 mlibwrapper_jai.jar</seg>
363 <seg>/opt/fop-&fop-version;</seg>
364 </seglistitem>
365 </segmentedlist>
366
367 <variablelist>
368 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
369 <?dbfo list-presentation="list"?>
370 <?dbhtml list-presentation="table"?>
371
372 <varlistentry id="fop-prog">
373 <term><command>fop</command></term>
374 <listitem>
375 <para>is a wrapper script to the <command>java</command> command
376 which sets up the <application>fop</application>
377 environment and passes the required parameters.</para>
378 <indexterm zone="fop fop-prog">
379 <primary sortas="b-fop">fop</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="fop.jar">
385 <term><filename class='libraryfile'>fop.jar</filename></term>
386 <listitem>
387 <para>contains all the <application>fop</application>
388 <application>Java</application> classes.</para>
389 <indexterm zone="fop fop.jar">
390 <primary sortas="c-fop.jar">fop.jar</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 </variablelist>
396
397 </sect2>
398
399</sect1>
Note: See TracBrowser for help on using the repository browser.