xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r840735 [18/19] - in /websites/staging/xmlgraphics/trunk/content: ./ batik/ batik/dev/ batik/tools/ batik/using/ batik/using/scripting/ commons/ fop/ fop/0.95/ fop/1.0/ fop/1.1/ fop/trunk/
Date Tue, 04 Dec 2012 15:59:44 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 Tue Dec  4 15:59:34 2012
@@ -354,19 +354,19 @@ $(document).ready(function () {
 <p>Produce an IF file: <code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code> <br></br>Specifying "application/pdf" for the "-at" parameter causes FOP to use FOP's own font subsystem (which is used by the PDF renderer). Note that no PDF file is created in this step.</p>
 </li>
 <li>
-<p>Render to a PDF file: <code>fop -atin myfile.at.xml -pdf myfile.pdf</code> </p>
+<p>Render to a PDF file: <code>fop -atin myfile.at.xml -pdf myfile.pdf</code></p>
 </li>
 <li>
 <p>Render to a Java2D-based renderer:</p>
 </li>
 <li>
-<p><code>fop -atin myfile.at.xml -print</code> </p>
+<p><code>fop -atin myfile.at.xml -print</code></p>
 </li>
 <li>
-<p><code>fop -atin myfile.at.xml -awt</code> </p>
+<p><code>fop -atin myfile.at.xml -awt</code></p>
 </li>
 <li>
-<p><code>fop -atin myfile.at.xml -tiff myfile.tiff</code> </p>
+<p><code>fop -atin myfile.at.xml -tiff myfile.tiff</code></p>
 </li>
 </ol>
 <h3 id="output-to-a-printer-or-other-device-wzxhzdk53wzxhzdk54">Output to a Printer or Other Device <a id="general-direct-output"></a></h3>
@@ -381,53 +381,53 @@ Set the output MIME type to "application
 <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-wzxhzdk57wzxhzdk58">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>
+<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-wzxhzdk59wzxhzdk60">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.)</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="p">}</span>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span> <span class="n">args</span><span class="o">[])</span> <span class="o">{</span>
+    <span class="k">try</span> <span class="o">{</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="o">();</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="o">(</span><span class="n">args</span><span class="o">[</span><span class="mi">2</span><span class="o">]);</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="na">newInstance</span><span class="o">();</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="na">newFop</span><span class="o">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="na">MIME_PDF</span><span class="o">,</span> <span class="n">fopout</span><span class="o">);</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="na">newInstance</span><span class="o">().</span><span class="na">newTransformer</span><span class="o">(</span>
+            <span class="k">new</span> <span class="nf">StreamSource</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="n">args</span><span class="o">[</span><span class="mi">1</span><span class="o">])));</span>
+        <span class="n">transformer</span><span class="o">.</span><span class="na">transform</span><span class="o">(</span><span class="k">new</span> <span class="n">StreamSource</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="n">args</span><span class="o">[</span><span class="mi">0</span><span class="o">])),</span>
+            <span class="k">new</span> <span class="nf">SAXResult</span><span class="o">(</span><span class="n">fop</span><span class="o">.</span><span class="na">getDefaultHandler</span><span class="o">()));</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="o">(</span><span class="n">fopout</span><span class="o">.</span><span class="na">toByteArray</span><span class="o">());</span>
+        <span class="kt">int</span> <span class="n">n</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="na">getNumberOfPages</span><span class="o">();</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="o">(</span><span class="n">reader</span><span class="o">.</span><span class="na">getPageSizeWithRotation</span><span class="o">(</span><span class="mi">1</span><span class="o">));</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="na">getInstance</span><span class="o">(</span><span class="n">document</span><span class="o">,</span> <span class="n">outfile</span><span class="o">);</span>
+        <span class="n">writer</span><span class="o">.</span><span class="na">setEncryption</span><span class="o">(</span><span class="n">PdfWriter</span><span class="o">.</span><span class="na">STRENGTH40BITS</span><span class="o">,</span> <span class="s">&quot;pdf&quot;</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span>
+          <span class="n">PdfWriter</span><span class="o">.</span><span class="na">AllowCopy</span><span class="o">);</span>
+        <span class="n">document</span><span class="o">.</span><span class="na">open</span><span class="o">();</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="na">getDirectContent</span><span class="o">();</span>
+        <span class="n">PdfImportedPage</span> <span class="n">page</span><span class="o">;</span>
+        <span class="kt">int</span> <span class="n">rotation</span><span class="o">;</span>
+        <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
+        <span class="k">while</span> <span class="o">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">n</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">i</span><span class="o">++;</span>
+            <span class="n">document</span><span class="o">.</span><span class="na">setPageSize</span><span class="o">(</span><span class="n">reader</span><span class="o">.</span><span class="na">getPageSizeWithRotation</span><span class="o">(</span><span class="n">i</span><span class="o">));</span>
+            <span class="n">document</span><span class="o">.</span><span class="na">newPage</span><span class="o">();</span>
+            <span class="n">page</span> <span class="o">=</span> <span class="n">writer</span><span class="o">.</span><span class="na">getImportedPage</span><span class="o">(</span><span class="n">reader</span><span class="o">,</span> <span class="n">i</span><span class="o">);</span>
+            <span class="n">rotation</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="na">getPageRotation</span><span class="o">(</span><span class="n">i</span><span class="o">);</span>
+            <span class="k">if</span> <span class="o">(</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="o">)</span> <span class="o">{</span>
+                <span class="n">cb</span><span class="o">.</span><span class="na">addTemplate</span><span class="o">(</span><span class="n">page</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span> <span class="o">-</span><span class="mi">1</span><span class="n">f</span><span class="o">,</span> <span class="mi">1</span><span class="n">f</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span>
+                <span class="n">reader</span><span class="o">.</span><span class="na">getPageSizeWithRotation</span><span class="o">(</span><span class="n">i</span><span class="o">).</span><span class="na">height</span><span class="o">());</span>
+            <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
+                <span class="n">cb</span><span class="o">.</span><span class="na">addTemplate</span><span class="o">(</span><span class="n">page</span><span class="o">,</span> <span class="mi">1</span><span class="n">f</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span> <span class="mi">1</span><span class="n">f</span><span class="o">,</span> <span class="mi">0</span><span class="o">,</span> <span class="mi">0</span><span class="o">);</span>
+            <span class="o">}</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Processed page &quot;</span> <span class="o">+</span> <span class="n">i</span><span class="o">);</span>
+        <span class="o">}</span>
+        <span class="n">document</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+    <span class="o">}</span> <span class="k">catch</span><span class="o">(</span> <span class="n">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+        <span class="n">e</span><span class="o">.</span><span class="na">printStackTrace</span><span class="o">();</span>
+    <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -444,8 +444,8 @@ Here is some sample code that uses iText
 </ul>
 <h3 id="extensions-wzxhzdk65wzxhzdk66">Extensions <a id="pdf-extensions"></a></h3>
 <p>The PDF Renderer supports some PDF specific extensions which can be embedded into the input FO document. To use the extensions the appropriate namespace must be declared in the fo:root element like this:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
-         <span class="n">xmlns:pdf</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/pdf&quot;</span><span class="o">&gt;</span>
+<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:pdf=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/pdf&quot;</span><span class="nt">&gt;</span>
 </pre></div>
 
 
@@ -507,10 +507,10 @@ Here is some sample code that uses iText
 <h3 id="references-wzxhzdk77wzxhzdk78">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>
+<p><a href="http://en.wikipedia.org/wiki/Printer_Control_Language">WikiPedia entry on PCL</a></p>
 </li>
 <li>
-<p><a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568">Technical reference documents on PCL from Hewlett-Packard</a> </p>
+<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-wzxhzdk79wzxhzdk80">Limitations <a id="pcl-limitations"></a></h3>
@@ -556,8 +556,8 @@ Here is some sample code that uses iText
 <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-wzxhzdk83wzxhzdk84">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="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:pcl=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/pcl&quot;</span><span class="nt">&gt;</span>
 </pre></div>
 
 
@@ -623,13 +623,13 @@ Here is some sample code that uses iText
 <h3 id="references-wzxhzdk93wzxhzdk94">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>
+<p><a href="http://en.wikipedia.org/wiki/Advanced_Function_Presentation">AFP (Advanced Function Presentation)</a></p>
 </li>
 <li>
-<p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPResources">AFP Resources on the FOP WIKI</a> </p>
+<p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPResources">AFP Resources on the FOP WIKI</a></p>
 </li>
 <li>
-<p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPOutput">Technical notes on AFP output in FOP</a> </p>
+<p><a href="http://wiki.apache.org/xmlgraphics-fop/AFPOutput">Technical notes on AFP output in FOP</a></p>
 </li>
 </ul>
 <h3 id="limitations-wzxhzdk95wzxhzdk96">Limitations <a id="afp-limitations"></a></h3>
@@ -670,32 +670,32 @@ Here is some sample code that uses iText
 </li>
 </ol>
 <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>
+<div class="codehilite"><pre><span class="c">&lt;!-- This is an example of mapping actual IBM raster fonts / code pages to a FOP font --&gt;</span>
+<span class="nt">&lt;font&gt;</span>
+  <span class="c">&lt;!-- The afp-font element defines the IBM code page, the matching Java encoding and the</span>
+<span class="c">       base URI for the 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="na">base-uri=</span><span class="s">&quot;fonts/ibm/&quot;</span><span class="nt">&gt;</span>
+    <span class="c">&lt;!-- For a raster font a separate element for each font size is required providing</span>
+<span class="c">         the font size and the corresponding IBM Character set name --&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;C0N20070&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;C0N20080&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;C0N20000&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;11&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200A0&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;C0N200B0&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;C0N200D0&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;16&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200F0&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;18&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200H0&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;C0N200J0&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;24&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200N0&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;30&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200T0&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;afp-raster-font</span> <span class="na">size=</span><span class="s">&quot;36&quot;</span> <span class="na">characterset=</span><span class="s">&quot;C0N200Z0&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/afp-font&gt;</span>
+  <span class="c">&lt;!-- These are the usual FOP font triplets as they apply to this font --&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-triplet</span> <span class="na">name=</span><span class="s">&quot;TimesNewRoman&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>
 
 
@@ -714,7 +714,7 @@ Here is some sample code that uses iText
 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.</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="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>
@@ -797,7 +797,7 @@ A CID-keyed font (Type 0, double-byte ou
 
 <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="nt">&lt;afp-font</span> <span class="na">type=</span><span class="s">&quot;CIDKeyed&quot;</span> <span class="na">codepage=</span><span class="s">&quot;T10835  &quot;</span> <span class="na">encoding=</span><span class="s">&quot;Cp937&quot;</span> <span class="na">characterset=</span><span class="s">&quot;CZTKAI&quot;</span> <span class="na">ebcdic-dbcs=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
@@ -809,39 +809,39 @@ A CID-keyed font (Type 0, double-byte ou
 
 <h4 id="imageswzxhzdk106wzxhzdk107">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="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;color&quot;</span> <span class="nt">/&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="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;b+w&quot;</span> <span class="na">bits-per-pixel=</span><span class="s">&quot;8&quot;</span> <span class="na">native=</span><span class="s">&quot;true&quot;</span><span class="nt">/&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="nt">&lt;images</span> <span class="na">native=</span><span class="s">&quot;true&quot;</span><span class="nt">/&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>
 <p>Setting <code>cmyk="true"</code> on the <code>images</code> element will enable CMYK colors. This will only have an effect if the color mode is set to "color". 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="n">cmyk</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;color&quot;</span> <span class="na">cmyk=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
 <p>When the color mode is set to 1 bit (bi-level), the "dithering-quality" attribute can be used to select the level of quality to use when converting images to bi-level images. Valid values for this attribute are floating point numbers from 0.0 (fastest) to 1.0 (best), or special values: "minimum" (=0.0), "maximum" (1.0), "medium" (0.5, the default). For the higher settings to work as expected, JAI needs to be present in the classpath. If JAI is present, 0.0 results in a minimal darkness-level switching between white and black. 0.5 does bayer-based dithering and 1.0 will use error-diffusion dithering. The higher the value, the higher the quality and the slower the processing of the images.</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;1&quot;</span> <span class="n">dithering</span><span class="o">-</span><span class="n">quality</span><span class="o">=</span><span class="s">&quot;maximum&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;b+w&quot;</span> <span class="na">bits-per-pixel=</span><span class="s">&quot;1&quot;</span> <span class="na">dithering-quality=</span><span class="s">&quot;maximum&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
 <p>When the boolean attribute pseg (default false) is set to true, non-inline FS11 and FS45 IOCA images are wrapped in page segment. This option is provided to support printers/print servers that require this MO:DCA structure.</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">pseg</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;b+w&quot;</span> <span class="na">bits-per-pixel=</span><span class="s">&quot;8&quot;</span> <span class="na">pseg=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
 <p>Setting the boolean attribute fs45 to true (default false) will force all images to FS45.</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">fs45</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;images</span> <span class="na">mode=</span><span class="s">&quot;b+w&quot;</span> <span class="na">bits-per-pixel=</span><span class="s">&quot;8&quot;</span> <span class="na">fs45=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
@@ -856,12 +856,12 @@ A CID-keyed font (Type 0, double-byte ou
 <h4 id="goca-vector-graphicswzxhzdk109wzxhzdk110">GOCA (Vector Graphics)<a id="afp-goca-config"></a></h4>
 <p>Not all AFP implementations support GOCA. Some also have bugs related to GOCA. Therefore, it is desirable to have some control over the generation of GOCA graphics.</p>
 <p>GOCA is enabled by default. You can disable GOCA entirely in which case the AFP support falls back to generating bitmaps for vector graphics. Example:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">goca</span> <span class="n">enabled</span><span class="o">=</span><span class="s">&quot;false&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;goca</span> <span class="na">enabled=</span><span class="s">&quot;false&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
 <p>Some AFP implementations have trouble rendering text in GOCA. You can instruct the AFP support to render text as shapes (i.e. use vector graphics to paint text). Example:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">goca</span> <span class="n">enabled</span><span class="o">=</span><span class="s">&quot;true&quot;</span> <span class="n">text</span><span class="o">=</span><span class="s">&quot;shapes&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;goca</span> <span class="na">enabled=</span><span class="s">&quot;true&quot;</span> <span class="na">text=</span><span class="s">&quot;shapes&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
@@ -882,15 +882,15 @@ A CID-keyed font (Type 0, double-byte ou
 <h4 id="resource-level-defaultswzxhzdk116wzxhzdk117">Resource Level Defaults<a id="afp-resource-level-defaults"></a></h4>
 <p>By default, bitmap image objects (or page segments derived from them) are put in the print-file-level resource group and GOCA graphics are inlined for compatibility with the AFP Workbench tool.</p>
 <p>It is possible to override these defaults, either per image (see the <a href="#afp-foreign-attributes-resource">afp:resource-level</a> extension attribute below) or by specifying different defaults in the configuration:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">default</span><span class="o">-</span><span class="n">resource</span><span class="o">-</span><span class="n">levels</span> <span class="n">goca</span><span class="o">=</span><span class="s">&quot;print-file&quot;</span> <span class="n">bitmap</span><span class="o">=</span><span class="s">&quot;inline&quot;</span><span class="o">/&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;default-resource-levels</span> <span class="na">goca=</span><span class="s">&quot;print-file&quot;</span> <span class="na">bitmap=</span><span class="s">&quot;inline&quot;</span><span class="nt">/&gt;</span>
 </pre></div>
 
 
 <p>"goca" refers to GOCA graphics and "bitmap" refers to IOCA images. The possible values for the attributes are "inline" and "print-file". In the future, additional possibilities may be added.</p>
 <h3 id="extensions-wzxhzdk118wzxhzdk119">Extensions <a id="afp-extensions"></a></h3>
 <p>The AFP Renderer supports some AFP specific extensions which can be embedded into the input fo document. To use the extensions the appropriate namespace must be declared in the fo:root element like this:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
-         <span class="n">xmlns:afp</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="o">&gt;</span>
+<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>
 </pre></div>
 
 
@@ -956,13 +956,13 @@ A CID-keyed font (Type 0, double-byte ou
 <p>The no-operation extension element can appear as child of <code>simple-page-master</code> (appears after "Begin Page" BPG), <code>page-sequence</code> (appears after "Begin Named Page Group" BNG and <code>declarations</code> (appears after "Begin Document" BDT). Multiple no-operation extension elements inside the same formatting object are allowed. Each NOP will appear right after the respective "Begin" field indicated above even if it is specified as the last child under its parent. The order inside the parent will be maintained. The "placement" attribute can be used to have the NOP appear before the "End" field of the object rather than after the "Begin" field. Specify <code>placement="before-end"</code> to do that. Please note that, at the moment, this only has an effect for NOPs that are children of the <code>page-sequence</code> formatting object. The "name" attribute is mandatory but will not appear inside the AFP stream.</p>
 <h4 id="invoke-medium-map-imm-extensionwzxhzdk128wzxhzdk129">Invoke Medium Map (IMM) Extension<a id="afp-invoke-medium-map"></a></h4>
 <p>The invoke-medium-map extension allows to generate IMM fields (Invoke Medium Map) in the generated AFP output. Example:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
-    <span class="n">xmlns:afp</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions/afp&quot;</span><span class="o">&gt;</span>
-  <span class="p">[</span><span class="o">..</span><span class="p">]</span>
-  <span class="o">&lt;</span><span class="n">fo:page</span><span class="o">-</span><span class="n">sequence</span> <span class="n">master</span><span class="o">-</span><span class="n">reference</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">afp:invoke</span><span class="o">-</span><span class="n">medium</span><span class="o">-</span><span class="nb">map</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;MYMAP&quot;</span><span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">fo:flow</span> <span class="n">flow</span><span class="o">-</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;xsl-region-body&quot;</span><span class="o">&gt;</span>
-      <span class="p">[</span><span class="o">..</span><span class="p">]</span>
+<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>
+  [..]
+  <span class="nt">&lt;fo:page-sequence</span> <span class="na">master-reference=</span><span class="s">&quot;normal&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;afp:invoke-medium-map</span> <span class="na">name=</span><span class="s">&quot;MYMAP&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;fo:flow</span> <span class="na">flow-name=</span><span class="s">&quot;xsl-region-body&quot;</span><span class="nt">&gt;</span>
+      [..]
 </pre></div>
 
 
@@ -1109,16 +1109,16 @@ These are some known restrictions compar
 <p><code>PackBits</code> (RLE, run-length encoding)</p>
 </li>
 <li>
-<p><code>JPEG</code> </p>
+<p><code>JPEG</code></p>
 </li>
 <li>
-<p><code>Deflate</code> </p>
+<p><code>Deflate</code></p>
 </li>
 <li>
-<p><code>LZW</code> </p>
+<p><code>LZW</code></p>
 </li>
 <li>
-<p><code>ZLib</code> </p>
+<p><code>ZLib</code></p>
 </li>
 <li>
 <p><code>CCITT T.4</code> (Fax Group 3)</p>
@@ -1131,8 +1131,8 @@ These are some known restrictions compar
 If you want to use CCITT compression, please make sure you've got <a href="http://java.sun.com/products/java-media/jai/current.html">Java Advanced Imaging Image I/O Tools</a> in your classpath. The Sun JRE doesn't come with a TIFF codec built in, so it has to be added separately. The internal TIFF codec from XML Graphics Commons only supports PackBits, Deflate and JPEG compression for writing.</p>
 <h3 id="runtime-rendering-options-wzxhzdk154wzxhzdk155">Runtime Rendering Options <a id="bitmap-rendering-options"></a></h3>
 <p>The IF-based bitmap output implementations support a rendering option with the key "target-bitmap-size" (value: java.awt.Dimension) that allows to force the pages to be proportionally fit into a bitmap of a given size. This can be used to produce thumbnails or little preview images of the individual pages. An example:</p>
-<div class="codehilite"><pre><span class="n">userAgent</span><span class="o">.</span><span class="n">getRenderingOptions</span><span class="p">()</span><span class="o">.</span><span class="n">put</span><span class="p">(</span>
-    <span class="s">&quot;target-bitmap-size&quot;</span><span class="p">,</span> <span class="k">new</span> <span class="n">Dimension</span><span class="p">(</span><span class="mi">320</span><span class="p">,</span> <span class="mi">200</span><span class="p">));</span>
+<div class="codehilite"><pre><span class="n">userAgent</span><span class="o">.</span><span class="na">getRenderingOptions</span><span class="o">().</span><span class="na">put</span><span class="o">(</span>
+    <span class="s">&quot;target-bitmap-size&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">Dimension</span><span class="o">(</span><span class="mi">320</span><span class="o">,</span> <span class="mi">200</span><span class="o">));</span>
 </pre></div>
 
 

Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/pdfencryption.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/pdfencryption.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/pdfencryption.html Tue Dec  4 15:59:34 2012
@@ -486,15 +486,15 @@ $(document).ready(function () {
 </tr>
 </tbody>
 </table>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">fop</span><span class="o">.</span><span class="n">pdf</span><span class="o">.</span><span class="n">PDFEncryptionParams</span><span class="p">;</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">org.apache.fop.pdf.PDFEncryptionParams</span><span class="o">;</span>
 
-<span class="p">[</span><span class="o">..</span><span class="p">]</span>
+<span class="o">[..]</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="n">useragent</span><span class="o">.</span><span class="n">getRendererOptions</span><span class="p">()</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="s">&quot;encryption-params&quot;</span><span class="p">,</span> <span class="k">new</span> <span class="n">PDFEncryptionParams</span><span class="p">(</span>
-    <span class="n">null</span><span class="p">,</span> <span class="s">&quot;password&quot;</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</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">userAgent</span><span class="p">);</span>
-<span class="p">[</span><span class="o">..</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="na">newFOUserAgent</span><span class="o">();</span>
+<span class="n">useragent</span><span class="o">.</span><span class="na">getRendererOptions</span><span class="o">().</span><span class="na">put</span><span class="o">(</span><span class="s">&quot;encryption-params&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">PDFEncryptionParams</span><span class="o">(</span>
+    <span class="kc">null</span><span class="o">,</span> <span class="s">&quot;password&quot;</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="kc">true</span><span class="o">));</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="na">newFop</span><span class="o">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="na">MIME_PDF</span><span class="o">,</span> <span class="n">userAgent</span><span class="o">);</span>
+<span class="o">[..]</span>
 </pre></div>
 
 

Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/running.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/running.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/running.html Tue Dec  4 15:59:34 2012
@@ -507,7 +507,7 @@ The user is always responsible to provid
 In the case of using -xml and -xsl input, although the user is responsible for the XSL-FO code that is FOP's input, it is not visible to the user. To make the intermediate FO file visible, the FOP distribution includes the "-foout" option which causes FOP to run only the first (transformation) step, and write the results to a file. (See also the Xalan command-line below)
 When asking for help on the FOP mailing lists, <em>never</em> attach XML and XSL to illustrate the issue. Always run the XSLT step (-foout) and send the resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is correct before sending it.
 The -foout option works the same way as if you would call the <a href="http://xml.apache.org/xalan-j/commandline.html">Xalan command-line</a> :</p>
-<p><code>java org.apache.xalan.xslt.Process -IN xmlfile -XSL file -OUT outfile</code> </p>
+<p><code>java org.apache.xalan.xslt.Process -IN xmlfile -XSL file -OUT outfile</code></p>
 <p>Note that there are some subtle differences between the FOP and Xalan command-lines.</p>
 <h2 id="memory-usage-wzxhzdk22wzxhzdk23">Memory Usage <a id="memory"></a></h2>
 <p>FOP can consume quite a bit of memory, even though this has been continually improved. This is partly inherent to the formatting process and partly caused by implementation choices. All FO processors currently on the market have memory problems with certain layouts.</p>



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


Mime
View raw message