source: pst/ps/fop.xml@ 137446ef

10.0 10.1 11.0 8.4 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 137446ef was 137446ef, checked in by Pierre Labastie <pieere@…>, 3 years ago

Update versions of additional downloads for fop

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

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