xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r840560 [16/16] - in /websites/staging/xmlgraphics/trunk/content: ./ fop/0.95/ fop/1.0/ fop/1.1/ fop/trunk/
Date Mon, 03 Dec 2012 15:47:54 GMT
Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/output.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/output.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/output.html Mon Dec  3 15:47:41 2012
@@ -341,11 +341,11 @@ $(document).ready(function () {
         <div id="items">
         </div>
       	<!-- <div id="breadcrumb"><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/trunk/">Trunk</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk39-fop-output-formats">Apache&trade; FOP Output Formats</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk40-fop-output-formats">Apache&trade; FOP Output Formats</h1>
 <p><authors><person email="keiron@aftexsw.com" name="Keiron Liddle"></person><person email="" name="Art Welch"></person></authors></p>
 <p>Apache&trade; FOP supports multiple output formats by using a different renderer for each format. The renderers do not all have the same set of capabilities, sometimes because of the output format itself, sometimes because some renderers get more development attention than others.</p>
-<h2 id="general-information-wzxhzdk47wzxhzdk48">General Information <a id="general"></a></h2>
-<h3 id="fonts-wzxhzdk49wzxhzdk50">Fonts <a id="general-fonts"></a></h3>
+<h2 id="general-information-wzxhzdk48wzxhzdk49">General Information <a id="general"></a></h2>
+<h3 id="fonts-wzxhzdk50wzxhzdk51">Fonts <a id="general-fonts"></a></h3>
 <p>Most FOP renderers use a FOP-specific system for font registration. However, the Java2D/AWT and print renderers use the Java AWT package, which gets its font information from the operating system registration. This can result in several differences, including actually using different fonts, and having different font metrics for the same font. The net effect is that the layout of a given FO document can be quite different between renderers that do not use the same font information.</p>
 <p>Theoretically, there's some potential to make the output of the PDF/PS renderers match the output of the Java2D-based renderers. If FOP used the font metrics from its own font subsystem but still used Java2D for text painting in the Java2D-based renderers, this could probably be achieved. However, this approach hasn't been implemented, yet.</p>
 <p>With a work-around, it is possible to match the PDF/PS output in a Java2D-based renderer pretty closely. The clue is to use the <a href="intermediate.html">intermediate format</a> . The trick is to layout the document using FOP's own font subsystem but then render the document using Java2D. Here are the necessary steps (using the command-line):</p>
@@ -369,7 +369,7 @@ $(document).ready(function () {
 <p><code>fop -atin myfile.at.xml -tiff myfile.tiff</code> </p>
 </li>
 </ol>
-<h3 id="output-to-a-printer-or-other-device-wzxhzdk51wzxhzdk52">Output to a Printer or Other Device <a id="general-direct-output"></a></h3>
+<h3 id="output-to-a-printer-or-other-device-wzxhzdk52wzxhzdk53">Output to a Printer or Other Device <a id="general-direct-output"></a></h3>
 <p>The most obvious way to print your document is to use the FOP <a href="#print">print renderer</a> , which uses the Java2D API (AWT). However, you can also send output from the Postscript renderer directly to a Postscript device, or output from the PCL renderer directly to a PCL device.</p>
 <p>Here are Windows command-line examples for Postscript and PCL:
 fop ... -ps \computername\printerfop ... -pcl \computername\printer
@@ -377,12 +377,12 @@ Here is some Java code to accomplish the
 proc = Runtime.getRuntime().exec("lp -d" + print_queue + " -o -dp -");
 out = proc.getOutputStream();
 Set the output MIME type to "application/x-pcl" (MimeConstants.MIME_PCL) and it happily sends the PCL to the UNIX printer queue.</p>
-<h2 id="pdf-wzxhzdk53wzxhzdk54">PDF <a id="pdf"></a></h2>
+<h2 id="pdf-wzxhzdk54wzxhzdk55">PDF <a id="pdf"></a></h2>
 <p>PDF is the best supported output format. It is also the most accurate with text and layout. This creates a PDF document that is streamed out as each page is rendered. This means that the internal page index information is stored near the end of the document. The PDF version supported is 1.4. PDF versions are forwards/backwards compatible.</p>
 <p>Note that FOP does not currently support PDF/A-1a. Support for <a href="accessibility.html">Tagged PDF</a> , <a href="pdfa.html">PDF/A-1b</a> and <a href="pdfx.html">PDF/X</a> has recently been added, however.</p>
-<h3 id="fonts-wzxhzdk55wzxhzdk56">Fonts <a id="pdf-fonts"></a></h3>
+<h3 id="fonts-wzxhzdk56wzxhzdk57">Fonts <a id="pdf-fonts"></a></h3>
 <p>PDF has a set of fonts that are always available to all PDF viewers; to quote from the PDF Specification: <em>"PDF prescribes a set of 14 standard fonts that can be used without prior definition. These include four faces each of three Latin text typefaces (Courier, Helvetica, and Times), as well as two symbolic fonts (Symbol and ITC Zapf Dingbats). These fonts, or suitable substitute fonts with the same metrics, are guaranteed to be available in all PDF viewer applications."</em> </p>
-<h3 id="post-processing-wzxhzdk57wzxhzdk58">Post-processing <a id="pdf-postprocess"></a></h3>
+<h3 id="post-processing-wzxhzdk58wzxhzdk59">Post-processing <a id="pdf-postprocess"></a></h3>
 <p>FOP does not currently support several desirable PDF features: watermarks and signatures. One workaround is to use Adobe Acrobat (the full version, not the Reader) to process the file manually or with scripting that it supports.</p>
 <p>Another popular post-processing tool is <a href="http://www.lowagie.com/iText">iText</a> , which has tools for adding security features, document properties, watermarks, and many other features to PDF files.
 <warning>Caveat: iText may swallow PDF bookmarks. But <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37589">Jens Stavnstrup tells us</a> that this doesn't happen if you use iText's PDFStamper.</warning>
@@ -432,7 +432,7 @@ Here is some sample code that uses iText
 
 
 <p>Check the iText tutorial and documentation for setting access flags, password, encryption strength and other parameters.</p>
-<h3 id="watermarks-wzxhzdk61wzxhzdk62">Watermarks <a id="pdf-watermark"></a></h3>
+<h3 id="watermarks-wzxhzdk62wzxhzdk63">Watermarks <a id="pdf-watermark"></a></h3>
 <p>In addition to the <a href="#pdf-postprocess">PDF Post-processing</a> options, consider the following workarounds:</p>
 <ul>
 <li>
@@ -442,14 +442,14 @@ Here is some sample code that uses iText
 <p>(submitted by Trevor Campbell) Place an image in a region that overlaps the flowing text. For example, make region-before large enough to contain your image. Then include a block (if necessary, use an absolutely positioned block-container) containing the watermark image in the static-content for the region-before. Note that the image will be drawn on top of the normal content.</p>
 </li>
 </ul>
-<h3 id="extensions-wzxhzdk63wzxhzdk64">Extensions <a id="pdf-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk64wzxhzdk65">Extensions <a id="pdf-extensions"></a></h3>
 <p>The PDF Renderer supports some PDF specific extensions which can be embedded into the input FO document. To use the extensions the appropriate namespace must be declared in the fo:root element like this:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
          <span class="n">xmlns:pdf</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/pdf&quot;</span><span class="o">&gt;</span>
 </pre></div>
 
 
-<h4 id="embedded-fileswzxhzdk65wzxhzdk66">Embedded Files<a id="pdf-embedded-file"></a></h4>
+<h4 id="embedded-fileswzxhzdk66wzxhzdk67">Embedded Files<a id="pdf-embedded-file"></a></h4>
 <p>It is possible to attach/embed arbitrary files into a PDF file. You can give a name and a description of the file. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:declarations&gt;</span>
   <span class="nt">&lt;pdf:embedded-file</span> <span class="na">filename=</span><span class="s">&quot;image.jpg&quot;</span> <span class="na">src=</span><span class="s">&quot;url(file:///C:/Temp/myimage.jpg)&quot;</span> <span class="na">description=</span><span class="s">&quot;My image&quot;</span><span class="nt">/&gt;</span>
@@ -465,9 +465,9 @@ Here is some sample code that uses iText
 
 
 <p>Note: Not all PDF Viewers (including some Acrobat Versions) will open the embedded file when clicking on the link. In that case, the user will have to open he attachment via the separate list of file attachments.</p>
-<h2 id="postscript-wzxhzdk67wzxhzdk68">PostScript <a id="ps"></a></h2>
+<h2 id="postscript-wzxhzdk68wzxhzdk69">PostScript <a id="ps"></a></h2>
 <p>The PostScript renderer has been brought up to a similar quality as the PDF renderer, but may still be missing certain features. It provides good support for most text and layout. Images and SVG are not fully supported, yet. Currently, the PostScript renderer generates PostScript Level 3 with most DSC comments. Actually, the only Level 3 features used are the FlateDecode and DCTDecode filter (the latter is used for 1:1 embedding of JPEG images), everything else is Level 2.</p>
-<h3 id="configuration-wzxhzdk69wzxhzdk70">Configuration <a id="ps-configuration"></a></h3>
+<h3 id="configuration-wzxhzdk70wzxhzdk71">Configuration <a id="ps-configuration"></a></h3>
 <p>The PostScript renderer configuration currently allows the following settings:</p>
 <div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/postscript&quot;</span><span class="nt">&gt;</span>
   <span class="nt">&lt;auto-rotate-landscape&gt;</span>false<span class="nt">&lt;/auto-rotate-landscape&gt;</span>
@@ -486,7 +486,7 @@ Here is some sample code that uses iText
 <p>The default value for the "safe-set-page-device" setting is "false". Setting it to "true" will cause the renderer to invoke a postscript macro which guards against the possibility of invalid/unsupported postscript key/values being issued to the implementing postscript page device.</p>
 <p>The default value for the "dsc-compliant" setting is "true". Setting it to "false" will break DSC compliance by minimizing the number of setpagedevice calls in the postscript document output. This feature may be useful when unwanted blank pages are experienced in your postscript output. This problem is caused by the particular postscript implementation issuing unwanted postscript subsystem initgraphics/erasepage calls on each setpagedevice call.</p>
 <p>The default value for the "rendering" setting is "quality". Setting it to "size" optimizes rendering for smaller file sizes which can involve minor compromises in rendering quality. For example, solid borders are then painted as plain rectangles instead of the elaborate painting instructions required for mixed-color borders.</p>
-<h3 id="limitations-wzxhzdk71wzxhzdk72">Limitations <a id="ps-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk72wzxhzdk73">Limitations <a id="ps-limitations"></a></h3>
 <ul>
 <li>
 <p>Images and SVG may not be displayed correctly. SVG support is far from being complete. No image transparency is available.</p>
@@ -501,10 +501,10 @@ Here is some sample code that uses iText
 <p>PPD support is still missing.</p>
 </li>
 </ul>
-<h2 id="pcl-wzxhzdk73wzxhzdk74">PCL <a id="pcl"></a></h2>
+<h2 id="pcl-wzxhzdk74wzxhzdk75">PCL <a id="pcl"></a></h2>
 <p>This format is for the Hewlett-Packard PCL printers and other printers supporting PCL. It 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, HP GL/2 and PJL. This should allow any device fully supporting PCL 5 to be able to print the output generated by the PCLRenderer. PJL is used to control the print job and switch to the PCL language. PCL 5 is used for text, raster graphics and rectangular fill graphics. HP GL/2 is used for more complex painting operations. Certain painting operations are done off-screen and rendered to PCL as bitmaps because of limitations in PCL 5.</p>
-<h3 id="references-wzxhzdk75wzxhzdk76">References <a id="pcl-references"></a></h3>
+<h3 id="references-wzxhzdk76wzxhzdk77">References <a id="pcl-references"></a></h3>
 <ul>
 <li>
 <p><a href="http://en.wikipedia.org/wiki/Printer_Control_Language">WikiPedia entry on PCL</a> </p>
@@ -513,7 +513,7 @@ Here is some sample code that uses iText
 <p><a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568">Technical reference documents on PCL from Hewlett-Packard</a> </p>
 </li>
 </ul>
-<h3 id="limitations-wzxhzdk77wzxhzdk78">Limitations <a id="pcl-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk78wzxhzdk79">Limitations <a id="pcl-limitations"></a></h3>
 <ul>
 <li>
 <p>Text or graphics outside the left or top of the printable area are not rendered properly. This is a limitation of PCL, not FOP. 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.</p>
@@ -540,7 +540,7 @@ Here is some sample code that uses iText
 <p>Currently, there's no support for clipping and image transparency, largely because PCL 5 has certain limitations.</p>
 </li>
 </ul>
-<h3 id="configuration-wzxhzdk79wzxhzdk80">Configuration <a id="pcl-configuration"></a></h3>
+<h3 id="configuration-wzxhzdk80wzxhzdk81">Configuration <a id="pcl-configuration"></a></h3>
 <p>The PCL renderer configuration currently allows the following settings:</p>
 <div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/vnd.hp-PCL&quot;</span><span class="nt">&gt;</span>
   <span class="nt">&lt;rendering&gt;</span>quality<span class="nt">&lt;/rendering&gt;</span>
@@ -554,14 +554,14 @@ Here is some sample code that uses iText
 <p>The default value for the "text-rendering" setting is "auto" which paints the base fonts using PCL fonts. Non-base fonts are painted as bitmaps through Java2D. If the mix of painting methods results in unwelcome output, you can set this to "bitmap" which causes all text to be rendered as bitmaps.</p>
 <p>The default value for the "disable-pjl" setting is "false". This means that the PCL renderer usually generates PJL commands before and after the document in order to switch a printer into PCL language. PJL commands can be disabled if you set this value to "true".</p>
 <p>You can control the output resolution for the PCL using the "target resolution" setting on the FOUserAgent. The actual value will be rounded up to the next supported PCL resolution. Currently, only 300 and 600 dpi are supported which should be enough for most use cases. Note that this setting directly affects the size of the output file and the print quality.</p>
-<h3 id="extensions-wzxhzdk81wzxhzdk82">Extensions <a id="pcl-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk82wzxhzdk83">Extensions <a id="pcl-extensions"></a></h3>
 <p>The PCL Renderer supports some PCL specific extensions which can be embedded into the input FO document. To use the extensions the appropriate namespace must be declared in the fo:root element like this:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
          <span class="n">xmlns:pcl</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/pcl&quot;</span><span class="o">&gt;</span>
 </pre></div>
 
 
-<h4 id="page-source-tray-selectionwzxhzdk83wzxhzdk84">Page Source (Tray selection)<a id="pcl-page-source"></a></h4>
+<h4 id="page-source-tray-selectionwzxhzdk84wzxhzdk85">Page Source (Tray selection)<a id="pcl-page-source"></a></h4>
 <p>The page-source extension attribute on fo:simple-page-master allows to select the paper tray the sheet for a particular simple-page-master is to be taken from. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:layout-master-set&gt;</span>
   <span class="nt">&lt;fo:simple-page-master</span> <span class="na">master-name=</span><span class="s">&quot;simple&quot;</span> <span class="na">pcl:paper-source=</span><span class="s">&quot;2&quot;</span><span class="nt">&gt;</span>
@@ -572,7 +572,7 @@ Here is some sample code that uses iText
 
 
 <p>Note: the tray number is a positive integer and the value depends on the target printer. Not all PCL printers support the same paper trays. Usually, "1" is the default tray, "2" is the manual paper feed, "3" is the manual envelope feed, "4" is the "lower" tray and "7" is "auto-select". Consult the technical reference for your printer for all available values.</p>
-<h4 id="output-binwzxhzdk85wzxhzdk86">Output Bin<a id="pcl-output-bin"></a></h4>
+<h4 id="output-binwzxhzdk86wzxhzdk87">Output Bin<a id="pcl-output-bin"></a></h4>
 <p>The <code>output-bin</code> extension attribute on fo:simple-page-master allows to select the output bin into which the printed output should be fed. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:layout-master-set&gt;</span>
   <span class="nt">&lt;fo:simple-page-master</span> <span class="na">master-name=</span><span class="s">&quot;simple&quot;</span> <span class="na">pcl:output-bin=</span><span class="s">&quot;2&quot;</span><span class="nt">&gt;</span>
@@ -583,7 +583,7 @@ Here is some sample code that uses iText
 
 
 <p>Note: the output bin number is a positive integer and the value depends on the target printer. Not all PCL printers support the same output bins. Usually, "1" is the upper output bin, "2" is the lower (rear) output bin. Consult the technical reference for your printer for all available values.</p>
-<h4 id="page-duplex-modewzxhzdk87wzxhzdk88">Page Duplex Mode<a id="pcl-duplex-mode"></a></h4>
+<h4 id="page-duplex-modewzxhzdk88wzxhzdk89">Page Duplex Mode<a id="pcl-duplex-mode"></a></h4>
 <p>The duplex-mode extension attribute on fo:simple-page-master allows to select the duplex mode to be used for a particular simple-page-master. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:layout-master-set&gt;</span>
   <span class="nt">&lt;fo:simple-page-master</span> <span class="na">master-name=</span><span class="s">&quot;simple&quot;</span> <span class="na">pcl:duplex-mode=</span><span class="s">&quot;0&quot;</span><span class="nt">&gt;</span>
@@ -594,7 +594,7 @@ Here is some sample code that uses iText
 
 
 <p>Note: the duplex is a positive integer and the value depends on the target printer. Not all PCL printers support duplexing. Usually, "0" is simplex, "1" is duplex (long-edge binding), "2" is duplex (short-edge binding). Consult the technical reference for your printer for all available values.</p>
-<h2 id="afp-wzxhzdk89wzxhzdk90">AFP <a id="afp"></a></h2>
+<h2 id="afp-wzxhzdk90wzxhzdk91">AFP <a id="afp"></a></h2>
 <p>The FOP AFP Renderer deals with creating documents conforming to the IBM AFP document architecture also refered to as MO:DCA (Mixed Object Document Content Architecture).</p>
 <p>The mapping of XSL-FO elements to the major MO:DCA structures is as follows:</p>
 <table>
@@ -620,7 +620,7 @@ Here is some sample code that uses iText
 </tbody>
 </table>
 <p>FOP creates exactly one Document per Printfile with an optional Resource Group at the beginning. FOP does not create document indices.</p>
-<h3 id="references-wzxhzdk91wzxhzdk92">References <a id="afp-references"></a></h3>
+<h3 id="references-wzxhzdk92wzxhzdk93">References <a id="afp-references"></a></h3>
 <ul>
 <li>
 <p><a href="http://en.wikipedia.org/wiki/Advanced_Function_Presentation">AFP (Advanced Function Presentation)</a> </p>
@@ -632,7 +632,7 @@ Here is some sample code that uses iText
 <p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPOutput">Technical notes on AFP output in FOP</a> </p>
 </li>
 </ul>
-<h3 id="limitations-wzxhzdk93wzxhzdk94">Limitations <a id="afp-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk94wzxhzdk95">Limitations <a id="afp-limitations"></a></h3>
 <p>This list is most likely badly incomplete.</p>
 <ul>
 <li>
@@ -642,16 +642,19 @@ Here is some sample code that uses iText
 <p>Only IBM outline and raster fonts and to a limited extend the original fonts built into FOP are supported. Support for TrueType fonts may be added later.</p>
 </li>
 </ul>
-<h3 id="deployment-in-older-environments-wzxhzdk95wzxhzdk96">Deployment in older environments <a id="afp-compatibility"></a></h3>
+<h3 id="deployment-in-older-environments-wzxhzdk96wzxhzdk97">Deployment in older environments <a id="afp-compatibility"></a></h3>
 <p>There are still a big number of older (or limited) MO:DCA/IPDS environments in production out there. AFP has grown in functionality over time and not every environment supports the latest features. We're trying to make AFP output work in as many environments as possible. However, to make AFP output work on older environments it is recommended to set to configuration to 1 bit per pixel (see below on how to do this). In this case, all images are converted to bi-level images using IOCA function set 10 (FS10) and are enclosed in page-segments since some implementation cannot deal with IOCA objects directly. If a higher number of bits per pixel is configured, FOP has to switch to at least FS11 which may not work everywhere.</p>
-<h3 id="configuration-wzxhzdk97wzxhzdk98">Configuration <a id="afp-configuration"></a></h3>
-<h4 id="fontswzxhzdk99wzxhzdk100">Fonts<a id="afp-font-config"></a></h4>
-<p>The AFP Renderer requires special configuration particularly related to fonts. AFP Render configuration is done through the normal FOP configuration file. The MIME type for the AFP Renderer is application/x-afp which means the AFP Renderer section in the FOP configuration file looks like:
-    <renderer mime="application/x-afp">
-      <!-- AFP Renderer -->
-      ...
-    </renderer>
-There are 4 font configuration variants supported:</p>
+<h3 id="configuration-wzxhzdk98wzxhzdk99">Configuration <a id="afp-configuration"></a></h3>
+<h4 id="fontswzxhzdk100wzxhzdk101">Fonts<a id="afp-font-config"></a></h4>
+<p>The AFP Renderer requires special configuration particularly related to fonts. AFP Render configuration is done through the normal FOP configuration file. The MIME type for the AFP Renderer is application/x-afp which means the AFP Renderer section in the FOP configuration file looks like:</p>
+<div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/x-afp&quot;</span><span class="nt">&gt;</span>
+  <span class="c">&lt;!-- AFP Renderer --&gt;</span>
+  ...
+<span class="nt">&lt;/renderer&gt;</span>
+</pre></div>
+
+
+<p>There are 4 font configuration variants supported:</p>
 <ol>
 <li>
 <p>IBM Raster fonts</p>
@@ -798,13 +801,13 @@ A CID-keyed font (Type 0, double-byte ou
 </pre></div>
 
 
-<h4 id="output-resolutionwzxhzdk104wzxhzdk105">Output Resolution<a id="afp-renderer-resolution-config"></a></h4>
+<h4 id="output-resolutionwzxhzdk102wzxhzdk103">Output Resolution<a id="afp-renderer-resolution-config"></a></h4>
 <p>By default the AFP Renderer creates output with a resolution of 240 dpi. This can be overridden by the <renderer-resolution/> configuration element. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;renderer-resolution&gt;</span>240<span class="nt">&lt;/renderer-resolution&gt;</span>
 </pre></div>
 
 
-<h4 id="imageswzxhzdk107wzxhzdk108">Images<a id="afp-image-config"></a></h4>
+<h4 id="imageswzxhzdk105wzxhzdk106">Images<a id="afp-image-config"></a></h4>
 <p>By default the AFP Renderer converts all images to 8 bit grey level. This can be overridden by the <images/> configuration element. Example:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">images</span> <span class="n">mode</span><span class="o">=</span><span class="s">&quot;color&quot;</span> <span class="o">/&gt;</span>
 </pre></div>
@@ -850,7 +853,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>IOCA image data placed in the AFP Resource Group (i.e. non-inline images) is wrapped in a Page Segment for single-bit and monochrome images.</p>
-<h4 id="goca-vector-graphicswzxhzdk110wzxhzdk111">GOCA (Vector Graphics)<a id="afp-goca-config"></a></h4>
+<h4 id="goca-vector-graphicswzxhzdk108wzxhzdk109">GOCA (Vector Graphics)<a id="afp-goca-config"></a></h4>
 <p>Not all AFP implementations support GOCA. Some also have bugs related to GOCA. Therefore, it is desirable to have some control over the generation of GOCA graphics.</p>
 <p>GOCA is enabled by default. You can disable GOCA entirely in which case the AFP support falls back to generating bitmaps for vector graphics. Example:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">goca</span> <span class="n">enabled</span><span class="o">=</span><span class="s">&quot;false&quot;</span><span class="o">/&gt;</span>
@@ -863,32 +866,32 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>If you disable GOCA or let text render as shapes, the size of the generated AFP usually increases considerably.</p>
-<h4 id="shadingwzxhzdk112wzxhzdk113">Shading<a id="afp-shading-config"></a></h4>
+<h4 id="shadingwzxhzdk110wzxhzdk111">Shading<a id="afp-shading-config"></a></h4>
 <p>By default, filled rectangles are painted using their given color using a PTOCA I-axis rule (DIR). But not all environments handle these colors correctly. That's why a setting is supported that paints the rectangles using an ordered dither pattern (bi-level) with an inline IOCA FS10 image that is used together with the "replicate and trim" mapping. The optional "shading" element can be used to control the shading mode. Its default value is "color". To enable the dithered mode, use "dithered". Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;shading&gt;</span>dithered<span class="nt">&lt;/shading&gt;</span>
 </pre></div>
 
 
-<h4 id="resource-group-filewzxhzdk114wzxhzdk115">Resource Group File<a id="afp-resource-group-file"></a></h4>
+<h4 id="resource-group-filewzxhzdk112wzxhzdk113">Resource Group File<a id="afp-resource-group-file"></a></h4>
 <p>By default the AFP Renderer will place all data resource objects such as images within the document of the main output datastream. An external resource group file where document resources may be specified with the <resource-group-file/> configuration element. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;resource-group-file&gt;</span>external_resources.afp<span class="nt">&lt;/resource-group-file&gt;</span>
 </pre></div>
 
 
 <p>Be careful when using this option not to overwrite existing resource files from previous rendering runs.</p>
-<h4 id="resource-level-defaultswzxhzdk117wzxhzdk118">Resource Level Defaults<a id="afp-resource-level-defaults"></a></h4>
+<h4 id="resource-level-defaultswzxhzdk115wzxhzdk116">Resource Level Defaults<a id="afp-resource-level-defaults"></a></h4>
 <p>By default, bitmap image objects (or page segments derived from them) are put in the print-file-level resource group and GOCA graphics are inlined for compatibility with the AFP Workbench tool.</p>
 <p>It is possible to override these defaults, either per image (see the <a href="#afp-foreign-attributes-resource">afp:resource-level</a> extension attribute below) or by specifying different defaults in the configuration:</p>
 <p><default-resource-levels goca="print-file" bitmap="inline"/>
 "goca" refers to GOCA graphics and "bitmap" refers to IOCA images. The possible values for the attributes are "inline" and "print-file". In the future, additional possibilities may be added.</p>
-<h3 id="extensions-wzxhzdk120wzxhzdk121">Extensions <a id="afp-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk118wzxhzdk119">Extensions <a id="afp-extensions"></a></h3>
 <p>The AFP Renderer supports some AFP specific extensions which can be embedded into the input fo document. To use the extensions the appropriate namespace must be declared in the fo:root element like this:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
          <span class="n">xmlns:afp</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="o">&gt;</span>
 </pre></div>
 
 
-<h4 id="page-overlay-ipo-extensionwzxhzdk122wzxhzdk123">Page Overlay (IPO) Extension<a id="afp-page-overlay"></a></h4>
+<h4 id="page-overlay-ipo-extensionwzxhzdk120wzxhzdk121">Page Overlay (IPO) Extension<a id="afp-page-overlay"></a></h4>
 <p>The include-page-overlay extension element allows to define on a per simple-page-master basis a page overlay resource. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:layout-master-set&gt;</span>
   <span class="nt">&lt;fo:simple-page-master</span> <span class="na">master-name=</span><span class="s">&quot;simple&quot;</span><span class="nt">&gt;</span>
@@ -900,7 +903,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>The mandatory name attribute must refer to an 8 character (space padded) resource name that must be known in the AFP processing environment. Optional x and y attributes can be specified to place the Overlay at an offset from the top left of the page.</p>
-<h4 id="page-segment-ips-extensionwzxhzdk124wzxhzdk125">Page Segment (IPS) Extension<a id="afp-page-segment"></a></h4>
+<h4 id="page-segment-ips-extensionwzxhzdk122wzxhzdk123">Page Segment (IPS) Extension<a id="afp-page-segment"></a></h4>
 <p>The include-page-segment extension element allows to define resource substitution for fo:external-graphics elements. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="na">xmlns:afp=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="nt">&gt;</span>
@@ -916,7 +919,7 @@ A CID-keyed font (Type 0, double-byte ou
 <p>The include-page-segment extension element can only occur within a simple-page-master. Multiple include-page-segment extension elements within a simple-page-master are allowed. The mandatory name attribute must refer to an 8 character (space padded) resource name that must be known in the AFP processing environment. The value of the mandatory src attribute is compared against the value of the src attribute in fo:external-graphic elements and if it is identical (string matching is used) in the generated AFP the external graphic is replaced by a reference to the given resource.</p>
 <p>The effect here is that whenever FOP encounters the URI specified in the extension, it will effectively generate code to include the page segment with the given name instead of embedding the image referenced by the URI. The URI is still required as the underlying image serves as a provider for the intrinsic size of the image (At the moment, FOP is unable to extract the intrinsic size of the page segment from an AFP resource file). For the image to appear in an AFP viewer or to be printed, the AFP resource must be available on the target device. FOP does not embed the page segment in the generated file. Please also note that page segments cannot be scaled. They are always rendered in their intrinsic size.</p>
 <p>The include-page-segment extension element has the optional attribute <em>resource-file</em> . The value of this is a URI to a resource containing a page segment with the declared name. In this case FOP embeds the page segment into the generated document so that the external resource does not have to be supplied in the print job.</p>
-<h4 id="tag-logical-element-tle-extensionwzxhzdk126wzxhzdk127">Tag Logical Element (TLE) Extension<a id="afp-tag-logical-element"></a></h4>
+<h4 id="tag-logical-element-tle-extensionwzxhzdk124wzxhzdk125">Tag Logical Element (TLE) Extension<a id="afp-tag-logical-element"></a></h4>
 <p>The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="na">xmlns:afp=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="nt">&gt;</span>
@@ -935,7 +938,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>The tag-logical-element extension element can appear within a simple-page-master (page level) or it can appear as child of page-sequence (page group level). Multiple tag-logical-element extension elements within a simple-page-master or page-sequence are allowed. The name and value attributes are mandatory.</p>
-<h4 id="no-operation-nop-extensionwzxhzdk128wzxhzdk129">No Operation (NOP) Extension<a id="afp-no-operation"></a></h4>
+<h4 id="no-operation-nop-extensionwzxhzdk126wzxhzdk127">No Operation (NOP) Extension<a id="afp-no-operation"></a></h4>
 <p>The no-operation extension provides the ability to carry up to 32K of comments or any other type of unarchitected data into the AFP output stream. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="na">xmlns:afp=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="nt">&gt;</span>
@@ -948,7 +951,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>The no-operation extension element can appear as child of <code>simple-page-master</code> (appears after "Begin Page" BPG), <code>page-sequence</code> (appears after "Begin Named Page Group" BNG and <code>declarations</code> (appears after "Begin Document" BDT). Multiple no-operation extension elements inside the same formatting object are allowed. Each NOP will appear right after the respective "Begin" field indicated above even if it is specified as the last child under its parent. The order inside the parent will be maintained. The "placement" attribute can be used to have the NOP appear before the "End" field of the object rather than after the "Begin" field. Specify <code>placement="before-end"</code> to do that. Please note that, at the moment, this only has an effect for NOPs that are children of the <code>page-sequence</code> formatting object. The "name" attribute is mandatory but will not appear inside the AFP stream.</p>
-<h4 id="invoke-medium-map-imm-extensionwzxhzdk130wzxhzdk131">Invoke Medium Map (IMM) Extension<a id="afp-invoke-medium-map"></a></h4>
+<h4 id="invoke-medium-map-imm-extensionwzxhzdk128wzxhzdk129">Invoke Medium Map (IMM) Extension<a id="afp-invoke-medium-map"></a></h4>
 <p>The invoke-medium-map extension allows to generate IMM fields (Invoke Medium Map) in the generated AFP output. Example:</p>
 <div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="n">xmlns:afp</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="o">&gt;</span>
@@ -961,7 +964,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 
 <p>The invoke-medium-map element is allowed as child of fo:page-sequence (page group level) or fo:simple-page-master. It is NOT supported on document level (fo:root), yet. FOP also doesn't support specifying medium maps inside XML (using BMM/EMM). It can only reference an existing medium map by name. The medium map has to be constructed through different means and available on the target platform.</p>
-<h4 id="form-mapsdefswzxhzdk132wzxhzdk133">Form Maps/Defs<a id="afp-form-maps"></a></h4>
+<h4 id="form-mapsdefswzxhzdk130wzxhzdk131">Form Maps/Defs<a id="afp-form-maps"></a></h4>
 <p>Apache FOP supports embedding an external form map resource in the generated AFP output. This is done using the <code>afp:include-form-map</code> extension. An example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="na">xmlns:afp=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="nt">&gt;</span>
@@ -974,8 +977,8 @@ A CID-keyed font (Type 0, double-byte ou
 
 <p>The <code>afp:include-form-map</code> is to be placed as a direct child of <code>fo:declarations</code> . The <code>name</code> is an AFP resource name (max. 8 characters) and the <code>src</code> attribute is the URI identifying the external form map resource. When such a form map is embedded, you can use the <code>afp:invoke-medium-map</code> extension (described above) to invoke any medium map included in the form map.
 Apache FOP doesn't support a way to define a form map or medium map using XML means inside an XSL-FO document. You will have to build the form map with some third-party tool.</p>
-<h3 id="foreign-attributes-wzxhzdk134wzxhzdk135">Foreign Attributes <a id="afp-foreign-attributes"></a></h3>
-<h4 id="resourcewzxhzdk136wzxhzdk137">Resource<a id="afp-foreign-attributes-resource"></a></h4>
+<h3 id="foreign-attributes-wzxhzdk132wzxhzdk133">Foreign Attributes <a id="afp-foreign-attributes"></a></h3>
+<h4 id="resourcewzxhzdk134wzxhzdk135">Resource<a id="afp-foreign-attributes-resource"></a></h4>
 <p>The resource foreign attributes provides the ability to name and control where data object resources (e.g. images/scalable vector graphics) will reside in the AFP output. The afp foreign attributes are only used in conjuntion with <fo:external-graphic/> and <instream-foreign-object/>. Example:</p>
 <div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
     <span class="na">xmlns:afp=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="nt">&gt;</span>
@@ -1001,7 +1004,7 @@ Apache FOP doesn't support a way to defi
 
 
 <p>The resource-level attribute where the resource object will reside in the AFP output datastream. The possible values for this are "inline", "print-file" and "external". When "external" is used a resource-group-file attribute must also be specified. Please refer to the <a href="#afp-resource-level-defaults">Resource Level Defaults</a> above to see what is used if the resource-level attribute is not specified.</p>
-<h2 id="rtf-wzxhzdk140wzxhzdk141">RTF <a id="rtf"></a></h2>
+<h2 id="rtf-wzxhzdk138wzxhzdk139">RTF <a id="rtf"></a></h2>
 <p>JFOR, an open source XSL-FO to RTF converter has been integrated into Apache FOP. This will create an RTF (rich text format) document that will attempt to contain as much information from the XSL-FO document as possible. It should be noted that is not possible (due to RTF's limitations) to map all XSL-FO features to RTF. For complex documents, the RTF output will never reach the feature level from PDF, for example. Thus, using RTF output is only recommended for simple documents such as letters.</p>
 <p>The RTF output follows Microsoft's RTF specifications and produces best results on Microsoft Word.
 RTF output is currently unmaintained and lacks many features compared to other output formats. Using other editable formats like Open Document Format, instead of producing XSL-FO then RTF through FOP, might give better results.
@@ -1037,21 +1040,21 @@ These are some known restrictions compar
 <p>percentages are not supported everywhere</p>
 </li>
 </ul>
-<h2 id="xml-area-tree-xml-wzxhzdk142wzxhzdk143">XML (Area Tree XML) <a id="xml"></a></h2>
+<h2 id="xml-area-tree-xml-wzxhzdk140wzxhzdk141">XML (Area Tree XML) <a id="xml"></a></h2>
 <p>This is primarily for testing and verification. The XML created is simply a representation of the internal area tree put into XML. We use that to verify the functionality of FOP's layout engine.</p>
 <p>The other use case of the Area Tree XML is as FOP's "intermediate format". More information on that can be found on the page dedicated to the <a href="intermediate.html">Intermediate Format</a> .</p>
-<h2 id="java2dawt-wzxhzdk144wzxhzdk145">Java2D/AWT <a id="awt"></a></h2>
+<h2 id="java2dawt-wzxhzdk142wzxhzdk143">Java2D/AWT <a id="awt"></a></h2>
 <p>The Java2DRenderer provides the basic functionality for all Java2D-based output formats (AWT viewer, direct print, PNG, TIFF).</p>
 <p>The AWT viewer shows a window with the pages displayed inside a Java graphic. It displays one page at a time. The fonts used for the formatting and viewing depend on the fonts available to your JRE.</p>
-<h2 id="print-wzxhzdk146wzxhzdk147">Print <a id="print"></a></h2>
+<h2 id="print-wzxhzdk144wzxhzdk145">Print <a id="print"></a></h2>
 <p>It is possible to directly print the document from the command line. This is done with the same code that renders to the Java2D/AWT renderer.</p>
-<h3 id="known-issues-wzxhzdk148wzxhzdk149">Known issues <a id="print-issues"></a></h3>
+<h3 id="known-issues-wzxhzdk146wzxhzdk147">Known issues <a id="print-issues"></a></h3>
 <p>If you run into the problem that the printed output is incomplete on Windows: this often happens to users printing to a PCL printer. There seems to be an incompatibility between Java and certain PCL printer drivers on Windows. Since most network-enabled laser printers support PostScript, try switching to the PostScript printer driver for that printer model.</p>
-<h2 id="bitmap-tiffpng-wzxhzdk150wzxhzdk151">Bitmap (TIFF/PNG) <a id="bitmap"></a></h2>
+<h2 id="bitmap-tiffpng-wzxhzdk148wzxhzdk149">Bitmap (TIFF/PNG) <a id="bitmap"></a></h2>
 <p>It is possible to directly create bitmap images from the individual pages generated by the layout engine. This is done with the same code that renders to the Java2D/AWT renderer.</p>
 <p>Currently, two output formats are supported: PNG and TIFF. TIFF produces one file with multiple pages, while PNG output produces one file per page. Note: FOP can only produce multiple files (with PNG output) if you can set a <code>java.io.File</code> indicating the primary PNG file using the <code>FOUserAgent.setOutputFile(File)</code> method.</p>
 <p>The quality of the bitmap depends on the target resolution setting on the FOUserAgent and on further settings described below.</p>
-<h3 id="configuration-wzxhzdk152wzxhzdk153">Configuration <a id="bitmap-configuration"></a></h3>
+<h3 id="configuration-wzxhzdk150wzxhzdk151">Configuration <a id="bitmap-configuration"></a></h3>
 <p>The TIFF and PNG renderer configuration currently allows the following settings:</p>
 <div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;image/png&quot;</span><span class="nt">&gt;</span>
   <span class="nt">&lt;color-mode&gt;</span>rgba<span class="nt">&lt;/color-mode&gt;</span>
@@ -1084,7 +1087,7 @@ These are some known restrictions compar
 <p>The default value for the <code>"background-color"</code> setting is <code>"white"</code> . The color specifies in which color the page background is painted. It will only be painted if <code>"transparent-page-background"</code> is not set to <code>"true"</code> . All XSL-FO colors (including color functions) can be used.</p>
 <p>The default value for the <code>"anti-aliasing"</code> setting is <code>"true"</code> . You can set this value to <code>"false"</code> to disable anti-aliasing and thus improve rendering speeds a bit at the loss of some image quality.</p>
 <p>The default value for the <code>"rendering"</code> setting is <code>"true"</code> . You can set this value to <code>"false"</code> to improve rendering speeds a bit at the loss of some image quality. If this setting has an actual effect depends on the JVM's Java2D backend.</p>
-<h3 id="tiff-specific-configuration-wzxhzdk154wzxhzdk155">TIFF-specific Configuration <a id="tiff-configuration"></a></h3>
+<h3 id="tiff-specific-configuration-wzxhzdk152wzxhzdk153">TIFF-specific Configuration <a id="tiff-configuration"></a></h3>
 <p>In addition to the above values the TIFF renderer configuration allows some additional settings:</p>
 <div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;image/tiff&quot;</span><span class="nt">&gt;</span>
   <span class="nt">&lt;transparent-page-background&gt;</span>true<span class="nt">&lt;/transparent-page-background&gt;</span>
@@ -1123,14 +1126,14 @@ These are some known restrictions compar
 </ul>
 <p>This setting may override any setting made using the <code>"color-mode"</code> . For example, if <code>"CCITT T.6"</code> is selected, the color mode is automatically forced to <code>"bi-level"</code> because this compression format only supports bi-level images.
 If you want to use CCITT compression, please make sure you've got <a href="http://java.sun.com/products/java-media/jai/current.html">Java Advanced Imaging Image I/O Tools</a> in your classpath. The Sun JRE doesn't come with a TIFF codec built in, so it has to be added separately. The internal TIFF codec from XML Graphics Commons only supports PackBits, Deflate and JPEG compression for writing.</p>
-<h3 id="runtime-rendering-options-wzxhzdk156wzxhzdk157">Runtime Rendering Options <a id="bitmap-rendering-options"></a></h3>
+<h3 id="runtime-rendering-options-wzxhzdk154wzxhzdk155">Runtime Rendering Options <a id="bitmap-rendering-options"></a></h3>
 <p>The IF-based bitmap output implementations support a rendering option with the key "target-bitmap-size" (value: java.awt.Dimension) that allows to force the pages to be proportionally fit into a bitmap of a given size. This can be used to produce thumbnails or little preview images of the individual pages. An example:</p>
 <div class="codehilite"><pre><span class="n">userAgent</span><span class="o">.</span><span class="n">getRenderingOptions</span><span class="p">()</span><span class="o">.</span><span class="n">put</span><span class="p">(</span>
     <span class="s">&quot;target-bitmap-size&quot;</span><span class="p">,</span> <span class="k">new</span> <span class="n">Dimension</span><span class="p">(</span><span class="mi">320</span><span class="p">,</span> <span class="mi">200</span><span class="p">));</span>
 </pre></div>
 
 
-<h2 id="txt-wzxhzdk158wzxhzdk159">TXT <a id="txt"></a></h2>
+<h2 id="txt-wzxhzdk156wzxhzdk157">TXT <a id="txt"></a></h2>
 <p>The text renderer 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, and is primarily useful for getting a quick-and-dirty view of the document text. The renderer is very limited, so do not be surprised if it gives unsatisfactory results.</p>
 <p>Because FOP lays the text onto a grid during layout, there are frequently extra or missing spaces between characters and lines, which is generally unsatisfactory. Users have reported that the optimal settings to avoid such spacing problems are:</p>
 <ul>
@@ -1144,15 +1147,15 @@ If you want to use CCITT compression, pl
 <p>line-height="10pt"</p>
 </li>
 </ul>
-<h2 id="output-formats-in-the-sandbox-wzxhzdk160wzxhzdk161">Output Formats in the Sandbox <a id="sandbox"></a></h2>
+<h2 id="output-formats-in-the-sandbox-wzxhzdk158wzxhzdk159">Output Formats in the Sandbox <a id="sandbox"></a></h2>
 <p>Due to the state of certain renderers we moved some of them to a "sandbox" area until they are ready for more serious use. The renderers and FOEventHandlers in the sandbox can be found under src/sandbox and are compiled into build/fop-sandbox.jar during the main build. The output formats in the sandbox are marked as such below.</p>
-<h3 id="mif-wzxhzdk162wzxhzdk163">MIF <a id="mif"></a></h3>
+<h3 id="mif-wzxhzdk160wzxhzdk161">MIF <a id="mif"></a></h3>
 <p><warning>The MIF handler is in the sandbox and not yet functional in FOP Trunk!!! Please help us ressurrect this feature.</warning>
 This format is the Maker Interchange Format which is used by Adobe Framemaker.</p>
-<h3 id="svg-wzxhzdk166wzxhzdk167">SVG <a id="svg"></a></h3>
+<h3 id="svg-wzxhzdk164wzxhzdk165">SVG <a id="svg"></a></h3>
 <p><warning>The SVG renderer is in the sandbox and may not work as expected in FOP Trunk!!! Please help us improve this feature.</warning>
 This format creates an SVG document that has links between the pages. This is primarily for slides and creating svg images of pages. Large documents will create SVG files that are far too large for an SVG viewer to handle. Since FO documents usually have text the SVG document will have a large number of text elements. The font information for the text is obtained from the JVM in the same way as for the AWT viewer. If the SVG is viewed on a system where the fonts are different, such as another platform, then the page may look wrong.</p>
-<h2 id="wish-list-wzxhzdk170wzxhzdk171">Wish list <a id="wishlist"></a></h2>
+<h2 id="wish-list-wzxhzdk168wzxhzdk169">Wish list <a id="wishlist"></a></h2>
 <p>Apache FOP is easily extensible and allows you to add new output formats to enhance FOP's functionality. There's a number of output formats which are on our wish list. We're looking for volunteers to help us implement them.</p>
 <ul>
 <li><a href="http://en.wikipedia.org/wiki/OpenDocument">ODF (Open Document Format)</a> : The standardized successor to OpenOffice's file format.</li>

Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html Mon Dec  3 15:47:41 2012
@@ -341,11 +341,11 @@ $(document).ready(function () {
         <div id="items">
         </div>
       	<!-- <div id="breadcrumb"><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/trunk/">Trunk</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk5-fop-servlets">Apache&trade; FOP: Servlets</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk4-fop-servlets">Apache&trade; FOP: Servlets</h1>
 <p><subtitle>How to use Apache&trade; FOP in a Servlet</subtitle></p>
-<h2 id="overview-wzxhzdk9wzxhzdk10">Overview <a id="overview"></a></h2>
+<h2 id="overview-wzxhzdk8wzxhzdk9">Overview <a id="overview"></a></h2>
 <p>This page discusses topic all around using Apache&trade; FOP in a servlet environment.</p>
-<h2 id="example-servlets-in-the-fop-distribution-wzxhzdk12wzxhzdk13">Example Servlets in the FOP distribution <a id="example-servlets"></a></h2>
+<h2 id="example-servlets-in-the-fop-distribution-wzxhzdk11wzxhzdk12">Example Servlets in the FOP distribution <a id="example-servlets"></a></h2>
 <p>In the directory {fop-dir}/src/java/org/apache/fop/servlet, you'll find a working example of a FOP-enabled servlet.</p>
 <p>The servlet is automatically built when you build Apache FOP using the supplied Ant script. After building the servlet, drop fop.war into the webapps directory of Apache Tomcat (or any other web container). Then, you can use URLs like the following to generate PDF files:</p>
 <ul>
@@ -358,9 +358,9 @@ $(document).ready(function () {
 </ul>
 <p>The source code for the servlet can be found under {fop-dir}/src/java/org/apache/fop/servlet/FopServlet.java.
 This example servlet should not be used on a public web server connected to the Internet as it does not contain any measures to prevent Denial-of-Service-Attacks. It is provided as an example and as a starting point for your own servlet.</p>
-<h2 id="create-your-own-servlet-wzxhzdk14wzxhzdk15">Create your own Servlet <a id="servlet"></a></h2>
+<h2 id="create-your-own-servlet-wzxhzdk13wzxhzdk14">Create your own Servlet <a id="servlet"></a></h2>
 <p>This section assumes you are familiar with <a href="embedding.html">embedding FOP</a> .</p>
-<h3 id="a-minimal-servlet-wzxhzdk16wzxhzdk17">A minimal Servlet <a id="minimal-servlet"></a></h3>
+<h3 id="a-minimal-servlet-wzxhzdk15wzxhzdk16">A minimal Servlet <a id="minimal-servlet"></a></h3>
 <p>Here is a minimal code snippet to demonstrate the basics:</p>
 <div class="codehilite"><pre><span class="n">private</span> <span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
 <span class="n">private</span> <span class="n">TransformerFactory</span> <span class="n">tFactory</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
@@ -382,7 +382,7 @@ This example servlet should not be used 
 
 
 <p>There are numerous problems with the code snippet above. Its purpose is only to demonstrate the basic concepts. See below for details.</p>
-<h3 id="adding-xsl-tranformation-xslt-wzxhzdk18wzxhzdk19">Adding XSL tranformation (XSLT) <a id="xslt"></a></h3>
+<h3 id="adding-xsl-tranformation-xslt-wzxhzdk17wzxhzdk18">Adding XSL tranformation (XSLT) <a id="xslt"></a></h3>
 <p>A common requirement is to transform an XML source to XSL-FO using an XSL transformation. It is recommended to use JAXP for this task. The following snippet shows the basic code:</p>
 <div class="codehilite"><pre><span class="n">private</span> <span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
 <span class="n">private</span> <span class="n">TransformerFactory</span> <span class="n">tFactory</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
@@ -390,11 +390,10 @@ This example servlet should not be used 
 <span class="n">public</span> <span class="n">void</span> <span class="n">init</span><span class="p">()</span> <span class="n">throws</span> <span class="n">ServletException</span> <span class="p">{</span>
     <span class="sr">//</span><span class="n">Optionally</span> <span class="n">customize</span> <span class="n">the</span> <span class="n">FopFactory</span> <span class="ow">and</span> <span class="n">TransformerFactory</span> <span class="n">here</span>
 <span class="p">}</span>
-</pre></div>
 
+<span class="p">[</span><span class="o">..</span><span class="p">]</span>
 
-<p class="."></p>
-<div class="codehilite"><pre><span class="sr">//</span><span class="n">Setup</span> <span class="n">a</span> <span class="n">buffer</span> <span class="n">to</span> <span class="n">obtain</span> <span class="n">the</span> <span class="n">content</span> <span class="nb">length</span>
+<span class="sr">//</span><span class="n">Setup</span> <span class="n">a</span> <span class="n">buffer</span> <span class="n">to</span> <span class="n">obtain</span> <span class="n">the</span> <span class="n">content</span> <span class="nb">length</span>
 <span class="n">ByteArrayOutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ByteArrayOutputStream</span><span class="p">();</span>
 
 <span class="sr">//</span><span class="n">Setup</span> <span class="n">FOP</span>
@@ -426,9 +425,9 @@ This example servlet should not be used 
 <p>The <code>Source</code> instance used above is simply an example. If you have to read the XML from a string, supply a <code>new StreamSource(new
           StringReader(xmlstring))</code> . Constructing and reparsing an XML string is generally less desirable than using a SAXSource if you generate your XML. You can alternatively supply a DOMSource as well. You may also use dynamically generated XSL if you like.</p>
 <p>Because you have an explicit <code>Transformer</code> object, you can also use it to explicitely set parameters for the transformation run.</p>
-<h3 id="custom-configuration-wzxhzdk20wzxhzdk21">Custom configuration <a id="cfg"></a></h3>
+<h3 id="custom-configuration-wzxhzdk19wzxhzdk20">Custom configuration <a id="cfg"></a></h3>
 <p>You can easily set up your own FOUserAgent as demonstrated on the <a href="embedding.html">Embedding page</a> .</p>
-<h3 id="improving-performance-wzxhzdk22wzxhzdk23">Improving performance <a id="performance"></a></h3>
+<h3 id="improving-performance-wzxhzdk21wzxhzdk22">Improving performance <a id="performance"></a></h3>
 <p>There are several options to consider:</p>
 <ul>
 <li>
@@ -439,7 +438,7 @@ This example servlet should not be used 
 </li>
 </ul>
 <p>Of course, the <a href="embedding.html#performance">performance hints from the Embedding page</a> apply here, too.</p>
-<h3 id="accessing-resources-in-your-web-application-wzxhzdk24wzxhzdk25">Accessing resources in your web application <a id="uriresolver"></a></h3>
+<h3 id="accessing-resources-in-your-web-application-wzxhzdk23wzxhzdk24">Accessing resources in your web application <a id="uriresolver"></a></h3>
 <p>Often, you will want to use resources (stylesheets, images etc.) which are bundled with your web application. FOP provides a URIResolver implementation that lets you access files via the Servlet's ServletContext. The class is called <code>org.apache.fop.servlet.ServletContextURIResolver</code> .</p>
 <p>Here's how to set it up in your servlet. Instantiate a new instance in the servlet's init() method:</p>
 <div class="codehilite"><pre><span class="sr">/** URIResolver for use by this servlet */</span>
@@ -486,7 +485,7 @@ This example servlet should not be used 
 </pre></div>
 
 
-<h2 id="notes-on-microsoft-internet-explorer-wzxhzdk26wzxhzdk27">Notes on Microsoft Internet Explorer <a id="ie"></a></h2>
+<h2 id="notes-on-microsoft-internet-explorer-wzxhzdk25wzxhzdk26">Notes on Microsoft Internet Explorer <a id="ie"></a></h2>
 <p>Some versions of Internet Explorer will not automatically show the PDF or call the servlet multiple times. These are well-known limitations of Internet Explorer and are not a problem of the servlet. However, Internet Explorer can still be used to download the PDF so that it can be viewed later. Here are some suggestions in this context:</p>
 <ul>
 <li>
@@ -501,13 +500,13 @@ This example servlet should not be used 
 <p>Cache in the server. It may help to include a parameter in the URL which has a timestamp as the value min order to decide whether a request is repeated. IEx is reported to retrieve a document up to three times, but never more often.</p>
 </li>
 </ul>
-<h2 id="servlet-engines-wzxhzdk28wzxhzdk29">Servlet Engines <a id="servlet-engine"></a></h2>
+<h2 id="servlet-engines-wzxhzdk27wzxhzdk28">Servlet Engines <a id="servlet-engine"></a></h2>
 <p>When using a servlet engine, there are potential CLASSPATH issues, and potential conflicts with existing XML/XSLT libraries. Servlet containers also often use their own classloaders for loading webapps, which can cause bugs and security problems.</p>
-<h3 id="tomcat-wzxhzdk30wzxhzdk31">Tomcat <a id="tomcat"></a></h3>
+<h3 id="tomcat-wzxhzdk29wzxhzdk30">Tomcat <a id="tomcat"></a></h3>
 <p>Check Tomcat's documentation for detailed instructions about installing FOP and Cocoon. There are known bugs that must be addressed, particularly for Tomcat 4.0.3.</p>
-<h3 id="websphere-35-wzxhzdk32wzxhzdk33">WebSphere 3.5 <a id="websphere"></a></h3>
+<h3 id="websphere-35-wzxhzdk31wzxhzdk32">WebSphere 3.5 <a id="websphere"></a></h3>
 <p>Put a copy of a working parser in some directory where WebSphere can access it. For example, if /usr/webapps/yourapp/servlets is the CLASSPATH for your servlets, copy the Xerces jar into it (any other directory would also be fine). Do not add the jar to the servlet CLASSPATH, but add it to the CLASSPATH of the application server which contains your web application. In the WebSphere administration console, click on the "environment" button in the "general" tab. In the "variable name" box, enter "CLASSPATH". In the "value" box, enter the correct path to the parser jar file (/usr/webapps/yourapp/servlets/Xerces.jar in our example here). Press "OK", then apply the change and restart the application server.</p>
-<h2 id="handling-complex-use-cases-wzxhzdk34wzxhzdk35">Handling complex use cases <a id="complex-usecases"></a></h2>
+<h2 id="handling-complex-use-cases-wzxhzdk33wzxhzdk34">Handling complex use cases <a id="complex-usecases"></a></h2>
 <p>Sometimes the requirements for a servlet get quite sophisticated: SQL data sources, multiple XSL transformations, merging of several datasources etc. In such a case consider using <a href="http://cocoon.apache.org/">Apache Cocoon</a> instead of a custom servlet to accomplish your goal.</p></div>
       </div>
       



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message