source: pst/ps/fop.xml@ a288a10

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 a288a10 was a288a10, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Typo

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

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