source: pst/ps/fop.xml@ 28fb6fd

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 28fb6fd was 28fb6fd, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to libqmi-1.24.10
Update to cbindgen-0.14.1
Update to vlc-3.0.9.2
Update pdfbox and fontbox in fop

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

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