fotis 01/04/03 06:47:47
Modified: sources/fop architecture.xml compiling.xml embedding.xml
examples.xml extensions.xml fonts.xml
implemented.xml involved.xml limitations.xml
properties.xml readme.xml resources.xml running.xml
Log:
update docs for 0.18.1 release
Revision Changes Path
1.5 +68 -19 xml-site/sources/fop/architecture.xml
Index: architecture.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/architecture.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- architecture.xml 2001/02/06 10:19:35 1.4
+++ architecture.xml 2001/04/03 13:47:45 1.5
@@ -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 @@
<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">
1.6 +3 -19 xml-site/sources/fop/compiling.xml
Index: compiling.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/compiling.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- compiling.xml 2001/02/06 08:56:23 1.5
+++ compiling.xml 2001/04/03 13:47:45 1.6
@@ -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>
1.6 +23 -11 xml-site/sources/fop/embedding.xml
Index: embedding.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/embedding.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- embedding.xml 2001/02/06 08:56:24 1.5
+++ embedding.xml 2001/04/03 13:47:45 1.6
@@ -16,6 +16,20 @@
instantiate the class itself. The advantage of the latter is it
enables runtime determination of Renderer and ElementMapping(s).
</p>
+ <p>The simplest way to use Driver is to instantiate it with the
+ InputSource and OutputStream, then set the renderer desired and
+ call the run method.
+ </p>
+ <p>Here is an example use of Driver which outputs PDF:
+ </p>
+ <source><![CDATA[
+ Driver driver = new Driver(new InputSource (args[0]),
+ new FileOutputStream(args[1]));
+ driver.setRenderer(RENDER_PDF);
+ driver.run();
+]]></source>
+
+
<p>Once the Driver is set up, the buildFOTree method
is called. Depending on whether DOM or SAX is being used, the
invocation of the method is either buildFOTree(Document) or
@@ -28,17 +42,15 @@
called in that order.
</p>
<p>Here is an example use of Driver:</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><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p>
- <p><code>driver.format();</code></p>
- <p><code>driver.render();</code></p>
- <p>Have a look at the classes CommandLine or XalanCommandLine for complete
examples.</p>
+ <source><![CDATA[
+ Driver driver = new Driver();
+ driver.setRenderer(Driver.RENDER_PDF);
+ driver.buildFOTree(parser, fileInputSource(args[0]));
+ driver.format();
+ driver.setOutputStream(new FileOutputStream(args[1]));
+ driver.render();
+]]></source>
+ <p>Have a look at the classes CommandLineStarter or FopServlet for
complete examples.</p>
</s2>
<s2 title="Using Fop in a servlet">
<p>In the directory xml-fop/docs/examples/embedding you can find a
working example how to use
1.5 +19 -5 xml-site/sources/fop/examples.xml
Index: examples.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/examples.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- examples.xml 2000/10/13 09:41:16 1.4
+++ examples.xml 2001/04/03 13:47:45 1.5
@@ -6,25 +6,39 @@
<s1 title="Examples">
<p>Examples for the use of xsl:fo can be found in the Fop distribution
in
the subdirectory xml-fop/docs/examples/fo. You can start
transformation of all fo files into pdf
- files by starting xml-fop/docs/examples/runtests.
+ files by starting xml-fop/docs/examples/runtests. The resulting test
files can be found in
+ xml-fop/docs/examples/tests
</p>
<p>At the moment the following files are part of the distribution:</p>
<ul>
- <li>normal.fo - a very simple file showing the use of a 2 level of
headings, normal text and a header.
+ <li>simple.fo - a very simple file which gives use a first impression
of the structure of an fo file
</li>
- <li>table.fo - a simple table
+ <li>normal.fo - a simple file showing the use of a 2 level of
headings, normal text and a header.
</li>
- <li>list.fo - a simple list
+ <li>table.fo - some table examples
</li>
+ <li>list.fo - a short tutorial how to use list fo's and properties
+ </li>
<li>images.fo - shows how to embed gif and jpg images into the xsl:fo
file using external-graphic.
</li>
<li>border.fo - a not so simple example how to use borders in tables
</li>
<li>extensive.fo - a longer test file containing a lot of different
flow objects and properties.
A good candidate to test your bugfix or new Fop code.
+ </li>
+ <li>leader.fo - shows different uses of fo:leader, p.e. as rule or in
a table of content
+ </li>
+ <li>normalex.fo - shows the use of computed property values
+ </li>
+ <li>inhprop.fo - shows the use of inherited property values
+ </li>
+ <li>instream.fo - shows the use of fo:instream-foreign-object together
with svg
+ </li>
+ <li>textdeko.fo - shows the use of the property textdecoration
</li>
- <li>leader.fo - a very simple example of a rule
+ <li>readme.fo - uses an old version of Fop documentation for a longer
example
</li>
+
<li>Look also into the directory examples/svg. There you find some
very extensive svg examples.
Just start makedoc.
</li>
1.2 +13 -11 xml-site/sources/fop/extensions.xml
Index: extensions.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/extensions.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- extensions.xml 2001/02/06 10:19:36 1.1
+++ extensions.xml 2001/04/03 13:47:45 1.2
@@ -9,19 +9,21 @@
<s2 title="Bookmarks">
<p>You can provide outlines inside the root object (but outside any
page-sequences or
other formatting objects). Here's an example of an outline entry:</p>
+ <source>
+<![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xml.apache.org/fop/extensions">
+ <fox:outline internal-destination="sec3">
+ <fox:label>Running FOP</fox:label>
- <p><code><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
-   
xmlns:fox="http://xml.apache.org/fop/extensions"></code></p>
- <p><code><fox:outline internal-destination="sec3"></code></p>
- <p><code>   <fox:label>Running
FOP</fox:label></code></p>
-
- <p><code>  <fox:outline
internal-destination="sec3-1"></code></p>
-
<p><code>    <fox:label>Prerequisites</fox:label></code></p>
- <p><code>  </fox:outline></code></p>
- <p><code><fox:outline></code></p>
- <p><code></fo:root></code></p>
+ <fox:outline internal-destination="sec3-1">
+ <fox:label>Prerequisites</fox:label>
+ </fox:outline>
+ <fox:outline>
+</fo:root>
+]]></source>
<p>It works similarly to a basic-link. There is also an
external-destination
- property, but it isn't supported currently.</p>
+ property, but it isn't supported currently. See the pdfoutline.fo
file in
+ docs/examples/fo for a more complete example.</p>
</s2>
</s1>
1.2 +53 -98 xml-site/sources/fop/fonts.xml
Index: fonts.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/fonts.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fonts.xml 2001/02/06 08:56:25 1.1
+++ fonts.xml 2001/04/03 13:47:45 1.2
@@ -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
<class-name> 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><property name="ZapfDingbats.xml"
value="${build.codegen}/ZapfDingbats.xml"/></code>
- </p>
- <p>
- <code><property name="BauerBodoni.xml"
value="${build.codegen}/BauerBodoni.xml"/></code>
- </p>
- <p>
- <code>...</code>
- </p>
- <p>
- <code><xslt infile="${ZapfDingbats.xml}"
xsltfile="${fontfile.xsl}"</code>
- </p>
- <p>
-
<code>outfile="${build.src}/${replacestring}/render/pdf/fonts/ZapfDingbats.java"
smart="yes"/></code>
- </p>
<p>
- <code><xslt infile="${BauerBodoni.xml}"
xsltfile="${t1fontfile.xsl}"</code>
- </p>
- <p>
-
<code>outfile="${build.src}/${replacestring}/render/pdf/fonts/BauerBodoniRoman.java"
smart="yes"/></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>
+<font metrics-file="cyberbit.xml" kerning="yes"
embed-file="C:\WINNT\Fonts\Cyberbit.ttf">
+ <font-triplet name="Cyberbit" style="normal" weight="normal">
+</font>
+</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>
+ Example on generating metrics for a .ttc file:
</p>
- <p>Note: The class name to use is visible in the
<class-name> element of the font metrics 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:
- </p>
- <p>Look for the section "Initialization target" and add
the following line at the end of it</p>
- <p><code><property name="tcm.xml"
value="${build.codegen}/tcm.xml"></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><xslt infile="${tcm.xml}"
xsltfile="${ttffontfile.xsl}"
-
outfile="${build.src}/${replacestring}/render/pdf/fonts/TCM.java"
smart="yes"/></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 title="Register the fonts within FOP">
+ <p>
+ Same as for Type 1 fonts.
+ </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>
1.7 +9 -5 xml-site/sources/fop/implemented.xml
Index: implemented.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/implemented.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- implemented.xml 2001/02/06 08:56:25 1.6
+++ implemented.xml 2001/04/03 13:47:45 1.7
@@ -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>
1.9 +1 -1 xml-site/sources/fop/involved.xml
Index: involved.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/involved.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- involved.xml 2001/02/06 08:56:26 1.8
+++ involved.xml 2001/04/03 13:47:45 1.9
@@ -17,7 +17,7 @@
to <jump href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</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&r=1&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">
1.6 +0 -12 xml-site/sources/fop/limitations.xml
Index: limitations.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/limitations.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- limitations.xml 2001/02/06 08:56:26 1.5
+++ limitations.xml 2001/04/03 13:47:45 1.6
@@ -20,18 +20,6 @@
</p>
</s2>
- <s2 title="list-block">
- <p>The fo working draft allows describes two ways to markup lists.The
list-block must have as
- children either: 1) pairs of fo:list-item-label and fo:list-item-body
formatting objects, or
- 2) fo:list-item formatting objects.</p>
- <p>At the moment FOP only implements the second way. Therefore a list
has a basic structure like this:</p>
- <p><code><fo:list-block></code></p>
- <p><code><fo:list-item></code></p>
-
<p><code><fo:list-item-label><fo:block></fo:block></fo:list-item-label></code></p>
-
<p><code><fo:list-item-body><fo:block></fo:block></fo:list-item-body></code></p>
- <p><code></fo:list-item></code></p>
- <p><code></fo:list-block></code></p>
- </s2>
<s2 title="Padding">
<p>Padding works in conjunction with indents and spaces. It is only
implemented
for blocks. At the moment padding can't be used to make extra space
(indents+spaces
1.2 +0 -0 xml-site/sources/fop/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/properties.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- properties.xml 2001/02/06 08:56:27 1.1
+++ properties.xml 2001/04/03 13:47:45 1.2
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- $Id: properties.xml,v 1.1 2001/02/06 08:56:27 fotis Exp $ -->
+<!-- $Id: properties.xml,v 1.2 2001/04/03 13:47:45 fotis Exp $ -->
<!--
Authors:
Karen Lease
1.9 +3 -12 xml-site/sources/fop/readme.xml
Index: readme.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/readme.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- readme.xml 2001/02/06 08:56:27 1.8
+++ readme.xml 2001/04/03 13:47:45 1.9
@@ -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.1 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>
1.2 +2 -1 xml-site/sources/fop/resources.xml
Index: resources.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/resources.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- resources.xml 2001/02/06 08:56:28 1.1
+++ resources.xml 2001/04/03 13:47:45 1.2
@@ -7,7 +7,7 @@
<s2 title="Specifications">
<ul>
<li><jump href="http://www.w3.org/TR/2000/CR-xsl-20001121/">XSL-FO
Candidate Recommendation (21 November 2000)</jump></li>
- <li><jump
href="http://www.renderx.com/Tests/validator/fo2000.dtd.html">A dtd for the
XSL-FO WD from October provided by N. Grigoriev from RenderX</jump></li>
+ <li><jump
href="http://www.renderx.com/Tests/validator/fo2000.dtd.html">A dtd for the
XSL-FO CR from November provided by N. Grigoriev from RenderX</jump></li>
<li><jump href="http://www.w3.org/TR/2000/CR-SVG-20001102/">Supported
SVG Candidate Recommendation (02 November 2000)</jump></li>
<li><jump href="http://www.w3.org/TR/REC-xml">XML
Recommendation</jump></li>
<li><jump href="http://www.w3.org/TR/xslt">XSLT
Recommendation</jump></li>
@@ -23,6 +23,7 @@
<li><jump
href="http://www.ibiblio.org/xml/books/bible/updates/15.html">Elliotte Rusty
Harold: Chapter 15 on xsl:fo from his excellent xml book</jump></li>
<li><jump
href="http://www.sun.com/software/xml/developers/slides-dtd/">Paul Sandoz:
Using formatting objects with the slides dtd</jump></li>
<li><jump
href="http://www.xml.com/pub/a/2001/01/17/xsl-fo/index.html">J. David
Eisenberg: Using XSL Formatting Objects</jump></li>
+ <li><jump
href="http://zvon.org/xxl/xslfoReference/Output/index.html">Miloslav Nic: XSL
FO reference</jump></li>
</ul>
</s2>
<s2 title="Other resources">
1.9 +62 -97 xml-site/sources/fop/running.xml
Index: running.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/fop/running.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- running.xml 2001/02/06 08:56:28 1.8
+++ running.xml 2001/04/03 13:47:45 1.9
@@ -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>
- <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>
- <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>
- <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>
+ <p><code>Fop [options] [-fo|-xml] infile [-xsl file]
[-awt|-pdf|-mif|-pcl|-txt|-print] <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>[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>[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>
</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,
@@ -115,4 +78,6 @@
</p>
</s2>
</s1>
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]