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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 7e7e322 was 7e7e322, checked in by Pierre Labastie <pieere@…>, 4 years ago

Few tags but many SBUs...

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

  • Property mode set to 100644
File size: 15.5 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 "5e7e87ef12845d31bce7a1fe8d61f501">
10 <!ENTITY fop-size "26 MB">
11 <!ENTITY fop-buildsize "491 MB ">
12 <!ENTITY fop-time "0.4 SBU">
13
14 <!ENTITY pdfbox-version "2.0.19">
15 <!ENTITY pdfbox-download "http://mirror.reverse.net/pub/apache/pdfbox/&pdfbox-version;/pdfbox-&pdfbox-version;.jar">
16 <!ENTITY pdfbox-md5sum "1c085389e055c957b07c25c8443de728">
17 <!ENTITY pdfbox-size "2.6 MB">
18
19 <!ENTITY fontbox-download "http://mirror.reverse.net/pub/apache/pdfbox/&pdfbox-version;/fontbox-&pdfbox-version;.jar">
20 <!ENTITY fontbox-md5sum "74b3b8ee7eef40b0aff5ca5aa07d96f7">
21 <!ENTITY fontbox-size "1.5 MB">
22
23 <!ENTITY maven-major "3">
24 <!ENTITY maven-version "3.6.3">
25 <!ENTITY maven-download "http://mirror.reverse.net/pub/apache/maven/maven-&maven-major;/&maven-version;/binaries/apache-maven-&maven-version;-bin.tar.gz">
26 <!ENTITY maven-md5sum "9792c717f5845d952907d5144b8253c3">
27 <!ENTITY maven-size "9 MB (additionally, about 100 MB are downloaded to the building user's directory)">
28
29 <!ENTITY offo-download "&sourceforge-dl;/offo/2.2/offo-hyphenation.zip">
30 <!ENTITY offo-md5sum "bf9c09bf05108ef9661b8f08d91c2336">
31 <!ENTITY offo-size "862 KB">
32]>
33
34<sect1 id="fop" xreflabel="fop-&fop-version;">
35 <?dbhtml filename="fop.html"?>
36
37 <sect1info>
38 <othername>$LastChangedBy$</othername>
39 <date>$Date$</date>
40 </sect1info>
41
42 <title>fop-&fop-version;</title>
43
44 <indexterm zone="fop">
45 <primary sortas="a-fop">fop</primary>
46 </indexterm>
47
48 <sect2 role="package">
49 <title>Introduction to fop</title>
50
51 <para>
52 The <application>FOP</application> (Formatting Objects Processor)
53 package contains a print formatter driven by XSL formatting objects
54 (XSL-FO). It is a <application>Java</application> application that reads
55 a formatting object tree and renders the resulting pages to a specified
56 output. Output formats currently supported include PDF, PCL, PostScript,
57 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
58 primary output target is PDF.
59 </para>
60
61 &lfs10_checked;
62
63 <bridgehead renderas="sect3">Package Information</bridgehead>
64 <itemizedlist spacing="compact">
65 <listitem>
66 <para>
67 Download (HTTP): <ulink url="&fop-download-http;"/>
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Download (FTP): <ulink url="&fop-download-ftp;"/>
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Download MD5 sum: &fop-md5sum;
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Download size: &fop-size;
83 </para>
84 </listitem>
85 <listitem>
86 <para>
87 Estimated disk space required: &fop-buildsize;
88 </para>
89 </listitem>
90 <listitem>
91 <para>
92 Estimated build time: &fop-time;
93 </para>
94 </listitem>
95 </itemizedlist>
96
97 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
98 <itemizedlist spacing="compact">
99 <title>Required Additional Downloads:</title>
100 <listitem>
101 <para>
102 PDFBox:
103 <simplelist>
104 <member><ulink url="&pdfbox-download;"/></member>
105 <member>&pdfbox-md5sum;</member>
106 <member>&pdfbox-size;</member>
107 </simplelist>
108 </para>
109 </listitem>
110 <listitem>
111 <para>
112 PDFBox Fonts:
113 <simplelist>
114 <member><ulink url="&fontbox-download;"/></member>
115 <member>&fontbox-md5sum;</member>
116 <member>&fontbox-size;</member>
117 </simplelist>
118 </para>
119 </listitem>
120 <listitem>
121 <para>
122 Maven build system:
123 <simplelist>
124 <member><ulink url="&maven-download;"/></member>
125 <member>&maven-md5sum;</member>
126 <member>&maven-size;</member>
127 </simplelist>
128 </para>
129 </listitem>
130 </itemizedlist>
131
132 <itemizedlist spacing="compact">
133 <title>Recommended packages</title>
134 <listitem>
135 <para>
136 Objects for Formatting Objects (OFFO) hyphenation patterns:
137 <simplelist>
138 <member><ulink url="&offo-download;"/></member>
139 <member>&offo-md5sum;</member>
140 <member>&offo-size;</member>
141 </simplelist>
142 </para>
143 </listitem>
144 </itemizedlist>
145
146 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
147
148 <bridgehead renderas="sect4">Required</bridgehead>
149 <para role="required">
150 <xref linkend="apache-ant"/>
151 </para>
152
153 <bridgehead renderas="sect4">Optional</bridgehead>
154 <para role="optional">
155<!-- Included into ant <xref linkend="junit"/> (to run tests),-->
156 <xref linkend="x-window-system"/> (to run tests),
157<!-- <xref linkend="maven"/> (an alternate build system), not functional
158 with fop-2.3 -->
159 <ulink url="http://jai-tools.blogspot.com/">JAI Image I/O Tools</ulink>, and
160 <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>
161<!-- [pierre 2017-04-29] Note to devs: there are a lot of bundled dependencies.
162 Some were listed here, but not all. I am not sure it is possible to
163 use system ones. So, I have removed them, and kept only those which
164 are not bundled. -->
165 </para>
166
167 <para condition="html" role="usernotes">User Notes:
168 <ulink url="&blfs-wiki;/fop"/></para>
169
170 </sect2>
171
172 <sect2 role="installation">
173 <title>Installation of fop</title>
174
175 <para>
176 Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
177 the build. To build the <application>JIMI SDK</application> and/or
178 <application>XMLUnit</application> extension classes, ensure the
179 corresponding <filename class='extension'>.jar</filename> files can be
180 found via the <envar>CLASSPATH</envar> environment variable.
181 </para>
182
183 <sect3>
184 <title>Installing OFFO Hyphenation Patterns</title>
185
186 <para>
187 Copy the XML hyphenation patterns into the fop source tree by running
188 the following commands:
189 </para>
190
191<screen><userinput>unzip ../offo-hyphenation.zip &amp;&amp;
192cp offo-hyphenation/hyph/* fop/hyph &amp;&amp;
193rm -rf offo-hyphenation</userinput></screen>
194
195 </sect3>
196
197 <sect3>
198 <title>Installing a temporary Maven binary</title>
199
200 <para>
201 Starting with fop-2.5, the Maven build system is required. We use
202 the binary provided by apache, that we install in a temporary location:
203 </para>
204
205<screen><userinput>tar -xf ../apache-maven-&maven-version;-bin.tar.gz -C /tmp</userinput></screen>
206
207 </sect3>
208
209 <sect3>
210 <title>Installing fop Components</title>
211
212 <para>
213 The <command>javadoc</command> command that ships with OpenJDK 10 and
214 later has
215 become much stricter than previous versions regarding conformance of
216 the Javadoc comments in source code to HTML. The FOP documentation does
217 not meet those standards, so the conformance checks have to be
218 disabled. This can be done with the following command:
219 </para>
220
221<screen><userinput>sed -i '\@&lt;/javad@i\
222&lt;arg value="-Xdoclint:none"/&gt;\
223&lt;arg value="--allow-script-in-comments"/&gt;\
224&lt;arg value="--ignore-source-errors"/&gt;' \
225 fop/build.xml</userinput></screen>
226
227 <para>
228 The stack size set in <filename>build.xml</filename> for building the
229 hyphenation patterns is not large enough. Change it by running:
230 </para>
231
232<screen><userinput>sed -e '/hyph\.stack/s/512k/1M/' \
233 -i fop/build.xml</userinput></screen>
234
235 <para>
236 The <filename>build.xml</filename> file calls for an old version of
237 <application>PDFBox</application> components that are no longer
238 available. Copy the updated PDFBox components into the source tree:
239 </para>
240
241<screen><userinput>cp ../{pdf,font}box-&pdfbox-version;.jar fop/lib</userinput></screen>
242
243 <para>
244 Compile <application>fop</application> by running the following
245 commands:
246 </para>
247
248<screen><userinput>cd fop &amp;&amp;
249
250LC_ALL=en_US.UTF-8 \
251PATH=$PATH:/tmp/apache-maven-&maven-version;/bin \
252ant all javadocs &amp;&amp;
253
254mv build/javadocs .</userinput></screen>
255
256 <para>
257 This package comes with a testsuite, but the java infrastructure
258 installed in this book does not allow running it.
259 </para>
260
261 <para>
262 Now, install <application>Fop</application> as the
263 <systemitem class="username">root</systemitem> user:
264 </para>
265
266<screen role="root"><userinput>install -v -d -m755 -o root -g root /opt/fop-&fop-version; &amp;&amp;
267cp -vR build conf examples fop* javadocs lib /opt/fop-&fop-version; &amp;&amp;
268chmod a+x /opt/fop-&fop-version;/fop &amp;&amp;
269ln -v -sfn fop-&fop-version; /opt/fop</userinput></screen>
270
271 <para>
272 The last thing to do is to clean what we have done:
273 </para>
274
275<screen><userinput>rm -rf /tmp/apache-maven-&maven-version;</userinput></screen>
276
277 </sect3>
278
279 </sect2>
280
281 <sect2 role="commands">
282 <title>Command Explanations</title>
283
284 <para>
285 <command>sed -i ... build.xml</command>: This adds two switches to the
286 <command>javadoc</command> command, preventing some errors to occur when
287 building the documentation.
288 </para>
289
290 <para>
291 <command>export LC_ALL=en_US.UTF-8</command>: the compiler fails if using
292 an ASCII locale.
293 </para>
294
295 <para>
296 <command>ant <option>target</option></command>: This reads the file
297 <filename>build.xml</filename> and builds the target: <option>compile
298 </option> compiles the java sources, <option>jar-main</option> generates
299 jar archives, <option>jar-hyphenation</option> generates the hyphenation
300 patterns for FOP, <option>junit</option> runs the
301 <application>junit</application> tests, and <option>javadocs</option>
302 builds the documentation. The <option>all</option> target runs all of the
303 above.
304 </para>
305
306 <para>
307 <command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
308 optional and creates a convenience symlink so that
309 <envar>$FOP_HOME</envar> doesn't have to be changed each time there's a
310 package version change.
311 </para>
312
313 </sect2>
314
315 <sect2 role="configuration">
316 <title>Configuring fop</title>
317
318 <sect3 id="fop-config">
319 <title>Config Files</title>
320
321 <para>
322 <filename>~/.foprc</filename>
323 </para>
324
325 <indexterm zone="fop fop-config">
326 <primary sortas="e-AA.foprc">~/.foprc</primary>
327 </indexterm>
328
329 </sect3>
330
331 <sect3>
332 <title>Configuration Information</title>
333
334 <para>
335 Using <application>fop</application> to process some large FO's
336 (including the FO derived from the BLFS XML sources), can lead to
337 memory errors. Unless you add a parameter to the
338 <command>java</command> command used in the <command>fop</command>
339 script you may receive messages similar to the one shown below:
340 </para>
341
342 <para>
343 <computeroutput>
344 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
345 space
346 </computeroutput>
347 </para>
348
349 <para>
350 To avoid errors like this, you need to pass an extra parameter to
351 the <command>java</command> command used in the <command>fop</command>
352 script. This can be accomplished by creating a
353 <filename>~/.foprc</filename> (which is sourced by the
354 <command>fop</command> script) and adding the parameter to the
355 <envar>FOP_OPTS</envar> environment variable.
356 </para>
357
358 <para>
359 The <command>fop</command> script looks for a
360 <envar>FOP_HOME</envar> environment variable to locate the
361 <application>fop</application> class libraries. You can create this
362 variable using the <filename>~/.foprc</filename> file as well. Create
363 a <filename>~/.foprc</filename> file using the following commands:
364 </para>
365
366<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
367<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
368FOP_HOME="/opt/fop"</literal>
369EOF</userinput></screen>
370
371 <para>
372 Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
373 number representing the amount of RAM installed in your computer (in
374 megabytes). An example would be
375 <userinput>FOP_OPTS="-Xmx768m"</userinput>.
376 <!-- the URL is broken
377 For more information about
378 memory issues running <application>fop</application>, see
379 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.
380 -->
381 </para>
382
383 <para>
384 To include the <command>fop</command> script in your path,
385 update the system-wide profile with the following command as the
386 <systemitem class="username">root</systemitem> user:
387 </para>
388
389<screen role="root"><userinput>cat &gt; /etc/profile.d/fop.sh &lt;&lt; "EOF"
390<literal># Begin /etc/profile.d/fop.sh
391
392pathappend /opt/fop
393
394# End /etc/profile.d/fop.sh</literal>
395EOF</userinput></screen>
396
397 <note>
398 <para>
399 Running <command>fop</command> can be somewhat verbose.
400 The default logging level can be changed from INFO to any of
401 FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF.
402 To do this, edit
403 <filename>$JAVA_HOME/jre/lib/logging.properties</filename> and change
404 the entries for <option>.level</option> and
405 <option>java.util.logging.ConsoleHandler.level</option> to
406 the desired value.
407 </para>
408 </note>
409
410 </sect3>
411
412 </sect2>
413
414 <sect2 role="content">
415 <title>Contents</title>
416
417 <segmentedlist>
418 <segtitle>Installed Programs</segtitle>
419 <segtitle>Installed Libraries</segtitle>
420 <segtitle>Installed Directory</segtitle>
421
422 <seglistitem>
423 <seg>fop</seg>
424 <seg>fop.jar and numerous support library classes located in
425 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
426 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
427 mlibwrapper_jai.jar</seg>
428 <seg>/opt/fop-&fop-version;</seg>
429 </seglistitem>
430 </segmentedlist>
431
432 <variablelist>
433 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
434 <?dbfo list-presentation="list"?>
435 <?dbhtml list-presentation="table"?>
436
437 <varlistentry id="fop-prog">
438 <term><command>fop</command></term>
439 <listitem>
440 <para>
441 is a wrapper script to the <command>java</command> command
442 which sets up the <application>fop</application>
443 environment and passes the required parameters.
444 </para>
445 <indexterm zone="fop fop-prog">
446 <primary sortas="b-fop">fop</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="fop.jar">
452 <term><filename class='libraryfile'>fop.jar</filename></term>
453 <listitem>
454 <para>
455 contains all the <application>fop</application>
456 <application>Java</application> classes.
457 </para>
458 <indexterm zone="fop fop.jar">
459 <primary sortas="c-fop.jar">fop.jar</primary>
460 </indexterm>
461 </listitem>
462 </varlistentry>
463
464 </variablelist>
465
466 </sect2>
467
468</sect1>
Note: See TracBrowser for help on using the repository browser.