aboutsummaryrefslogtreecommitdiffstats
path: root/docs/xml-docs/fop
diff options
context:
space:
mode:
authorfotis <fotis@unknown>2001-03-25 23:03:22 +0000
committerfotis <fotis@unknown>2001-03-25 23:03:22 +0000
commita6c71f3405c41f2b8b9e244cd87284946ec0fc32 (patch)
treed81fc82901325d0423c16dae0324da7a724635c7 /docs/xml-docs/fop
parent91606493009417de7ebf9ffbbd633f124c916376 (diff)
downloadxmlgraphics-fop-a6c71f3405c41f2b8b9e244cd87284946ec0fc32.tar.gz
xmlgraphics-fop-a6c71f3405c41f2b8b9e244cd87284946ec0fc32.zip
updating docs for 0.18 release
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/xml-docs/fop')
-rw-r--r--docs/xml-docs/fop/architecture.xml87
-rw-r--r--docs/xml-docs/fop/compiling.xml22
-rw-r--r--docs/xml-docs/fop/fonts.xml149
-rw-r--r--docs/xml-docs/fop/implemented.xml14
-rw-r--r--docs/xml-docs/fop/involved.xml2
-rw-r--r--docs/xml-docs/fop/readme.xml15
-rw-r--r--docs/xml-docs/fop/running.xml153
7 files changed, 195 insertions, 247 deletions
diff --git a/docs/xml-docs/fop/architecture.xml b/docs/xml-docs/fop/architecture.xml
index e25de21f1..30165e3e0 100644
--- a/docs/xml-docs/fop/architecture.xml
+++ b/docs/xml-docs/fop/architecture.xml
@@ -10,19 +10,16 @@
The overall process is controlled by <em>org.apache.fop.apps.Driver</em>. In
this class, a typical sequence is:</p>
-<p><code>Driver driver = new Driver();</code></p>
-<p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</code></p>
-<p><code>driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</code></p>
-<p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</code></p>
-<p><code>driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");</code></p>
-<p><code>driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");</code></p>
- <p><code>driver.setOutputStream(new FileOutputStream(args[1]));</code></p>
-<p></p>
-<p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p>
-<p></p>
-<p><code>driver.format();</code></p>
-<p></p>
-<p><code>driver.render();</code></p>
+<source>Driver driver = new Driver();<br/>
+driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);<br/>
+driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");<br/>
+driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");<br/>
+driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");<br/>
+driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");<br/>
+driver.setOutputStream(new FileOutputStream(args[1]));<br/>
+driver.buildFOTree(parser, fileInputSource(args[0]));<br/>
+driver.format();<br/>
+driver.render();</source>
</s2>
<s2 title="Formatting Object Tree">
@@ -257,16 +254,68 @@ invokes a particular method in the renderer of choice, e.g.
<em>NOTE</em>: this system is bypassed for <em>Page</em>, incidentally.
</p>
-<p>
-Rendering will not be discussed further in this document, as most of our
-current effort must concentrate on layout. Section 4.12 in the XSL WD
-discusses some issues applicable to rendering.
-</p>
+</s2>
+
+<!-- by Art Welch -->
+<s2 title="Renderers">
+ <s3 title="PrintRenderer">
+ <p>The PrintRenderer is an abstract base class for print type renderers. Currently the PCL, PDF, and TXT renderers extend from this. This allows as much common functionality to be contained in one place as possible (at least as much as I could consolidate fairly quickly). Unfortunately I have not yet been able to make the renderPage and renderWordArea methods common. This is unfortunate because these methods seem to experience the most activity. Maybe soneone else will have a clever solution to this (without breaking them into a bunch of little bits).</p>
+ <p>It is my hope that this base class will be useful for other renderers as well.</p>
+ </s3>
+
+ <s3 title="PCLRenderer">
+ <p>The PCLRenderer is a FOP renderer that should produce output as close to identical as possible to the printed output of the PDFRenderer within the limitations of the renderer, and output device.</p>
+
+ <p>The output created by the PCLRenderer is generic PCL 5 as documented in the "HP PCL 5 Printer Language Technical Reference Manual" (copyright 1990). This should allow any device fully supporting PCL 5 to be able to print the output generated by the PCLRenderer.</p>
+
+ <s4 title="Limitations">
+ <ul>
+ <li>Text or graphics outside the left or top of the printable area are not rendered properly. In general things that should print to the left of the printable area are shifted to the right so that they start at the left edge of the printable area and an error message is generated.</li>
+ <li>The Helvetica and Times fonts are not well supported among PCL printers so Helvetica is mapped to Arial and Times is mapped to Times New. This is done in the PCLRenderer, no changes are required in the FO's. The metrics and appearance for Helvetica/Arial and Times/Times New are nearly identical, so this has not been a problem so far.</li>
+ <li>Only the original fonts built into FOP are supported.</li>
+ <li>For the non-symbol fonts, the ISO 8859/1 symbol set is used (PCL set "0N").</li>
+ <li>Multibyte characters are not supported.</li>
+ <li>SVG support is limited. Currently only lines, rectangles (may be rounded), circles, ellipses, text, simple paths, and images are supported. Colors are supported (dithered black and white) but not gradients.</li>
+ <li>Images print black and white only (not dithered). When the renderer prints a color image it uses a threshold value, colors above the threshold are printed as white and below are black. If you need to print a non-monochrome image you should dither it first.</li>
+ <li>Image scaling is accomplished by modifying the effective resolution of the image data. The available resolutions are 75, 100, 150, 300, and 600 DPI.</li>
+ <li>Color printing is not supported. Colors are rendered by mapping the color intensity to one of the PCL fill shades (from white to black in 9 steps).</li>
+ <li>SVG clipping is not supported.</li>
+ </ul>
+ </s4>
+
+ <s4 title="Additional Features">
+ <p>There are some special features that are controlled by some public variables on the PCLRenderer class.</p>
+
+ <dl>
+ <dt>orientation</dt>
+ <dd><p>The logical page orientation is controlled by the public orientation variable. Legal values are:</p>
+ <ul>
+ <li>0 Portrait</li>
+ <li>1 Landscape</li>
+ <li>2 Reverse Portrait</li>
+ <li>3 Reverse Landscape</li>
+ </ul>
+ </dd>
+ <dt>curdiv, paperheight</dt>
+ <dd>The curdiv and paperheight variables allow multiple virtual pages to be printed on a piece of paper. This allows a standard laser printer to use perforated paper where every perforation will represent an individual page. The paperheight sets the height of a piece of paper in decipoints. This will be divided by the page.getHeight() to determine the number of equal sized divisions (pages) that will fit on the paper. The curdiv variable may be read/written to get/set the current division on the page (to set the starting division and read the ending division for multiple invocations).</dd>
+ <dt>topmargin, leftmargin</dt>
+ <dd>The topmargin and leftmargin may be used to increase the top and left margins for printing.</dd>
+ </dl>
+ </s4>
+ </s3>
+
+ <s3 title="TXTRenderer">
+ <p>The TXTRenderer is a FOP renderer that produces plain ASCII text output that attempts to match the output of the PDFRenderer as closely as possible. This was originally developed to accommodate an archive system that could only accept plain text files. Of course when limited to plain fixed pitch text the output does not always look very good.</p>
+ <p>The TXTRenderer works with a fixed size page buffer. The size of this buffer is controlled with the textCPI and textLPI public variables. The textCPI is the effective horizontal characters per inch to use. The textLPI is the vertical lines per inch to use. From these values and the page width and height the size of the buffer is calculated. The formatting objects to be rendered are then mapped to this grid. Graphic elements (lines, borders, etc) are assigned a lower priority than text, so text will overwrite any graphic element representations.</p>
+ </s3>
+</s2>
+
+
+<s2 title="UML Diagrams">
<p>
You can find UML diagramms for all Fop packages (latest release version)
<jump href="http://xml.apache.org/dist/fop/fop-uml.zip">here</jump>.</p>
-
</s2>
<s2 title="SVG">
diff --git a/docs/xml-docs/fop/compiling.xml b/docs/xml-docs/fop/compiling.xml
index f0d0339fb..748b0b7a2 100644
--- a/docs/xml-docs/fop/compiling.xml
+++ b/docs/xml-docs/fop/compiling.xml
@@ -14,22 +14,9 @@
<p>A help screen is shown by calling "build usage".</p>
<p>If you only want to use Fop, you don't need to build it. A fop.jar comes with the distribution.</p>
<s2 title="Setting up your classpath">
- <p>The build process relies on finding following libraries in your classpath (the version numbers indicate that building with them has been successfully tested, other, later versions may work too:</p>
- <ul>
- <li><jump href="http://xml.apache.org/xerces-j/index.html">Xerces-J</jump> version 1.2.1 (xml parser). Xerces-J version 1.3.0 does not work, because of a bug in Xerces!</li>
- <li><jump href="http://xml.apache.org/xalan/index.html">Xalan</jump> version 1.2 (xslt processor). Xalan 2.0 is also supported.</li>
- <li>bsf.jar (comes with Xalan)</li>
- <li>jimi.jar (image processing library) this file is optional </li>
- </ul>
- <p>Other needed libraries and classes come with Fop (in xml-fop/lib), but the build script sets the path to
- them, so you only need to care about them, if you build Fop in any other way. See build.bat/build.sh for
- details.
- </p>
- <p>A classpath for a complete compilation of Fop could look like this, if all these jar files are in
- a directory called jars (example uses windows syntax):
- </p>
- <p><code>set CLASSPATH=\jars\xalan.jar; \jars\xerces.jar; \jars\bsf.jar; \jars\jimi.jar;
- </code></p>
+ <p><note>You don't have to setup your classpath; all libraries needed to compile Fop are coming with
+ the distribution and are referenced by the build script, so you only need to care about them,
+ if you build Fop in any other way. See build.bat/build.sh for details. </note></p>
</s2>
<s2 title="Setting of JAVA_HOME">
<p>You have to set the enviroment variable JAVA_HOME. It must point to your local JDK
@@ -40,9 +27,6 @@
<p>If you have problems compiling Fop, please try this first: </p>
<ul>
<li>delete the build directory completely and try a new build from scratch</li>
- <li>check, whether you have all necessary libraries in your classpath:
- xerces.jar, xalan.jar, bsf.jar, jimi.jar (optional)</li>
- <li>check, whether you have the required versions of Xerces (>= 1.2.1) and Xalan (>=1.2) </li>
<li>check, whether you have an older version of xerces.jar, xalan.jar, w3c.jar somewhere in
you classpath.</li>
</ul>
diff --git a/docs/xml-docs/fop/fonts.xml b/docs/xml-docs/fop/fonts.xml
index 01869e8e1..8294808f5 100644
--- a/docs/xml-docs/fop/fonts.xml
+++ b/docs/xml-docs/fop/fonts.xml
@@ -7,8 +7,7 @@
That includes the following fonts: Helvetica, Times, Courier, Symbol and ZapfDingbats.
</p>
<p>Font support in FOP can be extended by the addition of font metric files (written in XML) created from Adobe
- Type 1 fonts and Truetype fonts. No other font types (Type 0, Type 3, etc.) are supported at this time. The current method
- of adding fonts to FOP requires the package to be recompiled. You can also embed fonts into pdf files; see below.
+ Type 1 fonts and Truetype fonts. No other font types (Type 3, etc.) are supported at this time.
</p>
</s2>
<s2 title="Adding additional Type 1 fonts">
@@ -16,10 +15,7 @@
contains a tool that can generate such a font metrics file from a PFM file, which normally comes with the font file.
</p>
<s3 title="Generating a font metrics file">
- <p> Run the class org.apache.fop.fonts.apps.PFMReader to generate the XML file. Important: The tool does two
- XSL transformations, one of which uses charlist.xml. At the moment in order for the tool to work correctly you
- have to copy charlist.xml temporarily to the local directory from where you intend to start the tool.
- (If anyone has an improvement on this...)
+ <p> Run the class org.apache.fop.fonts.apps.PFMReader to generate the XML file.
</p>
<p>
<code>java -cp fop.jar;xerces.jar;xalan.jar;w3c.jar</code>
@@ -27,8 +23,6 @@
<p>
<code>org.apache.fop.fonts.apps.PFMReader pfm-file xml-file</code>
</p>
- <p>Put the resulting XML file into the src/codegen directory.
- </p>
<p>Note: The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and
calculations which are only an approximation to the real values. FontBBox and Italic Angle can be found in
the human-readable part of the PFB file. The PFMReader tool does not yet interpret PFB files, so if you want
@@ -37,113 +31,74 @@
</p>
</s3>
<s3 title="Register the fonts within FOP">
- <p>Open the class org.apache.fop.render.pdf.FontSetup and add entries to the ones present according to
- the following example:
- </p>
- <p>
- <code>fontInfo.addMetrics("F14", new ZapfDingbats());</code>
- </p>
- <p>
- <code>fontInfo.addMetrics("F15", new BauerBodoniRoman()); //This is the new entry.</code>
- </p>
- <p>
- <code>...</code>
- </p>
- <p>
- <code>fontInfo.addFontProperties("F14", "ZapfDingbats", "normal", "normal");</code>
- </p>
<p>
- <code>fontInfo.addFontProperties("F15", "BauerBodoni", "normal", "normal"); //This is the new entry.</code>
- </p>
- <p>Note: The class name to use is visible in the &lt;class-name&gt; element of the font metrics file.
- </p>
- </s3>
- <s3 title="Adjusting build.xml">
- <p>In the src/codegen directory you find the font metrics files for the base 14 fonts. The are being transformed
- during build into Java classes and then compiled. The newly generated font metrics file must be included in this
- process. To do that open build.xml and add entries according to the following example:
- </p>
- <p>
- <code>&lt;property name="ZapfDingbats.xml" value="${build.codegen}/ZapfDingbats.xml"/&gt;</code>
- </p>
- <p>
- <code>&lt;property name="BauerBodoni.xml" value="${build.codegen}/BauerBodoni.xml"/&gt;</code>
- </p>
- <p>
- <code>...</code>
- </p>
- <p>
- <code>&lt;xslt infile="${ZapfDingbats.xml}" xsltfile="${fontfile.xsl}"</code>
- </p>
- <p>
- <code>outfile="${build.src}/${replacestring}/render/pdf/fonts/ZapfDingbats.java" smart="yes"/&gt;</code>
- </p>
- <p>
- <code>&lt;xslt infile="${BauerBodoni.xml}" xsltfile="${t1fontfile.xsl}"</code>
- </p>
- <p>
- <code>outfile="${build.src}/${replacestring}/render/pdf/fonts/BauerBodoniRoman.java" smart="yes"/&gt;</code>
- </p>
- <p>Rebuild FOP!
- </p>
- <p>Note: Be sure to use ${t1fontfile.xsl} instead of ${fontfile.xsl}. This is neccessary because of the additional metrics
- information needed for non base 14 fonts.
- </p>
+ Edit conf/userconfig.xml and add entries for the font
+ if the fonts section,
+ ie:
+ </p>
+ <p>
+ <code>
+&lt;font metrics-file="cyberbit.xml" kerning="yes" embed-file="C:\WINNT\Fonts\Cyberbit.ttf"&gt;
+ &lt;font-triplet name="Cyberbit" style="normal" weight="normal"&gt;
+&lt;/font&gt;
+</code>
+</p>
</s3>
</s2>
<s2 title="Adding additional TrueType">
- <p>Adding Truetype fonts is almost identical to the process of adding type 1 fonts. The main difference is in the first step.</p>
+ <p>Adding Truetype fonts is almost identical to the process of
+ adding type 1 fonts. The main difference is in the first
+ step.</p>
+
<s3 title="Generating a font metrics file">
- <p>As mentioned above you need an XML file containing font metrics to be able to use an additional font. FOP
- contains a tool that can generate such a font metrics file from your truetype font file
- </p>
- <p>Create metrics for the fontfile (we assume the file has the name cmr10.ttf und to be in c:\myfonts\): </p>
- <p><code>java org.apache.fop.fonts.apps.TTFReader -fn TCM -cn TCM -ef C:\myfonts\cmr10.ttf C:\myfonts\cmr10.ttf ttfcm.xml</code></p>
- <p>the -fn option sets the font name (in the example to TCM )</p>
- <p>the -cn option set the classname (in the example to CM)</p>
- <p>the -ef option will try to embed to font at the given path when fop is running (you can
- change that in the generated xml file). </p>
- </s3>
- <s3 title="Register the fonts within FOP">
- <p>Open the class org.apache.fop.render.pdf.FontSetup and add entries to the ones present according to
- the following example:
+ <p>As mentioned above you need an XML file containing font
+ metrics to be able to use an additional font. FOP contains
+ a tool that can generate such a font metrics file from
+ your truetype font file.
</p>
<p>
- <code>fontInfo.addMetrics("F14", new ZapfDingbats());</code>
+ Create metrics for the fontfile (we assume the file has
+ the name cmr10.ttf and exists in c:\myfonts\):
</p>
<p>
- <code>fontInfo.addMetrics("F19", new TCM()); //This is the new entry.</code>
- </p>
+ <code>java org.apache.fop.fonts.apps.TTFReader C:\myfonts\cmr10.ttf C:\myfonts\cmr10.ttf ttfcm.xml</code></p>
+ </s3>
+ <s3 title="TrueType collections">
<p>
- <code>...</code>
+ TrueType collections (.ttc files) contains more than one
+ font. To create metrics for a ttc file you must specify
+ the font in the collection with the -ttcname option to
+ TTFReader.
</p>
<p>
- <code>fontInfo.addFontProperties("F14", "ZapfDingbats", "normal", "normal");</code>
+ To get a list of the fonts in a collection, just start the
+ TTFReader as if it were a normal truetype file (without
+ the -ttcname option). It will then display all the font
+ names and exit with an Exception...
</p>
<p>
- <code>fontInfo.addFontProperties("F19", "TCM", "normal", "normal"); //This is the new entry.</code>
- </p>
- <p>Note: The class name to use is visible in the &lt;class-name&gt; element of the font metrics file.
+ Example on generating metrics for a .ttc file:
</p>
+ <p>
+ <code>
+ java org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" msmincho.ttc msminch.xml
+ </code>
+ </p>
</s3>
- <s3 title="Adjusting build.xml">
- <p>In the src/codegen directory you find the font metrics files for the base 14 fonts. The are being transformed
- during build into Java classes and then compiled. The newly generated font metrics file must be included in this
- process. To do that open build.xml and add entries according to the following example:
+
+ <s3 title="Register the fonts within FOP">
+ <p>
+ Same as for Type 1 fonts.
</p>
- <p>Look for the section "Initialization target" and add the following line at the end of it</p>
- <p><code>&lt;property name="tcm.xml" value="${build.codegen}/tcm.xml"&gt;</code></p>
- <p>then search for the section "Generate the source code". At the end of this section you can find
- templates for type 1 and truetype fonts. use them with your font name:</p>
- <p><code>&lt;xslt infile="${tcm.xml}" xsltfile="${ttffontfile.xsl}"
- outfile="${build.src}/${replacestring}/render/pdf/fonts/TCM.java" smart="yes"/&gt;</code></p>
</s3>
- <s3 title="embedding fonts">
- <p>edit conf\userconfig.xml and add TCM to the list of embedded fonts</p>
- <p>Don't forget: If you have embedded fonts, you must run Fop with the flag -cuserconfig.xml,
- otherwise the settings in userconfig.xml will not be read.</p>
- </s3>
- <p>Rebuild FOP!</p>
+ <s3 title="Embedding fonts">
+ <p>
+ Font embedding is enabled in the userconfig.xml file.
+ </p>
+ </s3>
</s2>
+ <p>
+ Remember to start fop with -c conf/userconfig.xml
+ </p>
</s1>
diff --git a/docs/xml-docs/fop/implemented.xml b/docs/xml-docs/fop/implemented.xml
index c4393d155..74cd3fb20 100644
--- a/docs/xml-docs/fop/implemented.xml
+++ b/docs/xml-docs/fop/implemented.xml
@@ -28,10 +28,12 @@
<li>region-body </li>
<li>region-before </li>
<li>region-after </li>
+ <li>region-start</li>
+ <li>region-end</li>
<li>flow</li>
<li>static-content </li>
</ul>
- <p>Not implemented: region-start, region-end, declarations, color-profile, title</p>
+ <p>Not implemented: declarations, color-profile, title</p>
</s3>
<s3 title="B.2 Block Formatting Objects">
@@ -101,6 +103,8 @@
</s2>
+border and padding shorthand properties
+
<s2 title="2) Properties">
<p>Property values can be computed. Compound properties are also understood by Fop.</p>
<ul>
@@ -181,12 +185,12 @@
<li>padding (only one value allowed) </li>
<li>padding-after</li>
<li>padding-before</li>
- <li>padding-bottom (only in conjunction with background color) </li>
+ <li>padding-bottom </li>
<li>padding-end</li>
- <li>padding-left (only in conjunction with background color) </li>
- <li>padding-right (only in conjunction with background color) </li>
+ <li>padding-left </li>
+ <li>padding-right </li>
<li>padding-start</li>
- <li>padding-top (only in conjunction with background color) </li>
+ <li>padding-top </li>
<li>page-height </li>
<li>page-position</li>
<li>page-width </li>
diff --git a/docs/xml-docs/fop/involved.xml b/docs/xml-docs/fop/involved.xml
index 8ce3d70c9..2f61c6b4d 100644
--- a/docs/xml-docs/fop/involved.xml
+++ b/docs/xml-docs/fop/involved.xml
@@ -17,7 +17,7 @@
to <jump href="mailto:fop-dev-subscribe@xml.apache.org">fop-dev-subscribe@xml.apache.org</jump></p>
<p>Sending bug reports and feature requests to the list is a welcome and important contribution to
developing Fop. </p>
- <p>Read also the <jump href="http://archive.covalent.net/">archive</jump>
+ <p>Read also the <jump href="http://marc.theaimsgroup.com/?l=fop-dev&amp;r=1&amp;w=2">archive</jump>
of the discussion list fop-dev to get an idea of the issues being discussed. </p>
</s2>
<s2 title="Look at the developer's code using cvs">
diff --git a/docs/xml-docs/fop/readme.xml b/docs/xml-docs/fop/readme.xml
index 91cec49ea..1aa59258a 100644
--- a/docs/xml-docs/fop/readme.xml
+++ b/docs/xml-docs/fop/readme.xml
@@ -1,14 +1,5 @@
<?xml version="1.0" standalone="no"?>
-
-<!--
- Authors:
- James Tauber
- Fotis Jannidis
- Arved Sandstrom
--->
-
-
<!-- Overview -->
<s1 title="Fop">
@@ -20,7 +11,7 @@
like XT or Xalan) or can be passed in memory as a DOM Document or (in
the case of XT) SAX events.
</p>
- <p>The latest version of Fop is 0.17 and it supports the xsl:fo candidate release.
+ <p>The latest version of Fop is 0.18 and it supports the xsl:fo candidate release.
You can <jump href="download.html">download</jump>
Fop including a precompiled version, the source code and many example files to
get you started. Pointers to introductions into xsl:fo can be found in the
@@ -29,13 +20,13 @@
of the xsl:fo standard. You can find a list of supported flow objects and properties
in the section <jump href="implemented.html">Features</jump> and in section
<jump href="limitations.html">Limitations</jump> in what way this support is
- limited.
+ limited.
</p>
<p>FOP is part of Apache's XML project. The homepage of FOP is
<jump href="http://xml.apache.org/fop">http://xml.apache.org/fop</jump>. A list
of known bugs, the committers to this project and the tasks they are working on can be found
in the file <jump href="http://xml.apache.org/websrc/cvsweb.cgi/xml-fop/">Status</jump> in the
- root of your Fop distribution.
+ root of your Fop distribution. A history of the latest changes to the project can be found in CHANGES.
</p>
</s2>
diff --git a/docs/xml-docs/fop/running.xml b/docs/xml-docs/fop/running.xml
index d796fc6e7..2a57b70bb 100644
--- a/docs/xml-docs/fop/running.xml
+++ b/docs/xml-docs/fop/running.xml
@@ -6,107 +6,70 @@
<s1 title="Running FOP">
<s2 title="Prerequisites">
<p>Following software must be installed:</p>
- <p>a) Java 1.1.x or later (If you want to use AWTCommandLine, you need Swing)</p>
- <p>b) An XML parser which supports SAX and DOM like
- <jump href="http://xml.apache.org/xerces-j/index.html">Xerces-J</jump>.
- (Xerces is the default xml parser)
- </p>
- <p>c) Fop supports SVG (see <jump href="implemented.html">Features</jump> for further information) and
- needs the w3c.jar library. This library comes with Fop (xml-fop/lib) and must
- be included in your classpath. The jar file w3c.jar contains the compiled classes for the
- java svg bindings with some other DOM classes that are used by the SVG DOM bindings.
- The source for the svg java binding classes can be found at - <jump href="http://www.w3.org/TR/2000/CR-SVG-20000802/java.html">
- SVG Java bindings</jump>, currently they correspond to the SVG Candidate Recommendation (02 November 2000).
- The other required files can be found at <jump href="http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/java-binding.html">W3C DOM Java binding</jump>.
- </p>
- <p>d) Optional: Fop supports the jimi library for image processing, if it is in your classpath
- when you build Fop (the precompiled version supports jimi). You can find it at
- <jump href="http://java.sun.com/products/jimi/">java.sun.com</jump>
+ <p>a) Java 1.1.x or later (If you want to use the previewer (option -awt), you need Swing or Java 2)</p>
+ <p>b) All libraries you need are part of the Fop distribution and
+ can be found in the xml-fop/lib directory. Look at the batch/shell script fop.bat/fop.sh
+ to see, how Fop can be invoked easily. These libraries are included:
+ <ul>
+ <li>An XML parser which supports SAX and DOM like
+ <jump href="http://xml.apache.org/xerces-j/index.html">Xerces-J</jump>.
+ (Xerces is the default xml parser)
+ </li>
+ <li>An XSLT processor
+ </li>
+ <li>The SVG library w3c.jar corresponding to the SVG Candidate Recommendation (02 November 2000).
+ </li>
+ <li>The imaging library Jimi from Sun
+ </li>
+ </ul>
</p>
</s2>
+
<s2 title="Starting FOP as an standalone application">
- <p>There are three ways to run FOP from the command line.</p>
- <p>a) Batch processing formatting objects (fo) files: </p>
- <p><code>java org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
- <p>b) Batch processing xml files (includes production of the fo-files):</p>
- <p><code>java org.apache.fop.apps.XalanCommandLine xml-file xsl-file pdf-file</code></p>
- <p>c) Previewing the fo-file:</p>
- <p><code>java org.apache.fop.apps.AWTCommandLine fo-file</code></p>
- <p>Each method uses next to the fop classes other packages. The following describes
- each method in detail. </p>
- <s3 title="Method One">
- <p>One is to first use an XSLT engine to produce the formatting object tree as an
- XML document and then running the class org.apache.fop.apps.CommandLine with the
- formatting object file name and PDF filename as arguments. You need to set classpath
- and set the used sax parser according to your enviroment
- </p>
- <p>Classpath settings: You will need to include FOP and your XML Parser
- in your classpath and so you might invoke FOP, if Xerces-J is your xml parser:
- </p>
- <p><code>java -cp fop.jar;xerces.jar;w3c.jar </code></p>
- <p><code>org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
- <p>If you want to use another sax parser, you will need to set the property
- org.xml.sax.parser to any other SAX Parser class to use. The following example shows
- the command line, if you use XP from James Clark:
- </p>
- <p><code>java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</code></p>
- <p><code>-cp fop.jar;xerces.jar;xp.jar;w3c.jar</code></p>
- <p><code>org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
- <p>Note: The xerces jar file must be included, because xp has no dom support.</p>
- </s3>
-- <s3 title="Method Two">
- <p>Rather than performing transformation with an XSLT before invoking FOP, it is
- possible, if you use Xalan as your XSLT engine, to just call FOP and have it call
- Xalan for you. To do this, run the class org.apache.fop.apps.XalanCommandLine with the
- source XML file name, XSL file name and PDF file name as arguments. You will
- need to include Xalan in your classpath and so you might invoke
- </p>
- <p><code>java -cp fop.jar;xalan.jar;xerces.jar;w3c.jar</code></p>
- <p><code>org.apache.fop.apps.XalanCommandLine xml-file xsl-file pdf-file</code></p>
- <p>Again, if your SAX Parser is other than Xerces, you will need to set the property
- org.xml.sax.parser to the SAX Parser class to use.
- </p>
- </s3>
- <s3 title="Method Three">
- <p>If you already produced the FO file, you can preview the results of your
- transformation without using any pdf viewer by invoking FOP with the viewer
- application. You will need to include FOP and your XML Parser in your classpath
- </p>
- <p><code>java -cp fop.jar;xerces.jar;w3c.jar</code></p>
- <p><code>org.apache.fop.apps.AWTCommandLine fo-file </code></p>
- <p>The viewer uses the swing classes.</p>
- </s3>
- </s2>
- <s2 title="Commandline switches">
- <p>Fop supports at the moment following commandline switches: </p>
- <s3 title="-d">
- <p>This switch informs you in case of an error of the method stack</p>
- </s3>
- <s3 title="-cUserconfig.xml">
- <p>The switch '-c' immediately followed by a file name, p.e. Userconfig.xml, tells Fop to use this
- user configuration file.
- </p>
- </s3>
- </s2>
- <s2 title="Running FOP on MacOS">
- <!-- Contributed by Arved Sandstrom -->
- <p>Ensure that you have a recent MRJ, and that you have downloaded and
- unpacked the XP and SAX distributions. The xp.jar and sax.jar files work
- as is on MacOS.
+ <p><code>Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-pcl|-txt|-print] &lt;outfile></code></p>
+ <p>[OPTIONS]<br/>
+ <source>
+ -d debug mode<br/>
+ -x dump configuration settings<br/>
+ -q quiet mode<br/>
+ -c cfg.xml use additional configuration file cfg.xml<br/>
+ -l lang the language to use for user information<br/>
+ </source>
</p>
- <p>Drag the FOP jarfile onto the JBindery icon. When the first dialog
- appears, type "org.apache.fop.apps.CommandLine" in the "Class name" field.
- Using UNIX syntax, type the names of the input formatting-object file and
- the output PDF in the "Optional parameters" field.
+ <p>[INPUT]<br/>
+ <source>
+ infile xsl:fo input file (the same as the next)<br/>
+ -fo infile xsl:fo input file<br/>
+ -xml infile xml input file, must be used together with -xsl<br/>
+ -xsl stylesheet xslt stylesheet<br/>
+ </source>
</p>
- <p>Click on the Classpath icon. To add the xp.jar and sax.jar files, click
- the "Add .zip file" button, navigate to the file in question, and click
- Open.
+
+ <p>[OUTPUT]<br/>
+ <source>
+ outfile input will be rendered as pdf file into outfile<br/>
+ -pdf outfile input will be rendered as pdf file (outfile req'd)<br/>
+ -awt input will be displayed on screen<br/>
+ -mif outfile input will be rendered as mif file (outfile req'd)<br/>
+ -pcl outfile input will be rendered as pcl file (outfile req'd)<br/>
+ -txt outfile input will be rendered as text file (outfile req'd)<br/>
+ -print input file will be rendered and sent to the printer<br/>
+ see options with "-print help"<br/>
+ </source>
+ </p>
+
+ <p>[Examples]<br/>
+ <source>
+ Fop foo.fo foo.pdf<br/>
+ Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)<br/>
+ Fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf<br/>
+ Fop foo.fo -mif foo.mif<br/>
+ Fop foo.fo -print or Fop -print foo.fo<br/>
+ Fop foo.fo -awt<br/>
+ </source>
</p>
- <p>Once both are added (the FOP jarfile will already be in the list), click
- Run. A "stdout" window will appear and display FOP runtime messages.
- </p>
</s2>
+
<s2 title="Problems">
<p>If you have problems running FOP, please have a look at the
<jump href="http://www.owal.co.uk:8090/asf/servlet/asf/screen/DisplayTopics/action/SetAll/project_id/18/faq_id/276">FOP FAQ</jump>. If you don't find a solution there,
@@ -116,3 +79,5 @@
</s2>
</s1>
+
+