aboutsummaryrefslogtreecommitdiffstats
path: root/docs/xml-docs/fop/architecture.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/xml-docs/fop/architecture.xml')
-rw-r--r--docs/xml-docs/fop/architecture.xml87
1 files changed, 68 insertions, 19 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">