xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r840560 [2/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/0.95/graphics.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/graphics.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/graphics.html Mon Dec  3 15:47:41 2012
@@ -363,64 +363,74 @@ $(document).ready(function () {
 <tr>
 <th>Format</th>
 <th>Type</th>
-<th>Support Through</th>
+<th align="center">Support Through <a href="#native">Apache FOP (native)</a></th>
+<th align="center">Support Through <a href="#batik">Apache Batik</a></th>
+<th align="center">Support Through <a href="#imageio">Image I/O</a></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td><a href="#native">Apache FOP (native)</a></td>
-<td><a href="#batik">Apache Batik</a></td>
-<td><a href="#imageio">Image I/O</a></td>
-</tr>
-<tr>
-<td>---------------------</td>
-<td>--------------</td>
-<td>-----------</td>
-</tr>
-<tr>
 <td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
 <td>bitmap</td>
-<td></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center">X [1]</td>
 </tr>
 <tr>
 <td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
 <td>vector (with embedded bitmaps)</td>
-<td>(X)</td>
+<td align="center">(X)</td>
+<td align="center"></td>
+<td align="center"></td>
 </tr>
 <tr>
 <td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
 <td>metafile (both bitmap and vector), most frequently used for vector drawings</td>
-<td>(X)</td>
+<td align="center">(X)</td>
+<td align="center"></td>
+<td align="center"></td>
 </tr>
 <tr>
 <td>GIF (Graphics Interchange Format)</td>
 <td>bitmap</td>
-<td></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
 <td>bitmap</td>
-<td>(X)</td>
+<td align="center">(X)</td>
+<td align="center"></td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#png">PNG</a> (Portable Network Graphic)</td>
 <td>bitmap</td>
-<td></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
 <td>vector (with embedded bitmaps)</td>
-<td></td>
+<td align="center"></td>
+<td align="center">X</td>
+<td align="center"></td>
 </tr>
 <tr>
 <td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
 <td>bitmap</td>
-<td>(X)</td>
+<td align="center">(X)</td>
+<td align="center"></td>
+<td align="center">X [1]</td>
 </tr>
 <tr>
 <td><a href="#wmf">WMF</a> (Windows Metafile)</td>
 <td>vector (with embedded bitmaps)</td>
-<td></td>
+<td align="center"></td>
+<td align="center">(X)</td>
+<td align="center"></td>
 </tr>
 </tbody>
 </table>
@@ -434,101 +444,101 @@ $(document).ready(function () {
  <a href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a> is not the same as the <a href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</a> ! The former simply exposes JAI's codecs using the Image&nbsp;I/O API but does not include all the image manipulation functionality.</p>
 </li>
 </ul>
-<h2 id="map-of-supported-image-formats-by-output-format-wzxhzdk6wzxhzdk7">Map of supported image formats by output format <a id="format-map"></a></h2>
+<h3 id="map-of-supported-image-formats-by-output-format-wzxhzdk6wzxhzdk7">Map of supported image formats by output format <a id="format-map"></a></h3>
 <p>Not all image formats are supported for all output formats! For example, while you can use EPS (Encapsulated PostScript) files when you generate PostScript output, this format will not be supported by any other output format. Here's an overview of which image formats are supported by which output format:</p>
 <table>
 <thead>
 <tr>
 <th>Image Format</th>
-<th>PDF</th>
-<th>PostScript</th>
-<th>Java2D, PNG, TIFF, AWT</th>
-<th>PCL</th>
-<th>AFP</th>
-<th>RTF</th>
+<th align="center">PDF</th>
+<th align="center">PostScript</th>
+<th align="center">Java2D, PNG, TIFF, AWT</th>
+<th align="center">PCL</th>
+<th align="center">AFP</th>
+<th align="center">RTF</th>
 </tr>
 </thead>
 <tbody>
 <tr>
 <td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
-<td></td>
-<td></td>
-<td></td>
-<td></td>
-<td></td>
-<td>X [1]</td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center">X [1]</td>
 </tr>
 <tr>
 <td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
-<td></td>
-<td>X [1]</td>
-<td></td>
-<td></td>
-<td></td>
-<td></td>
+<td align="center"></td>
+<td align="center">X [1]</td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center"></td>
+<td align="center"></td>
 </tr>
 <tr>
 <td>GIF (Graphics Interchange Format)</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
-<td>X [1]</td>
-<td>X [1]</td>
-<td>X</td>
-<td>X</td>
-<td>X [1]</td>
-<td>X</td>
+<td align="center">X [1]</td>
+<td align="center">X [1]</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X [1]</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#png">PNG</a> (Portable Network Graphic)</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
-<td>X [2]</td>
-<td>X [2]</td>
-<td>X</td>
-<td>X</td>
-<td>X [2]</td>
-<td>X</td>
+<td align="center">X [2]</td>
+<td align="center">X [2]</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X [2]</td>
+<td align="center">X</td>
 </tr>
 <tr>
 <td><a href="#wmf">WMF</a> (Windows Metafile)</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
-<td>X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
+<td align="center">X</td>
 </tr>
 </tbody>
 </table>
@@ -580,21 +590,21 @@ Batik must be run in a graphical environ
 <h3 id="png-wzxhzdk34wzxhzdk35">PNG <a id="png"></a></h3>
 <p>PNG images are supported through an Image&nbsp;I/O codec. Transparency is supported but not guaranteed to work with every output format.</p>
 <h3 id="svg-wzxhzdk37wzxhzdk38">SVG <a id="svg"></a></h3>
-<h4 id="introduction-wzxhzdk39wzxhzdk40">Introduction ## <a id="svg-intro"></a></h4>
+<h4 id="introductionwzxhzdk39wzxhzdk40">Introduction<a id="svg-intro"></a></h4>
 <p>FOP uses <a href="#batik">Apache Batik</a> for SVG support. This format can be handled as an <code>fo:instream-foreign-object</code> or in a separate file referenced with <code>fo:external-graphic</code> .
 Batik's SVG Rasterizer utility may also be used to convert standalone SVG documents into PDF. For more information please see the <a href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</a> on the Batik site.</p>
-<h3 id="placing-svg-graphics-into-pdf-wzxhzdk41wzxhzdk42">Placing SVG Graphics into PDF ## <a id="svg-pdf-graphics"></a></h3>
+<h4 id="placing-svg-graphics-into-pdfwzxhzdk41wzxhzdk42">Placing SVG Graphics into PDF<a id="svg-pdf-graphics"></a></h4>
 <p>The SVG is rendered into PDF by using PDF commands to draw and fill lines and curves. This means that the graphical objects created with this remain as vector graphics. The same applies to PostScript output. For other output formats the SVG graphic may be converted to a bitmap image.</p>
 <p>There are a number of SVG things that cannot be converted directly into PDF. Parts of the graphic such as effects, patterns and images are inserted into the PDF as a raster graphic. The resolution of these raster images can be controlled through the "target resolution" setting in the <a href="configuration.html">configuration</a> .</p>
 <p>Currently transparency is limited in PDF so many SVG images that contain effects or graphics with transparent areas may not be displayed correctly.</p>
-<h4 id="placing-svg-text-into-pdf-and-postscript-wzxhzdk43wzxhzdk44">Placing SVG Text into PDF and PostScript ## <a id="svg-pdf-text"></a></h4>
+<h4 id="placing-svg-text-into-pdf-and-postscriptwzxhzdk43wzxhzdk44">Placing SVG Text into PDF and PostScript<a id="svg-pdf-text"></a></h4>
 <p>If possible, Batik will use normal PDF or PostScript text when inserting text. It does this by checking if the text can be drawn normally and the font is supported. This example svg <a href="../dev/svg/text.svg">text.svg</a> /text.pdfshows how various types and effects with text are handled. Note that tspan and outlined text are not yet implemented.</p>
 <p>Otherwise, text is converted and drawn as a set of shapes by Batik, using the stroking text painter. This means that a typical character will have about 10 curves (each curve consists of at least 20 characters). This can make the output files large and when it is viewed the viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on "Smooth Line Art" in the preferences will fix this). Copy/paste functionality will not be supported in this case. If the text is inserted into the output file using the inbuilt text commands it will use a single character.</p>
 <p>Note that because SVG text can be rendered as either text or a vector graphic, you may need to consider settings in your viewer for both. The Acrobat viewer has both "smooth line art" and "smooth text" settings that may need to be set for SVG images to be displayed nicely on your screen (see Edit / Preferences / Display). This setting will not affect the printing of your document, which should be OK in any case, but will only affect the quality of the screen display.</p>
-<h4 id="scaling-wzxhzdk45wzxhzdk46">Scaling ## <a id="svg-scaling"></a></h4>
+<h4 id="scalingwzxhzdk45wzxhzdk46">Scaling<a id="svg-scaling"></a></h4>
 <p>Currently, SVG images are rendered with the dimensions specified <em>in the SVG file</em> , within the viewport specified in the fo:external-graphic element. For everything to work properly, the two should be equal. The SVG standard leaves this issue as an implementation detail. Additional scaling options are available through XSL-FO means.</p>
 <p>If you use pixels to specify the size of an SVG graphic the "source resolution" setting in the <a href="configuration.html">configuration</a> will be used to determine the size of a pixel. The use of pixels to specify sizes is discouraged as they may be interpreted differently in different environments.</p>
-<h4 id="known-problems-wzxhzdk47wzxhzdk48">Known Problems ## <a id="svg-problems"></a></h4>
+<h4 id="known-problemswzxhzdk47wzxhzdk48">Known Problems<a id="svg-problems"></a></h4>
 <ul>
 <li>
 <p>Soft mask transparency is combined with white so that it looks better on PDF 1.3 viewers but this causes the soft mask to be slightly lighter or darker on PDF 1.4 viewers.</p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/hyphenation.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/hyphenation.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/hyphenation.html Mon Dec  3 15:47:41 2012
@@ -347,11 +347,11 @@ $(document).ready(function () {
 <p>Apache&trade; FOP uses Liang's hyphenation algorithm, well known from TeX. It needs language specific pattern and other data for operation.</p>
 <p>Because of <a href="#license-issues">licensing issues</a> (and for convenience), all hyphenation patterns for FOP are made available through the <a href="http://offo.sourceforge.net/hyphenation/index.html">Objects For Formatting Objects</a> project.
 If you have made improvements to an existing FOP hyphenation pattern, or if you have created one from scratch, please consider contributing these to OFFO so that they can benefit other FOP users as well. Please inquire on the <a href="../maillist.html#fop-user">FOP User mailing list</a> .</p>
-<h2 id="license-issues-wzxhzdk6wzxhzdk7">License Issues <a id="license-issues"></a></h2>
+<h3 id="license-issues-wzxhzdk6wzxhzdk7">License Issues <a id="license-issues"></a></h3>
 <p>Many of the hyphenation files distributed with TeX and its offspring are licenced under the <a href="http://www.latex-project.org/lppl.html">LaTeX Project Public License (LPPL)</a> , which prevents them from being distributed with Apache software. The LPPL puts restrictions on file names in redistributed derived works which we feel can't guarantee. Some hyphenation pattern files have other or additional restrictions, for example against use for commercial purposes.</p>
 <p>Although Apache FOP cannot redistribute hyphenation pattern files that do not conform with its license scheme, that does not necessarily prevent users from using such hyphenation patterns with FOP. However, it does place on the user the responsibility for determining whether the user can rightly use such hyphenation patterns under the hyphenation pattern license.
 <warning>The user is responsible to settle license issues for hyphenation pattern files that are obtained from non-Apache sources.</warning></p>
-<h2 id="sources-of-custom-hyphenation-pattern-files-wzxhzdk10wzxhzdk11">Sources of Custom Hyphenation Pattern Files <a id="sources"></a></h2>
+<h3 id="sources-of-custom-hyphenation-pattern-files-wzxhzdk10wzxhzdk11">Sources of Custom Hyphenation Pattern Files <a id="sources"></a></h3>
 <p>The most important source of hyphenation pattern files is the <a href="http://www.ctan.org/tex-archive/language/hyphenation/">CTAN TeX Archive</a> .</p>
 <h3 id="installing-custom-hyphenation-patterns-wzxhzdk12wzxhzdk13">Installing Custom Hyphenation Patterns <a id="install"></a></h3>
 <p>To install a custom hyphenation pattern for use with FOP:</p>
@@ -392,7 +392,7 @@ and run Ant with build target <code>jar-
 </li>
 </ol>
 <p><warning>Either of these three options will ensure hyphenation is working when using FOP from the command-line. If FOP is being embedded, remember to add the location(s) of the hyphenation JAR(s) to the CLASSPATH (option 1 and 2) or to set the <a href="configuration.html#hyphenation-dir"><hyphenation-dir></a> configuration option programmatically (option 3).</warning></p>
-<h1 id="hyphenation-patterns-wzxhzdk17wzxhzdk18">Hyphenation Patterns <a id="patterns"></a></h1>
+<h2 id="hyphenation-patterns-wzxhzdk17wzxhzdk18">Hyphenation Patterns <a id="patterns"></a></h2>
 <p>If you would like to build your own hyphenation pattern files, or modify existing ones, this section will help you understand how to do so. Even when creating a pattern file from scratch, it may be beneficial to start with an existing file and modify it. See <a href="http://offo.sourceforge.net/hyphenation/index.html">OFFO's Hyphenation page</a> for examples. Here is a brief explanation of the contents of FOP's hyphenation patterns:
 <warning>The remaining content of this section should be considered "draft" quality. It was drafted from theoretical literature, and has not been tested against actual FOP behavior. It may contain errors or omissions. Do not rely on these instructions without testing everything stated here. If you use these instructions, please provide feedback on the <a href="../maillist.html#fop-user">FOP User mailing list</a> , either confirming their accuracy, or raising specific problems that we can address.</warning></p>
 <ul>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html Mon Dec  3 15:47:41 2012
@@ -343,40 +343,41 @@ $(document).ready(function () {
       	<!-- <div id="breadcrumb"><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/0.95/">0.95</a></div> -->
       	<div class="section-content"><h1 id="apachewzxhzdk1-fop-intermediate-format">Apache&trade; FOP: Intermediate Format</h1>
 <p>Please note that the intermediate format is an <strong>advanced feature</strong> and can be ignored by most users of Apache&trade; FOP.</p>
-<h1 id="introduction-wzxhzdk3wzxhzdk4">Introduction <a id="introduction"></a></h1>
+<h2 id="introduction-wzxhzdk3wzxhzdk4">Introduction <a id="introduction"></a></h2>
 <p>The intermediate format (IF) is a proprietary XML format that represents the area tree generated by the layout engine. The area tree is conceptually defined in the <a href="http://www.w3.org/TR/2001/REC-xsl-20011015/slice1.html#section-N742-Formatting">XSL-FO specification in chapter 1.1.2</a> . The IF can be generated through the area tree XML Renderer (the XMLRenderer).</p>
 <p>The intermediate format can be used to generate intermediate documents that are modified before they are finally rendered to their ultimate output format. Modifications include adjusting and changing trait values, adding or modifying area objects, inserting prefabricated pages, overlays, imposition (n-up, rotation, scaling etc.). Multiple IF files can be combined to a single output file.</p>
 <h2 id="usage-of-the-intermediate-format-wzxhzdk5wzxhzdk6">Usage of the Intermediate Format <a id="usage"></a></h2>
 <p>As already mentioned, the IF is generated by using the <strong>XMLRenderer</strong> (MIME type: <strong>application/X-fop-areatree</strong> ). So, you basically set the right MIME type for the output format and process your FO files as if you would create a PDF file. However, there is an important detail to consider: The various Renderers don't all use the same font sources. To be able to create the right area tree for the ultimate output file, you need to create the IF file using the right font setup. This is achieved by telling the XMLRenderer to mimic another renderer. This is done by calling the XMLRenderer's mimicRenderer() method with an instance of the ultimate target renderer as the single parameter. This has a consequence: An IF file rendered with the Java2DRenderer may not look as expected when it was actually generated for the PDF renderer. For renderers that use the same font setup, this restriction does not apply (PDF and PS, for example). Generating the inte
 rmediate format file is the first step.</p>
 <p>The second step is to reparse the IF file using the <strong>AreaTreeParser</strong> which is found in the org.apache.fop.area package. The pages retrieved from the IF file are added to an AreaTreeModel instance from where they are normally rendered using one of the available Renderer implementations. You can find examples for the IF processing in the <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/">http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/</a> directory in the FOP distribution</p>
 <p>The basic pattern to parse the IF format looks like this:</p>
-<p>FopFactory fopFactory = FopFactory.newInstance();    <br />
-</p>
-<p>// Setup output
-OutputStream out = new java.io.FileOutputStream(pdffile);
-out = new java.io.BufferedOutputStream(out);
-try {
-    //Setup fonts and user agent
-    FontInfo fontInfo = new FontInfo();
-    FOUserAgent userAgent = fopFactory.newFOUserAgent();</p>
-<div class="codehilite"><pre><span class="sr">//</span><span class="n">Construct</span> <span class="n">the</span> <span class="n">AreaTreeModel</span> <span class="n">that</span> <span class="n">will</span> <span class="n">received</span> <span class="n">the</span> <span class="n">individual</span> <span class="n">pages</span>
-<span class="n">AreaTreeModel</span> <span class="n">treeModel</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RenderPagesModel</span><span class="p">(</span><span class="n">userAgent</span><span class="p">,</span> 
-        <span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_PDF</span><span class="p">,</span> <span class="n">fontInfo</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span>
-
-<span class="sr">//</span><span class="n">Parse</span> <span class="n">the</span> <span class="n">IF</span> <span class="n">file</span> <span class="n">into</span> <span class="n">the</span> <span class="n">area</span> <span class="n">tree</span>
-<span class="n">AreaTreeParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AreaTreeParser</span><span class="p">();</span>
-<span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="n">myIFFile</span><span class="p">);</span>
-<span class="n">parser</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">treeModel</span><span class="p">,</span> <span class="n">userAgent</span><span class="p">);</span>
+<div class="codehilite"><pre><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="sr">//</span><span class="n">Signal</span> <span class="n">the</span> <span class="n">end</span> <span class="n">of</span> <span class="n">the</span> <span class="n">processing</span><span class="o">.</span> <span class="n">The</span> <span class="n">renderer</span> <span class="n">can</span> <span class="n">finalize</span> <span class="n">the</span> <span class="n">target</span> <span class="n">document</span><span class="o">.</span>
-<span class="n">treeModel</span><span class="o">.</span><span class="n">endDocument</span><span class="p">();</span>
+<span class="sr">//</span> <span class="n">Setup</span> <span class="n">output</span>
+<span class="n">OutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">pdffile</span><span class="p">);</span>
+<span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">BufferedOutputStream</span><span class="p">(</span><span class="n">out</span><span class="p">);</span>
+<span class="n">try</span> <span class="p">{</span>
+    <span class="sr">//</span><span class="n">Setup</span> <span class="n">fonts</span> <span class="ow">and</span> <span class="n">user</span> <span class="n">agent</span>
+    <span class="n">FontInfo</span> <span class="n">fontInfo</span> <span class="o">=</span> <span class="k">new</span> <span class="n">FontInfo</span><span class="p">();</span>
+    <span class="n">FOUserAgent</span> <span class="n">userAgent</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFOUserAgent</span><span class="p">();</span>
+
+    <span class="sr">//</span><span class="n">Construct</span> <span class="n">the</span> <span class="n">AreaTreeModel</span> <span class="n">that</span> <span class="n">will</span> <span class="n">received</span> <span class="n">the</span> <span class="n">individual</span> <span class="n">pages</span>
+    <span class="n">AreaTreeModel</span> <span class="n">treeModel</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RenderPagesModel</span><span class="p">(</span><span class="n">userAgent</span><span class="p">,</span> 
+            <span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_PDF</span><span class="p">,</span> <span class="n">fontInfo</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span>
+
+    <span class="sr">//</span><span class="n">Parse</span> <span class="n">the</span> <span class="n">IF</span> <span class="n">file</span> <span class="n">into</span> <span class="n">the</span> <span class="n">area</span> <span class="n">tree</span>
+    <span class="n">AreaTreeParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AreaTreeParser</span><span class="p">();</span>
+    <span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="n">myIFFile</span><span class="p">);</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">treeModel</span><span class="p">,</span> <span class="n">userAgent</span><span class="p">);</span>
+
+    <span class="sr">//</span><span class="n">Signal</span> <span class="n">the</span> <span class="n">end</span> <span class="n">of</span> <span class="n">the</span> <span class="n">processing</span><span class="o">.</span> <span class="n">The</span> <span class="n">renderer</span> <span class="n">can</span> <span class="n">finalize</span> <span class="n">the</span> <span class="n">target</span> <span class="n">document</span><span class="o">.</span>
+    <span class="n">treeModel</span><span class="o">.</span><span class="n">endDocument</span><span class="p">();</span>
+<span class="p">}</span> <span class="n">finally</span> <span class="p">{</span>
+    <span class="n">out</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+<span class="p">}</span>
 </pre></div>
 
 
-<p>} finally {
-    out.close();
-}
-This example simply reads an IF file and renders it to a PDF file. Please note, that in normal FOP operation you're shielded from having to instantiate the FontInfo object yourself. This is normally a task of the AreaTreeHandler which is not present in this scenario. The same applies to the AreaTreeModel instance, in this case an instance of a subclass called RenderPagesModel. RenderPagesModel is ideal in this case as it has very little overhead processing the individual pages. An important line in the example is the call to <code>endDocument()</code> on the AreaTreeModel. This lets the Renderer know that the processing is now finished.</p>
+<p>This example simply reads an IF file and renders it to a PDF file. Please note, that in normal FOP operation you're shielded from having to instantiate the FontInfo object yourself. This is normally a task of the AreaTreeHandler which is not present in this scenario. The same applies to the AreaTreeModel instance, in this case an instance of a subclass called RenderPagesModel. RenderPagesModel is ideal in this case as it has very little overhead processing the individual pages. An important line in the example is the call to <code>endDocument()</code> on the AreaTreeModel. This lets the Renderer know that the processing is now finished.</p>
 <p>The intermediate format can also be used from the <a href="running.html#standalone-start">command-line</a> by using the "-atin" parameter for specifying the area tree XML as input file. You can also specify a "mimic renderer" by inserting a MIME type between "-at" and the output file.</p>
 <h3 id="concatenating-documents-wzxhzdk7wzxhzdk8">Concatenating Documents <a id="concat"></a></h3>
 <p>This initial example is obviously not very useful. It would be faster to create the PDF file directly. As the <a href="http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/ExampleConcat.java">ExampleConcat.java</a> example shows you can easily parse multiple IF files in a row and add the parsed pages to the same AreaTreeModel instance which essentially concatenates all the input document to one single output document.</p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html Mon Dec  3 15:47:41 2012
@@ -369,11 +369,12 @@ $(document).ready(function () {
 <span class="s">  &lt;/x:xmpmeta&gt;</span>
 <span class="err">&lt;/fo:declarations&gt;</span>
 <span class="err">&lt;fo:page-sequence</span> <span class="err">...</span>
-<span class="err">[..]</span> <span class="err">`fo:declarations`</span>  <span class="err">**must**</span> <span class="err">be</span> <span class="err">declared</span> <span class="err">after</span> <span class="err">`fo:layout-master-set`</span> <span class="err">and</span> <span class="err">before</span> <span class="err">the</span> <span class="err">first</span> <span class="err">`page-sequence`</span> <span class="err">.</span>
+<span class="k">[..]</span>
 </pre></div>
 
 
-<h1 id="implementation-in-apache-fop-wzxhzdk9wzxhzdk10">Implementation in Apache FOP <a id="xmp-impl-in-fop"></a></h1>
+<p><code>fo:declarations</code>  <strong>must</strong> be declared after <code>fo:layout-master-set</code> and before the first <code>page-sequence</code>.</p>
+<h2 id="implementation-in-apache-fop-wzxhzdk9wzxhzdk10">Implementation in Apache FOP <a id="xmp-impl-in-fop"></a></h2>
 <p>Currently, XMP support is only available for PDF output.</p>
 <p>Originally, you could set some metadata information through FOP's FOUserAgent by using its set*() methods (like setTitle(String) or setAuthor(String). These values are directly used to set value in the PDF Info object. Since PDF 1.4, adding metadata as an XMP document to a PDF is possible. That means that there are now two mechanisms in PDF that hold metadata.</p>
 <p>Apache FOP now synchronizes the Info and the Metadata object in PDF, i.e. when you set the title and the author through the FOUserAgent, the two values will end up in the (old) Info object and in the new Metadata object as XMP content. If instead of FOUserAgent, you embed XMP metadata in the XSL-FO document (as shown above), the XMP metadata will be used as-is in the PDF Metadata object and some values from the XMP metadata will be copied to the Info object to maintain backwards-compatibility for PDF readers that don't support XMP metadata.</p>
@@ -381,61 +382,80 @@ $(document).ready(function () {
 <table>
 <thead>
 <tr>
-<th>Document information dictionary</th>
-<th>XMP</th>
+<th>Document information dictionary<br/>Entry</th>
+<th>PDF type</th>
+<th>XMP Property</th>
+<th>XMP type</th>
+<th>XMP Category</th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td>Entry</td>
-<td>PDF type</td>
-</tr>
-<tr>
-<td>-------</td>
-<td>----------</td>
-</tr>
-<tr>
 <td>Title</td>
 <td>text string</td>
+<td>dc:title</td>
+<td>Text</td>
+<td>External</td>
 </tr>
 <tr>
 <td>Author</td>
 <td>text string</td>
+<td>dc:creator</td>
+<td>seq Text</td>
+<td>External</td>
 </tr>
 <tr>
 <td>Subject</td>
 <td>text string</td>
+<td>dc:description["x-default"]</td>
+<td>Text</td>
+<td>External</td>
 </tr>
 <tr>
 <td>Keywords</td>
 <td>text string</td>
+<td>pdf:Keywords</td>
+<td>Text</td>
+<td>External</td>
 </tr>
 <tr>
 <td>Creator</td>
 <td>text string</td>
+<td>xmp:CreatorTool</td>
+<td>Text</td>
+<td>External</td>
 </tr>
 <tr>
 <td>Producer</td>
 <td>text string</td>
+<td>pdf:Producer</td>
+<td>Text</td>
+<td>Internal</td>
 </tr>
 <tr>
 <td>CreationDate</td>
 <td>date</td>
+<td>xmp:CreationDate</td>
+<td>Date</td>
+<td>Internal</td>
 </tr>
 <tr>
 <td>ModDate</td>
 <td>date</td>
+<td>xmp:ModifyDate</td>
+<td>Date</td>
+<td>Internal</td>
 </tr>
 <tr>
 <td>"Internal" in the Category column means that the user should not set this value. It is set by the application.The "Subject" used to be mapped to <code>dc:subject</code> in the initial publication of PDF/A-1 (ISO 19005-1). In the <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=45613">Technical Corrigendum 1</a> this was changed to map to <code>dc:description["x-default"]</code> .</td>
 <td></td>
-</tr>
-<tr>
-<td>## Namespaces <a id="namespaces"></a></td>
+<td></td>
+<td></td>
 <td></td>
 </tr>
 </tbody>
 </table>
+<h3 id="namespaces-wzxhzdk11wzxhzdk12">Namespaces <a id="namespaces"></a></h3>
 <p>Metadata is made of property sets where each property set uses a different namespace URI.</p>
 <p>The following is a listing of namespaces that Apache FOP recognizes and acts upon, mostly to synchronize the XMP metadata with the PDF Info dictionary:</p>
 <table>
@@ -466,7 +486,7 @@ $(document).ready(function () {
 </table>
 <p>Please refer to the <a href="http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf">XMP Specification</a> for information on other metadata namespaces.</p>
 <p>Property sets (Namespaces) not listed here are simply passed through to the final document (if supported). That is useful if you want to specify a custom metadata schema.</p>
-<h2 id="links-wzxhzdk11wzxhzdk12">Links <a id="links"></a></h2>
+<h2 id="links-wzxhzdk13wzxhzdk14">Links <a id="links"></a></h2>
 <ul>
 <li>
 <p><a href="http://www.adobe.com/products/xmp/">Adobe's Extensible Metadata Platform (XMP) website</a> </p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/output.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/output.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/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/0.95/">0.95</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk16-fop-output-formats">Apache&trade; FOP Output Formats</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk19-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-wzxhzdk24wzxhzdk25">General Information <a id="general"></a></h2>
-<h3 id="fonts-wzxhzdk26wzxhzdk27">Fonts <a id="general-fonts"></a></h3>
+<h2 id="general-information-wzxhzdk27wzxhzdk28">General Information <a id="general"></a></h2>
+<h3 id="fonts-wzxhzdk29wzxhzdk30">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-wzxhzdk28wzxhzdk29">Output to a Printer or Other Device <a id="general-direct-output"></a></h3>
+<h3 id="output-to-a-printer-or-other-device-wzxhzdk31wzxhzdk32">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,61 +377,62 @@ 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-wzxhzdk30wzxhzdk31">PDF <a id="pdf"></a></h2>
+<h2 id="pdf-wzxhzdk33wzxhzdk34">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 "tagged PDF" or PDF/A-1a. Support for <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-wzxhzdk32wzxhzdk33">Fonts <a id="pdf-fonts"></a></h3>
+<h3 id="fonts-wzxhzdk35wzxhzdk36">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-wzxhzdk34wzxhzdk35">Post-processing <a id="pdf-postprocess"></a></h3>
+<h3 id="post-processing-wzxhzdk37wzxhzdk38">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>
-Here is some sample code that uses iText to encrypt a FOP-generated PDF. (Note that FOP now supports <a href="pdfencryption.html">PDF encryption</a> . However the principles for using iText for other PDF features are similar.)
-public static void main(String args[]) {
-  try {
-    ByteArrayOutputStream fopout = new ByteArrayOutputStream();
-    FileOutputStream outfile = new FileOutputStream(args[2]);
-    FopFactory fopFactory = FopFactory.newInstance();
-    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, fopout);</p>
-<div class="codehilite"><pre><span class="n">Transformer</span> <span class="n">transformer</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">newTransformer</span><span class="p">(</span>
-    <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">])));</span>
-<span class="n">transformer</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">])),</span>
-    <span class="k">new</span> <span class="n">SAXResult</span><span class="p">(</span><span class="n">fop</span><span class="o">.</span><span class="n">getDefaultHandler</span><span class="p">()));</span>
-<span class="n">PdfReader</span> <span class="n">reader</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PdfReader</span><span class="p">(</span><span class="n">fopout</span><span class="o">.</span><span class="n">toByteArray</span><span class="p">());</span>
-<span class="nb">int</span> <span class="n">n</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">getNumberOfPages</span><span class="p">();</span>
-<span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Document</span><span class="p">(</span><span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span>
-<span class="n">PdfWriter</span> <span class="n">writer</span> <span class="o">=</span> <span class="n">PdfWriter</span><span class="o">.</span><span class="n">getInstance</span><span class="p">(</span><span class="n">document</span><span class="p">,</span> <span class="n">outfile</span><span class="p">);</span>
-<span class="n">writer</span><span class="o">.</span><span class="n">setEncryption</span><span class="p">(</span><span class="n">PdfWriter</span><span class="o">.</span><span class="n">STRENGTH40BITS</span><span class="p">,</span> <span class="s">&quot;pdf&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span>
-  <span class="n">PdfWriter</span><span class="o">.</span><span class="n">AllowCopy</span><span class="p">);</span>
-<span class="n">document</span><span class="o">.</span><span class="nb">open</span><span class="p">();</span>
-<span class="n">PdfContentByte</span> <span class="n">cb</span> <span class="o">=</span> <span class="n">writer</span><span class="o">.</span><span class="n">getDirectContent</span><span class="p">();</span>
-<span class="n">PdfImportedPage</span> <span class="n">page</span><span class="p">;</span>
-<span class="nb">int</span> <span class="n">rotation</span><span class="p">;</span>
-<span class="nb">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
-<span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">n</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">i</span><span class="o">++</span><span class="p">;</span>
-  <span class="n">document</span><span class="o">.</span><span class="n">setPageSize</span><span class="p">(</span><span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
-  <span class="n">document</span><span class="o">.</span><span class="n">newPage</span><span class="p">();</span>
-  <span class="n">page</span> <span class="o">=</span> <span class="n">writer</span><span class="o">.</span><span class="n">getImportedPage</span><span class="p">(</span><span class="n">reader</span><span class="p">,</span> <span class="n">i</span><span class="p">);</span>
-  <span class="n">rotation</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">getPageRotation</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
-  <span class="k">if</span> <span class="p">(</span><span class="n">rotation</span> <span class="o">==</span> <span class="mi">90</span> <span class="o">||</span> <span class="n">rotation</span> <span class="o">==</span> <span class="mi">270</span><span class="p">)</span> <span class="p">{</span>
-    <span class="n">cb</span><span class="o">.</span><span class="n">addTemplate</span><span class="p">(</span><span class="n">page</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>
-    <span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">.</span><span class="n">height</span><span class="p">());</span>
-  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
-    <span class="n">cb</span><span class="o">.</span><span class="n">addTemplate</span><span class="p">(</span><span class="n">page</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+Here is some sample code that uses iText to encrypt a FOP-generated PDF. (Note that FOP now supports <a href="pdfencryption.html">PDF encryption</a> . However the principles for using iText for other PDF features are similar.)</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">static</span> <span class="n">void</span> <span class="n">main</span><span class="p">(</span><span class="n">String</span> <span class="n">args</span><span class="o">[]</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">try</span> <span class="p">{</span>
+    <span class="n">ByteArrayOutputStream</span> <span class="n">fopout</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ByteArrayOutputStream</span><span class="p">();</span>
+    <span class="n">FileOutputStream</span> <span class="n">outfile</span> <span class="o">=</span> <span class="k">new</span> <span class="n">FileOutputStream</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">]);</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">Fop</span> <span class="n">fop</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFop</span><span class="p">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_PDF</span><span class="p">,</span> <span class="n">fopout</span><span class="p">);</span>
+
+    <span class="n">Transformer</span> <span class="n">transformer</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">newTransformer</span><span class="p">(</span>
+        <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">])));</span>
+    <span class="n">transformer</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">])),</span>
+        <span class="k">new</span> <span class="n">SAXResult</span><span class="p">(</span><span class="n">fop</span><span class="o">.</span><span class="n">getDefaultHandler</span><span class="p">()));</span>
+    <span class="n">PdfReader</span> <span class="n">reader</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PdfReader</span><span class="p">(</span><span class="n">fopout</span><span class="o">.</span><span class="n">toByteArray</span><span class="p">());</span>
+    <span class="nb">int</span> <span class="n">n</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">getNumberOfPages</span><span class="p">();</span>
+    <span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Document</span><span class="p">(</span><span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span>
+    <span class="n">PdfWriter</span> <span class="n">writer</span> <span class="o">=</span> <span class="n">PdfWriter</span><span class="o">.</span><span class="n">getInstance</span><span class="p">(</span><span class="n">document</span><span class="p">,</span> <span class="n">outfile</span><span class="p">);</span>
+    <span class="n">writer</span><span class="o">.</span><span class="n">setEncryption</span><span class="p">(</span><span class="n">PdfWriter</span><span class="o">.</span><span class="n">STRENGTH40BITS</span><span class="p">,</span> <span class="s">&quot;pdf&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span>
+      <span class="n">PdfWriter</span><span class="o">.</span><span class="n">AllowCopy</span><span class="p">);</span>
+    <span class="n">document</span><span class="o">.</span><span class="nb">open</span><span class="p">();</span>
+    <span class="n">PdfContentByte</span> <span class="n">cb</span> <span class="o">=</span> <span class="n">writer</span><span class="o">.</span><span class="n">getDirectContent</span><span class="p">();</span>
+    <span class="n">PdfImportedPage</span> <span class="n">page</span><span class="p">;</span>
+    <span class="nb">int</span> <span class="n">rotation</span><span class="p">;</span>
+    <span class="nb">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">n</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">i</span><span class="o">++</span><span class="p">;</span>
+      <span class="n">document</span><span class="o">.</span><span class="n">setPageSize</span><span class="p">(</span><span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
+      <span class="n">document</span><span class="o">.</span><span class="n">newPage</span><span class="p">();</span>
+      <span class="n">page</span> <span class="o">=</span> <span class="n">writer</span><span class="o">.</span><span class="n">getImportedPage</span><span class="p">(</span><span class="n">reader</span><span class="p">,</span> <span class="n">i</span><span class="p">);</span>
+      <span class="n">rotation</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">getPageRotation</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">rotation</span> <span class="o">==</span> <span class="mi">90</span> <span class="o">||</span> <span class="n">rotation</span> <span class="o">==</span> <span class="mi">270</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">cb</span><span class="o">.</span><span class="n">addTemplate</span><span class="p">(</span><span class="n">page</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>
+        <span class="n">reader</span><span class="o">.</span><span class="n">getPageSizeWithRotation</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">.</span><span class="n">height</span><span class="p">());</span>
+      <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+        <span class="n">cb</span><span class="o">.</span><span class="n">addTemplate</span><span class="p">(</span><span class="n">page</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="n">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
+      <span class="p">}</span>
+      <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Processed page &quot;</span> <span class="o">+</span> <span class="n">i</span><span class="p">);</span>
+    <span class="p">}</span>
+    <span class="n">document</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+  <span class="p">}</span> <span class="n">catch</span><span class="p">(</span> <span class="n">Exception</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">e</span><span class="o">.</span><span class="n">printStackTrace</span><span class="p">();</span>
   <span class="p">}</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Processed page &quot;</span> <span class="o">+</span> <span class="n">i</span><span class="p">);</span>
 <span class="p">}</span>
-<span class="n">document</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
 </pre></div>
 
 
-<p>} catch( Exception e) {
-    e.printStackTrace();
-  }
-}
-Check the iText tutorial and documentation for setting access flags, password, encryption strength and other parameters.</p>
-<h3 id="watermarks-wzxhzdk38wzxhzdk39">Watermarks <a id="pdf-watermark"></a></h3>
+<p>Check the iText tutorial and documentation for setting access flags, password, encryption strength and other parameters.</p>
+<h3 id="watermarks-wzxhzdk41wzxhzdk42">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>
@@ -441,23 +442,26 @@ Check the iText tutorial and documentati
 <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>
-<h2 id="postscript-wzxhzdk40wzxhzdk41">PostScript <a id="ps"></a></h2>
+<h2 id="postscript-wzxhzdk43wzxhzdk44">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-wzxhzdk42wzxhzdk43">Configuration <a id="ps-configuration"></a></h3>
-<p>The PostScript renderer configuration currently allows the following settings:
-<renderer mime="application/postscript">
-  <auto-rotate-landscape>false</auto-rotate-landscape>
-  <language-level>3</language-level>
-  <optimize-resources>false</optimize-resources>
-  <safe-set-page-device>false</safe-set-page-device>
-  <dsc-compliant>true</dsc-compliant>
-</renderer>
-The default value for the "auto-rotate-landscape" setting is "false". Setting it to "true" will automatically rotate landscape pages and will mark them as landscape.</p>
+<h3 id="configuration-wzxhzdk45wzxhzdk46">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>
+  <span class="nt">&lt;language-level&gt;</span>3<span class="nt">&lt;/language-level&gt;</span>
+  <span class="nt">&lt;optimize-resources&gt;</span>false<span class="nt">&lt;/optimize-resources&gt;</span>
+  <span class="nt">&lt;safe-set-page-device&gt;</span>false<span class="nt">&lt;/safe-set-page-device&gt;</span>
+  <span class="nt">&lt;dsc-compliant&gt;</span>true<span class="nt">&lt;/dsc-compliant&gt;</span>
+<span class="nt">&lt;/renderer&gt;</span>
+</pre></div>
+
+
+<p>The default value for the "auto-rotate-landscape" setting is "false". Setting it to "true" will automatically rotate landscape pages and will mark them as landscape.</p>
 <p>The default value for the "language-level" setting is "3". This setting specifies the PostScript language level which should be used by FOP. Set this to "2" only if you don't have a Level 3 capable interpreter.</p>
 <p>The default value for the "optimize-resources" setting is "false". Setting it to "true" will produce the PostScript file in two steps. A temporary file will be written first which will then be processed to add only the fonts which were really used and images are added to the stream only once as PostScript forms. This will reduce file size but can potentially increase the memory needed in the interpreter to process.</p>
 <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>
-<h3 id="limitations-wzxhzdk56wzxhzdk57">Limitations <a id="ps-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk47wzxhzdk48">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>
@@ -472,10 +476,10 @@ The default value for the "auto-rotate-l
 <p>PPD support is still missing.</p>
 </li>
 </ul>
-<h2 id="pcl-wzxhzdk58wzxhzdk59">PCL <a id="pcl"></a></h2>
+<h2 id="pcl-wzxhzdk49wzxhzdk50">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-wzxhzdk60wzxhzdk61">References <a id="pcl-references"></a></h3>
+<h3 id="references-wzxhzdk51wzxhzdk52">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>
@@ -484,7 +488,7 @@ The default value for the "auto-rotate-l
 <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-wzxhzdk62wzxhzdk63">Limitations <a id="pcl-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk53wzxhzdk54">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>
@@ -511,25 +515,28 @@ The default value for the "auto-rotate-l
 <p>Currently, there's no support for clipping and image transparency, largely because PCL 5 has certain limitations.</p>
 </li>
 </ul>
-<h3 id="configuration-wzxhzdk64wzxhzdk65">Configuration <a id="pcl-configuration"></a></h3>
-<p>The PCL renderer configuration currently allows the following settings:
-<renderer mime="application/vnd.hp-PCL">
-  <rendering>quality</rendering>
-  <text-rendering>bitmap</text-rendering>
-  <disable-pjl>false</disable-pjl>
-</renderer>
-The default value for the "rendering" setting is "speed" which causes borders to be painted as plain rectangles. In this mode, no special borders (dotted, dashed etc.) are available. If you want support for all border modes, set the value to "quality" as indicated above. This will cause the borders to be painted as bitmaps.</p>
+<h3 id="configuration-wzxhzdk55wzxhzdk56">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>
+  <span class="nt">&lt;text-rendering&gt;</span>bitmap<span class="nt">&lt;/text-rendering&gt;</span>
+  <span class="nt">&lt;disable-pjl&gt;</span>false<span class="nt">&lt;/disable-pjl&gt;</span>
+<span class="nt">&lt;/renderer&gt;</span>
+</pre></div>
+
+
+<p>The default value for the "rendering" setting is "speed" which causes borders to be painted as plain rectangles. In this mode, no special borders (dotted, dashed etc.) are available. If you want support for all border modes, set the value to "quality" as indicated above. This will cause the borders to be painted as bitmaps.</p>
 <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-wzxhzdk74wzxhzdk75">Extensions <a id="pcl-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk57wzxhzdk58">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-selection-wzxhzdk76wzxhzdk77">Page Source (Tray selection) ## <a id="pcl-page-source"></a></h4>
+<h4 id="page-source-tray-selectionwzxhzdk59wzxhzdk60">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>
@@ -540,10 +547,10 @@ The default value for the "rendering" se
 
 
 <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>
-<h2 id="afp-wzxhzdk78wzxhzdk79">AFP <a id="afp"></a></h2>
+<h2 id="afp-wzxhzdk61wzxhzdk62">AFP <a id="afp"></a></h2>
 <p><warning>The AFP Renderer is a new addition (27-Apr-2006) to the sandbox and as such not yet fully tested or feature complete.</warning>
 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>
-<h3 id="references-wzxhzdk82wzxhzdk83">References <a id="afp-references"></a></h3>
+<h3 id="references-wzxhzdk65wzxhzdk66">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>
@@ -552,7 +559,7 @@ The FOP AFP Renderer deals with creating
 <p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPResources">AFP Resources on the FOP WIKI</a> </p>
 </li>
 </ul>
-<h3 id="limitations-wzxhzdk84wzxhzdk85">Limitations <a id="afp-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk67wzxhzdk68">Limitations <a id="afp-limitations"></a></h3>
 <p>This list is most likely badly incomplete.</p>
 <ul>
 <li>
@@ -562,14 +569,17 @@ The FOP AFP Renderer deals with creating
 <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="configuration-wzxhzdk86wzxhzdk87">Configuration <a id="afp-configuration"></a></h3>
-<h4 id="fonts-wzxhzdk88wzxhzdk89">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 -->
+<h3 id="configuration-wzxhzdk69wzxhzdk70">Configuration <a id="afp-configuration"></a></h3>
+<h4 id="fontswzxhzdk71wzxhzdk72">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>
   ...
-</renderer>
-There are 3 font configuration variants supported:</p>
+<span class="nt">&lt;/renderer&gt;</span>
+</pre></div>
+
+
+<p>There are 3 font configuration variants supported:</p>
 <ol>
 <li>
 <p>IBM Raster fonts</p>
@@ -694,13 +704,13 @@ There are 3 font configuration variants 
 </pre></div>
 
 
-<h3 id="output-resolution-wzxhzdk93wzxhzdk94">Output Resolution ## <a id="afp-renderer-resolution-config"></a></h3>
+<h4 id="output-resolutionwzxhzdk73wzxhzdk74">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>
 
 
-<h3 id="images-wzxhzdk96wzxhzdk97">Images ## <a id="afp-image-config"></a></h3>
+<h4 id="imageswzxhzdk76wzxhzdk77">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>
@@ -712,14 +722,14 @@ There are 3 font configuration variants 
 
 
 <p>Only the values "color" and "b+w" are allowed for the mode attribute. The bits-per-pixel attribute is ignored if mode is "color". For "b+w" mode is must be 1, 4, or 8.</p>
-<h3 id="extensions-wzxhzdk99wzxhzdk100">Extensions <a id="afp-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk79wzxhzdk80">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-extension-wzxhzdk101wzxhzdk102">Page Overlay Extension ## <a id="afp-page-overlay"></a></h4>
+<h4 id="page-overlay-extensionwzxhzdk81wzxhzdk82">Page Overlay 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>
@@ -731,7 +741,7 @@ There are 3 font configuration variants 
 
 
 <p>The mandatory name attribute must refer to an 8 character (space padded) resource name that must be known in the AFP processing environment.</p>
-<h4 id="page-segment-extension-wzxhzdk103wzxhzdk104">Page Segment Extension ## <a id="afp-page-segment"></a></h4>
+<h4 id="page-segment-extensionwzxhzdk83wzxhzdk84">Page Segment 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>
@@ -745,7 +755,7 @@ There are 3 font configuration variants 
 
 
 <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>
-<h4 id="tag-logical-element-extension-wzxhzdk105wzxhzdk106">Tag Logical Element Extension ## <a id="afp-tag-logical-element"></a></h4>
+<h4 id="tag-logical-element-extensionwzxhzdk85wzxhzdk86">Tag Logical Element 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>
@@ -759,7 +769,7 @@ There are 3 font configuration variants 
 
 
 <p>The tag-logical-element extension element can only occur within a simple-page-master. Multiple tag-logical-element extension elements within a simple-page-master are allowed. The name and value attributes are mandatory.</p>
-<h4 id="no-operation-extension-wzxhzdk107wzxhzdk108">No Operation Extension ## <a id="afp-no-operation"></a></h4>
+<h4 id="no-operation-extensionwzxhzdk87wzxhzdk88">No Operation 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>
@@ -772,7 +782,7 @@ There are 3 font configuration variants 
 
 
 <p>The no-operation extension element can only occur within a simple-page-master. Multiple no-operation extension elements within a simple-page-master are allowed. The name attribute is mandatory.</p>
-<h2 id="rtf-wzxhzdk109wzxhzdk110">RTF <a id="rtf"></a></h2>
+<h2 id="rtf-wzxhzdk89wzxhzdk90">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.
@@ -808,20 +818,20 @@ These are some known restrictions compar
 <p>percentages are not supported everywhere</p>
 </li>
 </ul>
-<h2 id="xml-area-tree-xml-wzxhzdk111wzxhzdk112">XML (Area Tree XML) <a id="xml"></a></h2>
+<h2 id="xml-area-tree-xml-wzxhzdk91wzxhzdk92">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-wzxhzdk113wzxhzdk114">Java2D/AWT <a id="awt"></a></h2>
+<h2 id="java2dawt-wzxhzdk93wzxhzdk94">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-wzxhzdk115wzxhzdk116">Print <a id="print"></a></h2>
+<h2 id="print-wzxhzdk95wzxhzdk96">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-wzxhzdk117wzxhzdk118">Known issues <a id="print-issues"></a></h3>
+<h3 id="known-issues-wzxhzdk97wzxhzdk98">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-wzxhzdk119wzxhzdk120">Bitmap (TIFF/PNG) <a id="bitmap"></a></h2>
+<h2 id="bitmap-tiffpng-wzxhzdk99wzxhzdk100">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. The quality of the bitmap depends on the target resolution setting on the FOUserAgent.</p>
-<h3 id="configuration-wzxhzdk121wzxhzdk122">Configuration <a id="bitmap-configuration"></a></h3>
+<h3 id="configuration-wzxhzdk101wzxhzdk102">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;transparent-page-background&gt;</span>true<span class="nt">&lt;/transparent-page-background&gt;</span>
@@ -831,7 +841,7 @@ These are some known restrictions compar
 
 
 <p>The default value for the "transparent-page-background" setting is "false" which paints an opaque, white background for the whole image. If you set this to true, no such background will be painted and you will get a transparent image if an alpha channel is available in the output format.</p>
-<h3 id="tiff-specific-configuration-wzxhzdk123wzxhzdk124">TIFF-specific Configuration <a id="tiff-configuration"></a></h3>
+<h3 id="tiff-specific-configuration-wzxhzdk103wzxhzdk104">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>
@@ -844,32 +854,32 @@ These are some known restrictions compar
 <p>The default value for the "compression" setting is "PackBits" which which is a widely supported RLE compression scheme for TIFF. The set of compression names to be used here matches the set that the Image I/O API uses. Note that not all compression schemes may be available during runtime. This depends on the actual codecs being available. Here is a list of possible values:</p>
 <ul>
 <li>
-<p>NONE (no compression)</p>
+<p><code>NONE</code> (no compression)</p>
 </li>
 <li>
-<p>PackBits (RLE, run-length encoding)</p>
+<p><code>PackBits</code> (RLE, run-length encoding)</p>
 </li>
 <li>
-<p>JPEG</p>
+<p><code>JPEG</code></p>
 </li>
 <li>
-<p>Deflate</p>
+<p><code>Deflate</code></p>
 </li>
 <li>
-<p>LZW</p>
+<p><code>LZW</code></p>
 </li>
 <li>
-<p>ZLib</p>
+<p><code>ZLib</code></p>
 </li>
 <li>
-<p>CCITT T.4 (Fax Group 3)</p>
+<p><code>CCITT T.4</code> (Fax Group 3)</p>
 </li>
 <li>
-<p>CCITT T.6 (Fax Group 4)
+<p><code>CCITT T.6</code> (Fax Group 4)
 If you want to use CCITT compression, please make sure you've got a J2SE 1.4 or later and <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>
 </li>
 </ul>
-<h1 id="txt-wzxhzdk125wzxhzdk126">TXT <a id="txt"></a></h1>
+<h2 id="txt-wzxhzdk105wzxhzdk106">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>The Text renderer 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>
 <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>
@@ -884,15 +894,15 @@ If you want to use CCITT compression, pl
 <p>line-height="10.5pt"</p>
 </li>
 </ul>
-<h2 id="output-formats-in-the-sandbox-wzxhzdk127wzxhzdk128">Output Formats in the Sandbox <a id="sandbox"></a></h2>
+<h2 id="output-formats-in-the-sandbox-wzxhzdk107wzxhzdk108">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-wzxhzdk129wzxhzdk130">MIF <a id="mif"></a></h3>
+<h3 id="mif-wzxhzdk109wzxhzdk110">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-wzxhzdk133wzxhzdk134">SVG <a id="svg"></a></h3>
+<h3 id="svg-wzxhzdk113wzxhzdk114">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-wzxhzdk137wzxhzdk138">Wish list <a id="wishlist"></a></h2>
+<h2 id="wish-list-wzxhzdk117wzxhzdk118">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>



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


Mime
View raw message