xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r840536 [2/2] - in /websites/staging/xmlgraphics/trunk/content: ./ fop/trunk/output.html
Date Mon, 03 Dec 2012 12:22:56 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 12:22:55 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="apachewzxhzdk27-fop-output-formats">Apache&trade; FOP Output Formats</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk39-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-wzxhzdk35wzxhzdk36">General Information <a id="general"></a></h2>
-<h3 id="fonts-wzxhzdk37wzxhzdk38">Fonts <a id="general-fonts"></a></h3>
+<h2 id="general-information-wzxhzdk47wzxhzdk48">General Information <a id="general"></a></h2>
+<h3 id="fonts-wzxhzdk49wzxhzdk50">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-wzxhzdk39wzxhzdk40">Output to a Printer or Other Device <a id="general-direct-output"></a></h3>
+<h3 id="output-to-a-printer-or-other-device-wzxhzdk51wzxhzdk52">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-wzxhzdk41wzxhzdk42">PDF <a id="pdf"></a></h2>
+<h2 id="pdf-wzxhzdk53wzxhzdk54">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-wzxhzdk43wzxhzdk44">Fonts <a id="pdf-fonts"></a></h3>
+<h3 id="fonts-wzxhzdk55wzxhzdk56">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-wzxhzdk45wzxhzdk46">Post-processing <a id="pdf-postprocess"></a></h3>
+<h3 id="post-processing-wzxhzdk57wzxhzdk58">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-wzxhzdk49wzxhzdk50">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-wzxhzdk61wzxhzdk62">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,39 +442,51 @@ 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>
-<h3 id="extensions-wzxhzdk51wzxhzdk52">Extensions <a id="pdf-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk63wzxhzdk64">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>
-<p><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
-         xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf"></p>
-<h3 id="embedded-files-wzxhzdk54wzxhzdk55">Embedded Files ## <a id="pdf-embedded-file"></a></h3>
+<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>
 <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>
-<p><fo:declarations>
-    <pdf:embedded-file filename="image.jpg" src="url(file:///C:/Temp/myimage.jpg)" description="My image"/>
-    <pdf:embedded-file src="url(file:///C:/Temp/MyTextDoc.odt)"/>
-  </fo:declarations></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>
+  <span class="nt">&lt;pdf:embedded-file</span> <span class="na">src=</span><span class="s">&quot;url(file:///C:/Temp/MyTextDoc.odt)&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/fo:declarations&gt;</span>
+</pre></div>
+
+
 <p><code>pdf:embedded-file</code> must be a child of <code>fo:declarations</code> . The "src" property is used to reference the file that is to be embedded. This property uses the "uri-specification" datatype from the XSL-FO specification. The "filename" property is optional. If it is missing the filename is automatically set from the URI/IRI of the "src" property. An optional description can also be added to further describe the file attachment.</p>
 <p>It is also possible to reference an embedded file from an <code>fo:basic-link</code> . Use the special "embedded-file:" URI scheme with the filename as single argument after the URI scheme. Example:</p>
-<p><fo:basic-link external-destination="url(embedded-file:image.jpg)">Attached Image</fo:basic-link></p>
+<div class="codehilite"><pre><span class="nt">&lt;fo:basic-link</span> <span class="na">external-destination=</span><span class="s">&quot;url(embedded-file:image.jpg)&quot;</span><span class="nt">&gt;</span>Attached Image<span class="nt">&lt;/fo:basic-link&gt;</span>
+</pre></div>
+
+
 <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-wzxhzdk62wzxhzdk63">PostScript <a id="ps"></a></h2>
+<h2 id="postscript-wzxhzdk67wzxhzdk68">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-wzxhzdk64wzxhzdk65">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>
-  <rendering>quality</rendering>
-</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-wzxhzdk69wzxhzdk70">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;rendering&gt;</span>quality<span class="nt">&lt;/rendering&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>
 <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-wzxhzdk80wzxhzdk81">Limitations <a id="ps-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk71wzxhzdk72">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>
@@ -488,10 +501,10 @@ The default value for the "auto-rotate-l
 <p>PPD support is still missing.</p>
 </li>
 </ul>
-<h2 id="pcl-wzxhzdk82wzxhzdk83">PCL <a id="pcl"></a></h2>
+<h2 id="pcl-wzxhzdk73wzxhzdk74">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-wzxhzdk84wzxhzdk85">References <a id="pcl-references"></a></h3>
+<h3 id="references-wzxhzdk75wzxhzdk76">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>
@@ -500,7 +513,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-wzxhzdk86wzxhzdk87">Limitations <a id="pcl-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk77wzxhzdk78">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>
@@ -527,58 +540,61 @@ 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-wzxhzdk88wzxhzdk89">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-wzxhzdk79wzxhzdk80">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-wzxhzdk98wzxhzdk99">Extensions <a id="pcl-extensions"></a></h3>
+<h3 id="extensions-wzxhzdk81wzxhzdk82">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>
+<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-wzxhzdk100wzxhzdk101">Page Source (Tray selection) ## <a id="pcl-page-source"></a></h4>
+<h4 id="page-source-tray-selectionwzxhzdk83wzxhzdk84">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>
-      ...
-    <span class="nt">&lt;/fo:simple-page-master&gt;</span>
-  <span class="nt">&lt;/fo:layout-master-set&gt;</span>
+<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>
+    ...
+  <span class="nt">&lt;/fo:simple-page-master&gt;</span>
+<span class="nt">&lt;/fo:layout-master-set&gt;</span>
 </pre></div>
 
 
 <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-bin-wzxhzdk102wzxhzdk103">Output Bin ## <a id="pcl-output-bin"></a></h4>
+<h4 id="output-binwzxhzdk85wzxhzdk86">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>
-      ...
-    <span class="nt">&lt;/fo:simple-page-master&gt;</span>
-  <span class="nt">&lt;/fo:layout-master-set&gt;</span>
+<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>
+    ...
+  <span class="nt">&lt;/fo:simple-page-master&gt;</span>
+<span class="nt">&lt;/fo:layout-master-set&gt;</span>
 </pre></div>
 
 
 <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-mode-wzxhzdk104wzxhzdk105">Page Duplex Mode ## <a id="pcl-duplex-mode"></a></h4>
+<h4 id="page-duplex-modewzxhzdk87wzxhzdk88">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>
-      ...
-    <span class="nt">&lt;/fo:simple-page-master&gt;</span>
-  <span class="nt">&lt;/fo:layout-master-set&gt;</span>
+<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>
+    ...
+  <span class="nt">&lt;/fo:simple-page-master&gt;</span>
+<span class="nt">&lt;/fo:layout-master-set&gt;</span>
 </pre></div>
 
 
 <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-wzxhzdk106wzxhzdk107">AFP <a id="afp"></a></h2>
+<h2 id="afp-wzxhzdk89wzxhzdk90">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>
@@ -604,7 +620,7 @@ The default value for the "rendering" se
 </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-wzxhzdk108wzxhzdk109">References <a id="afp-references"></a></h3>
+<h3 id="references-wzxhzdk91wzxhzdk92">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>
@@ -616,7 +632,7 @@ The default value for the "rendering" se
 <p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPOutput">Technical notes on AFP output in FOP</a> </p>
 </li>
 </ul>
-<h3 id="limitations-wzxhzdk110wzxhzdk111">Limitations <a id="afp-limitations"></a></h3>
+<h3 id="limitations-wzxhzdk93wzxhzdk94">Limitations <a id="afp-limitations"></a></h3>
 <p>This list is most likely badly incomplete.</p>
 <ul>
 <li>
@@ -626,15 +642,15 @@ The default value for the "rendering" se
 <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-wzxhzdk112wzxhzdk113">Deployment in older environments <a id="afp-compatibility"></a></h3>
+<h3 id="deployment-in-older-environments-wzxhzdk95wzxhzdk96">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-wzxhzdk114wzxhzdk115">Configuration <a id="afp-configuration"></a></h3>
-<h4 id="fonts-wzxhzdk116wzxhzdk117">Fonts ## <a id="afp-font-config"></a></h4>
+<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>
+    <renderer mime="application/x-afp">
+      <!-- AFP Renderer -->
+      ...
+    </renderer>
 There are 4 font configuration variants supported:</p>
 <ol>
 <li>
@@ -650,234 +666,244 @@ There are 4 font configuration variants 
 <p>FOP built-in Base14 fonts</p>
 </li>
 </ol>
-<p>A typical raster font configuration looks like:
-      <!-- This is an example of mapping actual IBM raster fonts / code pages to a FOP font -->
-        <font>
-        <!-- The afp-font element defines the IBM code page, the matching Java encoding and the
-             base URI for the font -->
-        <afp-font type="raster" codepage="T1V10500" encoding="Cp500" base-uri="fonts/ibm/">
-          <!-- For a raster font a separate element for each font size is required providing
-               the font size and the corresponding IBM Character set name -->
-          <afp-raster-font size="7" characterset="C0N20070"/>
-          <afp-raster-font size="8" characterset="C0N20080"/>
-          <afp-raster-font size="10" characterset="C0N20000"/>
-          <afp-raster-font size="11" characterset="C0N200A0"/>
-          <afp-raster-font size="12" characterset="C0N200B0"/>
-          <afp-raster-font size="14" characterset="C0N200D0"/>
-          <afp-raster-font size="16" characterset="C0N200F0"/>
-          <afp-raster-font size="18" characterset="C0N200H0"/>
-          <afp-raster-font size="20" characterset="C0N200J0"/>
-          <afp-raster-font size="24" characterset="C0N200N0"/>
-          <afp-raster-font size="30" characterset="C0N200T0"/>
-          <afp-raster-font size="36" characterset="C0N200Z0"/>
-        </afp-font>
-        <!-- These are the usual FOP font triplets as they apply to this font -->
-        <font-triplet name="serif" style="normal" weight="normal"/>
-        <font-triplet name="Times" style="normal" weight="normal"/>
-        <font-triplet name="Times-Roman" style="normal" weight="normal"/>
-        <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
-      </font>
-An outline font configuration is simpler as the individual font size entries are not required. However, the characterset definition is now required within the afp-font element.
-      <font>
-          <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH200  "
-             base-uri="file:/fonts/ibm" />
-          <font-triplet name="sans-serif" style="normal" weight="normal"/>
-          <font-triplet name="Helvetica" style="normal" weight="normal"/>
-          <font-triplet name="any" style="normal" weight="normal"/>
-      </font></p>
+<p>A typical raster font configuration looks like:</p>
+<div class="codehilite"><pre><span class="o">&lt;!--</span> <span class="n">This</span> <span class="n">is</span> <span class="n">an</span> <span class="n">example</span> <span class="n">of</span> <span class="n">mapping</span> <span class="n">actual</span> <span class="n">IBM</span> <span class="n">raster</span> <span class="n">fonts</span> <span class="o">/</span> <span class="n">code</span> <span class="n">pages</span> <span class="n">to</span> <span class="n">a</span> <span class="n">FOP</span> <span class="n">font</span> <span class="o">--&gt;</span>
+  <span class="sr">&lt;font&gt;</span>
+  <span class="o">&lt;!--</span> <span class="n">The</span> <span class="n">afp</span><span class="o">-</span><span class="n">font</span> <span class="n">element</span> <span class="n">defines</span> <span class="n">the</span> <span class="n">IBM</span> <span class="n">code</span> <span class="n">page</span><span class="p">,</span> <span class="n">the</span> <span class="n">matching</span> <span class="n">Java</span> <span class="n">encoding</span> <span class="ow">and</span> <span class="n">the</span>
+       <span class="n">base</span> <span class="n">URI</span> <span class="k">for</span> <span class="n">the</span> <span class="n">font</span> <span class="o">--&gt;</span>
+  <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">font</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;raster&quot;</span> <span class="n">codepage</span><span class="o">=</span><span class="s">&quot;T1V10500&quot;</span> <span class="n">encoding</span><span class="o">=</span><span class="s">&quot;Cp500&quot;</span> <span class="n">base</span><span class="o">-</span><span class="n">uri</span><span class="o">=</span><span class="s">&quot;fonts/ibm/&quot;</span><span class="o">&gt;</span>
+    <span class="o">&lt;!--</span> <span class="n">For</span> <span class="n">a</span> <span class="n">raster</span> <span class="n">font</span> <span class="n">a</span> <span class="n">separate</span> <span class="n">element</span> <span class="k">for</span> <span class="nb">each</span> <span class="n">font</span> <span class="n">size</span> <span class="n">is</span> <span class="n">required</span> <span class="n">providing</span>
+         <span class="n">the</span> <span class="n">font</span> <span class="n">size</span> <span class="ow">and</span> <span class="n">the</span> <span class="n">corresponding</span> <span class="n">IBM</span> <span class="n">Character</span> <span class="n">set</span> <span class="n">name</span> <span class="o">--&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;7&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N20070&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;8&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N20080&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;10&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N20000&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;11&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200A0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;12&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200B0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;14&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200D0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;16&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200F0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;18&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200H0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;20&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200J0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;24&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200N0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;30&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200T0&quot;</span><span class="o">/&gt;</span>
+    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">raster</span><span class="o">-</span><span class="n">font</span> <span class="n">size</span><span class="o">=</span><span class="s">&quot;36&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;C0N200Z0&quot;</span><span class="o">/&gt;</span>
+  <span class="sr">&lt;/afp-font&gt;</span>
+  <span class="o">&lt;!--</span> <span class="n">These</span> <span class="n">are</span> <span class="n">the</span> <span class="n">usual</span> <span class="n">FOP</span> <span class="n">font</span> <span class="n">triplets</span> <span class="n">as</span> <span class="n">they</span> <span class="n">apply</span> <span class="n">to</span> <span class="n">this</span> <span class="n">font</span> <span class="o">--&gt;</span>
+  <span class="o">&lt;</span><span class="n">font</span><span class="o">-</span><span class="n">triplet</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;serif&quot;</span> <span class="n">style</span><span class="o">=</span><span class="s">&quot;normal&quot;</span> <span class="n">weight</span><span class="o">=</span><span class="s">&quot;normal&quot;</span><span class="o">/&gt;</span>
+  <span class="o">&lt;</span><span class="n">font</span><span class="o">-</span><span class="n">triplet</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;Times&quot;</span> <span class="n">style</span><span class="o">=</span><span class="s">&quot;normal&quot;</span> <span class="n">weight</span><span class="o">=</span><span class="s">&quot;normal&quot;</span><span class="o">/&gt;</span>
+  <span class="o">&lt;</span><span class="n">font</span><span class="o">-</span><span class="n">triplet</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;Times-Roman&quot;</span> <span class="n">style</span><span class="o">=</span><span class="s">&quot;normal&quot;</span> <span class="n">weight</span><span class="o">=</span><span class="s">&quot;normal&quot;</span><span class="o">/&gt;</span>
+  <span class="o">&lt;</span><span class="n">font</span><span class="o">-</span><span class="n">triplet</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;TimesNewRoman&quot;</span> <span class="n">style</span><span class="o">=</span><span class="s">&quot;normal&quot;</span> <span class="n">weight</span><span class="o">=</span><span class="s">&quot;normal&quot;</span><span class="o">/&gt;</span>
+<span class="sr">&lt;/font&gt;</span>
+</pre></div>
+
+
+<p>An outline font configuration is simpler as the individual font size entries are not required. However, the characterset definition is now required within the afp-font element.</p>
+<div class="codehilite"><pre><span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZH200  &quot;</span>
+      <span class="na">base-uri=</span><span class="s">&quot;file:/fonts/ibm&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;sans-serif&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Helvetica&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;any&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+</pre></div>
+
+
 <p>If "base-uri" is missing or a relative URI, the fonts are resolved relative to the font base URI specified in the configuration (or on the FopFactory).
 Previously, the location of the font files was given by the "path" attribute. This is still supported for the time being, but you should move to using the more flexible "base-uri" attribute so you can profit from the power of URI resolvers.
-A CID-keyed font (Type 0, double-byte outline font) configuration is much the same as an outline font. However, the characterset definition is now required within the afp-font element.
-      <font>
-          <afp-font type="CIDKeyed" characterset="CZJHMNU" 
-             codepage="T1120000" encoding="UnicodeBigUnmarked"
-             base-uri="file:/fonts/ibm" />
-          <font-triplet name="J-Heisei Mincho" style="normal" weight="normal" />
-      </font></p>
+A CID-keyed font (Type 0, double-byte outline font) configuration is much the same as an outline font. However, the characterset definition is now required within the afp-font element.</p>
+<div class="codehilite"><pre><span class="nt">&lt;font&gt;</span>
+    <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;CIDKeyed&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZJHMNU&quot;</span> 
+       <span class="na">codepage=</span><span class="s">&quot;T1120000&quot;</span> <span class="na">encoding=</span><span class="s">&quot;UnicodeBigUnmarked&quot;</span>
+       <span class="na">base-uri=</span><span class="s">&quot;file:/fonts/ibm&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;J-Heisei Mincho&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+</pre></div>
+
+
 <p>Note that the value of the encoding attribute in the example is the double-byte encoding 'UnicodeBigUnmarked' (UTF-16BE).</p>
-<p>Experimentation has shown that the font metrics for the FOP built-in Base14 fonts are actually very similar to some of the IBM outline and raster fonts. In cases were the IBM font files are not available the base-uri attribute in the afp-font element can be replaced by a base14-font attribute giving the name of the matching Base14 font. In this case the AFP Renderer will take the font metrics from the built-in font.
-      <!-- The following are examples of defining outline fonts based on FOP built-in
-           font metrics for the Adobe Base14 fonts -->
-      <!-- sans-serif fonts based on Helvetica -->
-      <font>
-          <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH200  "
-            base14-font="Helvetica" />
-          <font-triplet name="sans-serif" style="normal" weight="normal"/>
-          <font-triplet name="Helvetica" style="normal" weight="normal"/>
-          <font-triplet name="any" style="normal" weight="normal"/>
-      </font>
-      <font>
-          <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH300  "
-            base14-font="HelveticaOblique" />
-          <font-triplet name="sans-serif" style="italic" weight="normal"/>
-          <font-triplet name="Helvetica" style="italic" weight="normal"/>
-          <font-triplet name="any" style="italic" weight="normal"/>
-      </font>
-      <font>
-          <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH400  "
-            base14-font="HelveticaBold" />
-          <font-triplet name="sans-serif" style="normal" weight="bold"/>
-          <font-triplet name="Helvetica" style="normal" weight="bold"/>
-          <font-triplet name="any" style="normal" weight="bold"/>
-      </font>
-      <font>
-          <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH500  "
-            base14-font="HelveticaBoldOblique" />
-          <font-triplet name="sans-serif" style="italic" weight="bold"/>
-          <font-triplet name="Helvetica" style="italic" weight="bold"/>
-          <font-triplet name="any" style="italic" weight="bold"/>
-      </font></p>
-<div class="codehilite"><pre>  <span class="c">&lt;!-- serif fonts based on Times Roman --&gt;</span>
-  <span class="nt">&lt;font&gt;</span>
-      <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZN200  &quot;</span>
-        <span class="na">base14-font=</span><span class="s">&quot;TimesRoman&quot;</span> <span class="nt">/&gt;</span>
-      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;serif&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Times&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Times-Roman&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-  <span class="nt">&lt;/font&gt;</span>
-
-  <span class="c">&lt;!-- The following are examples of defining raster fonts based on FOP built-in</span>
-<span class="c">       font metrics for the Adobe Base14 fonts --&gt;</span>
-  <span class="c">&lt;!-- monospaced fonts based on Courier --&gt;</span>
-  <span class="nt">&lt;font&gt;</span>
-    <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;raster&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;7&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420070&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;8&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420080&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;10&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420000&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;12&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200B0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;14&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200D0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;20&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200J0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
-    <span class="nt">&lt;/afp-font&gt;</span>
-    <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;monospace&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-    <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Courier&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-  <span class="nt">&lt;/font&gt;</span>
-  <span class="nt">&lt;font&gt;</span>
-    <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;raster&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;7&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440070&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;8&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440080&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;10&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440000&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;12&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400B0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;14&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400D0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-      <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;20&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400J0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
-    <span class="nt">&lt;/afp-font&gt;</span>
-    <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;monospace&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-    <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Courier&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-  <span class="nt">&lt;/font&gt;</span>
+<p>Experimentation has shown that the font metrics for the FOP built-in Base14 fonts are actually very similar to some of the IBM outline and raster fonts. In cases were the IBM font files are not available the base-uri attribute in the afp-font element can be replaced by a base14-font attribute giving the name of the matching Base14 font. In this case the AFP Renderer will take the font metrics from the built-in font.</p>
+<div class="codehilite"><pre><span class="c">&lt;!-- The following are examples of defining outline fonts based on FOP built-in</span>
+<span class="c">     font metrics for the Adobe Base14 fonts --&gt;</span>
+<span class="c">&lt;!-- sans-serif fonts based on Helvetica --&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZH200  &quot;</span>
+      <span class="na">base14-font=</span><span class="s">&quot;Helvetica&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;sans-serif&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Helvetica&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;any&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZH300  &quot;</span>
+      <span class="na">base14-font=</span><span class="s">&quot;HelveticaOblique&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;sans-serif&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Helvetica&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;any&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZH400  &quot;</span>
+      <span class="na">base14-font=</span><span class="s">&quot;HelveticaBold&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;sans-serif&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Helvetica&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;any&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZH500  &quot;</span>
+      <span class="na">base14-font=</span><span class="s">&quot;HelveticaBoldOblique&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;sans-serif&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Helvetica&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;any&quot;</span> <span class="na">style=</span><span class="s">&quot;italic&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+
+<span class="c">&lt;!-- serif fonts based on Times Roman --&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;outline&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZN200  &quot;</span>
+      <span class="na">base14-font=</span><span class="s">&quot;TimesRoman&quot;</span> <span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;serif&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Times&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Times-Roman&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+
+<span class="c">&lt;!-- The following are examples of defining raster fonts based on FOP built-in</span>
+<span class="c">     font metrics for the Adobe Base14 fonts --&gt;</span>
+<span class="c">&lt;!-- monospaced fonts based on Courier --&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;raster&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;7&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420070&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;8&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420080&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;10&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0420000&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;12&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200B0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;14&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200D0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;20&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04200J0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;Courier&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/afp-font&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;monospace&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Courier&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;raster&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T1V10500&quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp500&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;7&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440070&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;8&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440080&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;10&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0440000&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;12&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400B0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;14&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400D0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;20&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C04400J0&quot;</span> <span class="na">base14-font=</span><span class="s">&quot;CourierBold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/afp-font&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;monospace&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Courier&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/font&gt;</span>
 </pre></div>
 
 
 <p>By default, all manually configured fonts are embedded, unless they are matched in the <a href="fonts.html#embedding">section of the configuration file</a> . However, the default fonts shown above will not be embedded.</p>
 <p>For double byte EBCDIC encoded character sets, there is an optional tag that must be set to prevent characters from being miscoded. This defaults to "false" if not specified.</p>
-<div class="codehilite"><pre>    <span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">font</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;CIDKeyed&quot;</span> <span class="n">codepage</span><span class="o">=</span><span class="s">&quot;T10835  &quot;</span> <span class="n">encoding</span><span class="o">=</span><span class="s">&quot;Cp937&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;CZTKAI&quot;</span> <span class="n">ebcdic</span><span class="o">-</span><span class="n">dbcs</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">afp</span><span class="o">-</span><span class="n">font</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;CIDKeyed&quot;</span> <span class="n">codepage</span><span class="o">=</span><span class="s">&quot;T10835  &quot;</span> <span class="n">encoding</span><span class="o">=</span><span class="s">&quot;Cp937&quot;</span> <span class="n">characterset</span><span class="o">=</span><span class="s">&quot;CZTKAI&quot;</span> <span class="n">ebcdic</span><span class="o">-</span><span class="n">dbcs</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
 </pre></div>
 
 
-<h3 id="output-resolution-wzxhzdk181wzxhzdk182">Output Resolution ## <a id="afp-renderer-resolution-config"></a></h3>
+<h4 id="output-resolutionwzxhzdk104wzxhzdk105">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>
+<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-wzxhzdk184wzxhzdk185">Images ## <a id="afp-image-config"></a></h3>
+<h4 id="imageswzxhzdk107wzxhzdk108">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>
+<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>
 
 
 <p>This will put images as RGB images into the AFP output stream. The default setting is:</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;b+w&quot;</span> <span class="n">bits</span><span class="o">-</span><span class="n">per</span><span class="o">-</span><span class="n">pixel</span><span class="o">=</span><span class="s">&quot;8&quot;</span> <span class="n">native</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<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;b+w&quot;</span> <span class="n">bits</span><span class="o">-</span><span class="n">per</span><span class="o">-</span><span class="n">pixel</span><span class="o">=</span><span class="s">&quot;8&quot;</span> <span class="n">native</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
 </pre></div>
 
 
 <p>Only the values "color" and "b+w" are allowed for the mode attribute.</p>
 <p>The bits-per-pixel attribute is ignored if mode is "color". For "b+w" mode is must be 1, 4, or 8.</p>
-<div class="codehilite"><pre>  <span class="o">&lt;</span><span class="n">images</span> <span class="n">native</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">images</span> <span class="n">native</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
 </pre></div>
 
 
 <p>When the native attribute is specified and set to "true", all image resources will be natively injected into the datastream using an object container rather than being converted into an IOCA FS45 image. Support for native image formats (e.g. JPEG, TIFF, GIF) is not always available on printer implementations so by default this configuration option is set to "false".</p>

[... 309 lines stripped ...]


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


Mime
View raw message