source: pst/ps/fop.xml@ 4c24eb0a

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 4c24eb0a was 4c24eb0a, checked in by Pierre Labastie <pieere@…>, 3 years ago

Remove period at the end of short descriptions.
In the process, some attributes in single quotes have been changed to double
quotes, and a few attribute lists have been written on one line instead of
several lines.

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

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