source: pst/ps/fop.xml@ 02e06ab

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.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 02e06ab was 02e06ab, checked in by Pierre Labastie <pieere@…>, 5 years ago

tags

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

  • Property mode set to 100644
File size: 14.0 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 " ">
[bba3fd3]9 <!ENTITY fop-md5sum "fc95040a8db4a7f22c6f26e18fd6d033">
10 <!ENTITY fop-size "26 MB">
11 <!ENTITY fop-buildsize "497 MB ">
12 <!ENTITY fop-time "1.1 SBU">
[460e986]13
[137446ef]14 <!ENTITY pdfbox-version "2.0.13">
[bba3fd3]15 <!ENTITY pdfbox-download "http://mirror.reverse.net/pub/apache/pdfbox/&pdfbox-version;/pdfbox-&pdfbox-version;.jar">
[137446ef]16 <!ENTITY pdfbox-md5sum "91d98c9a48cb6e89a3a1eeb4294f2665">
[bba3fd3]17 <!ENTITY pdfbox-size "2.4 MB">
[492000e]18
[bba3fd3]19 <!ENTITY fontbox-download "http://mirror.reverse.net/pub/apache/pdfbox/&pdfbox-version;/fontbox-&pdfbox-version;.jar">
[137446ef]20 <!ENTITY fontbox-md5sum "f6dd2dbe55ea47062f7ac0543f7e29c6">
[bba3fd3]21 <!ENTITY fontbox-size "1.5 MB">
[8dfc5c3]22
23 <!ENTITY offo-download "&sourceforge-dl;/offo/2.2/offo-hyphenation.zip">
[bf7a1821]24 <!ENTITY offo-md5sum "bf9c09bf05108ef9661b8f08d91c2336">
25 <!ENTITY offo-size "862 KB">
[634c636c]26]>
27
[75d53372]28<sect1 id="fop" xreflabel="fop-&fop-version;">
[f570280]29 <?dbhtml filename="fop.html"?>
30
31 <sect1info>
32 <othername>$LastChangedBy$</othername>
33 <date>$Date$</date>
34 </sect1info>
35
[75d53372]36 <title>fop-&fop-version;</title>
[f570280]37
38 <indexterm zone="fop">
[75d53372]39 <primary sortas="a-fop">fop</primary>
[f570280]40 </indexterm>
41
42 <sect2 role="package">
[75d53372]43 <title>Introduction to fop</title>
[f570280]44
[6fe6db6]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>
[f570280]54
[02e06ab]55 &lfs84_checked;
[50929e8]56
[f570280]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">
[a288a10]81 <title>Required Additional Downloads:</title>
[bba3fd3]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>
[cbfc7b61]101
[bba3fd3]102 <itemizedlist spacing="compact">
103 <title>Recommended packages</title>
[f570280]104 <listitem>
[492000e]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>
[f570280]111 </para>
112 </listitem>
113 </itemizedlist>
114
[75d53372]115 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
[f570280]116
117 <bridgehead renderas="sect4">Required</bridgehead>
[75d53372]118 <para role="required">
119 <xref linkend="apache-ant"/>
120 </para>
[f570280]121
122 <bridgehead renderas="sect4">Optional</bridgehead>
[75d53372]123 <para role="optional">
[c084a2a]124<!-- Included into ant <xref linkend="junit"/> (to run tests),-->
[adf80ef]125 <xref linkend="x-window-system"/> (to run tests),
[c084a2a]126<!-- <xref linkend="maven"/> (an alternate build system), not funcional
127 with fop-2.3 -->
[137446ef]128 <ulink url="http://jai-tools.blogspot.com/">JAI Image I/O Tools</ulink>, and
[bf7a1821]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. -->
[75d53372]134 </para>
[f570280]135
[977061b0]136 <para condition="html" role="usernotes">User Notes:
137 <ulink url="&blfs-wiki;/fop"/></para>
138
[f570280]139 </sect2>
140
141 <sect2 role="installation">
[75d53372]142 <title>Installation of fop</title>
[f570280]143
[6fe6db6]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>
[bf7a1821]151
[492000e]152 <sect3>
153 <title>Installing OFFO Hyphenation Patterns</title>
154
[6fe6db6]155 <para>
[bf7a1821]156 Copy the XML hyphenation patterns into the fop source tree by running
157 the following commands:
[6fe6db6]158 </para>
[492000e]159
[bf7a1821]160<screen><userinput>unzip ../offo-hyphenation.zip &amp;&amp;
161cp offo-hyphenation/hyph/* fop/hyph &amp;&amp;
162rm -rf offo-hyphenation</userinput></screen>
[492000e]163
164 </sect3>
[bf7a1821]165
[f570280]166 <sect3>
[75d53372]167 <title>Installing fop Components</title>
[f570280]168
[6fe6db6]169 <para>
[bba3fd3]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
[6fe6db6]174 disabled. This can be done with the following command:
175 </para>
176
[ba7be716]177<screen><userinput>sed -i '\@&lt;/javad@i\
178&lt;arg value="-Xdoclint:none"/&gt;\
[d61ead0a]179&lt;arg value="--allow-script-in-comments"/&gt;\
180&lt;arg value="--ignore-source-errors"/&gt;' \
181 fop/build.xml</userinput></screen>
[bf7a1821]182
183 <para>
184 The stack size set in <filename>build.xml</filename> for building the
[bba3fd3]185 hyphenation patterns is not large enough. Change it by running:
[bf7a1821]186 </para>
[6fe6db6]187
[bf7a1821]188<screen><userinput>sed -e '/hyph\.stack/s/512k/1M/' \
189 -i fop/build.xml</userinput></screen>
[bba3fd3]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
[6fe6db6]199 <para>
[bba3fd3]200 Compile <application>fop</application> by running the following
201 commands:
[6fe6db6]202 </para>
[f570280]203
[bf7a1821]204<screen><userinput>cd fop &amp;&amp;
205export LC_ALL=en_US.UTF-8 &amp;&amp;
[d61ead0a]206ant all javadocs &amp;&amp;
[cbfc7b61]207mv build/javadocs .</userinput></screen>
208
[6fe6db6]209 <para>
[bba3fd3]210 The <application>junit</application> test suite was run as part of the
211 above commands.
[6fe6db6]212 </para>
[bf7a1821]213
[6fe6db6]214 <para>
[bba3fd3]215 Now, install <application>Fop</application> as the
216 <systemitem class="username">root</systemitem> user:
[6fe6db6]217 </para>
[d260aaf4]218
[2612183a]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;
[bf7a1821]221chmod a+x /opt/fop-&fop-version;/fop &amp;&amp;
222ln -v -sfn fop-&fop-version; /opt/fop</userinput></screen>
[f570280]223
224 </sect3>
225
226 </sect2>
[634c636c]227
[f570280]228 <sect2 role="commands">
229 <title>Command Explanations</title>
230
[ba7be716]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>
[bf7a1821]238 <command>export LC_ALL=en_US.UTF-8</command>: the compiler fails if using
239 an ASCII locale.
[ba7be716]240 </para>
241
[6fe6db6]242 <para>
243 <command>ant <option>target</option></command>: This reads the file
[ba7be716]244 <filename>build.xml</filename> and builds the target: <option>compile
245 </option> compiles the java sources, <option>jar-main</option> generates
[bf7a1821]246 jar archives, <option>jar-hyphenation</option> generates the hyphenation
[bba3fd3]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.
[6fe6db6]251 </para>
[f570280]252
[6fe6db6]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>
[f570280]259
260 </sect2>
261
262 <sect2 role="configuration">
[75d53372]263 <title>Configuring fop</title>
[f570280]264
265 <sect3 id="fop-config">
266 <title>Config Files</title>
267
[6fe6db6]268 <para>
269 <filename>~/.foprc</filename>
270 </para>
[f570280]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
[6fe6db6]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>
[f570280]288
[6fe6db6]289 <para>
290 <computeroutput>
291 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
292 space
293 </computeroutput>
294 </para>
[f570280]295
[6fe6db6]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>
[f570280]304
[6fe6db6]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>
[f570280]312
313<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
[977061b0]314<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
[f570280]315FOP_HOME="/opt/fop"</literal>
316EOF</userinput></screen>
317
[6fe6db6]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 -->
[a754ee2b]328 </para>
[f570280]329
[6fe6db6]330 <para>
331 To include the <command>fop</command> script in your path,
[d61ead0a]332 update the system-wide profile with the following command as the
333 <systemitem class="username">root</systemitem> user:
[6fe6db6]334 </para>
[f570280]335
[d61ead0a]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>
[f570280]343
[6fe6db6]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
[ba7be716]351 the entries for <option>.level</option> and
[6fe6db6]352 <option>java.util.logging.ConsoleHandler.level</option> to
353 the desired value.
354 </para>
355 </note>
[cbfc7b61]356
[f570280]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>
[492000e]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
[f570280]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
[492000e]384 <varlistentry id="fop-prog">
385 <term><command>fop</command></term>
[f570280]386 <listitem>
387 <para>is a wrapper script to the <command>java</command> command
[75d53372]388 which sets up the <application>fop</application>
[f570280]389 environment and passes the required parameters.</para>
[492000e]390 <indexterm zone="fop fop-prog">
391 <primary sortas="b-fop">fop</primary>
[f570280]392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="fop.jar">
397 <term><filename class='libraryfile'>fop.jar</filename></term>
398 <listitem>
[75d53372]399 <para>contains all the <application>fop</application>
[f570280]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.