You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by bu...@apache.org on 2012/12/03 16:47:54 UTC

svn commit: r840560 [8/16] - in /websites/staging/xmlgraphics/trunk/content: ./ fop/0.95/ fop/1.0/ fop/1.1/ fop/trunk/

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfa.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfa.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfa.html Mon Dec  3 15:47:41 2012
@@ -385,7 +385,7 @@ Fop fop = fopFactory.newFop(MimeConstant
 There are additional requirements if you want to enabled PDF/A-1a (Tagged PDF). This is particularly the specification of the natural language and alternative descriptions for images. Please refer to the <a href="accessibility.html">Accessibility page</a> for details.</p>
 </li>
 </ul>
-<h1 id="pdf-profile-compatibility-wzxhzdk15wzxhzdk16">PDF profile compatibility <a id="profile-compatibility"></a></h1>
+<h2 id="pdf-profile-compatibility-wzxhzdk15wzxhzdk16">PDF profile compatibility <a id="profile-compatibility"></a></h2>
 <p>The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" (or "PDF/A-1a") are compatible and can both be activated at the same time.</p>
 <h2 id="interoperability-wzxhzdk17wzxhzdk18">Interoperability <a id="interoperability"></a></h2>
 <p>There has been some confusion about the namespace for the PDF/A indicator in the XMP metadata. At least three variants have been seen in the wild:</p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfencryption.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfencryption.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfencryption.html Mon Dec  3 15:47:41 2012
@@ -341,18 +341,18 @@ $(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/1.0/">1.0</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk0-fop-pdf-encryption">Apache&trade; FOP: PDF encryption.</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk1-fop-pdf-encryption">Apache&trade; FOP: PDF encryption.</h1>
 <p><authors><person email="pietsch@apache.org" name="J.Pietschmann"></person><person email="jeremias@apache.org" name="Jeremias Märki"></person></authors></p>
-<h2 id="overview-wzxhzdk7wzxhzdk8">Overview <a id="Overview"></a></h2>
+<h2 id="overview-wzxhzdk8wzxhzdk9">Overview <a id="Overview"></a></h2>
 <p>Apache&trade; FOP supports encryption of PDF output, thanks to Patrick C. Lankswert. This feature is commonly used to prevent unauthorized viewing, printing, editing, copying text from the document and doing annotations. It is also possible to ask the user for a password in order to view the contents. Note that there already exist third party applications which can decrypt an encrypted PDF without effort and allow the aforementioned operations, therefore the degree of protection is limited.</p>
 <p>For further information about features and restrictions regarding PDF encryption, look at the documentation coming with Adobe Acrobat or the technical documentation on the Adobe web site.</p>
-<h2 id="usage-command-line-wzxhzdk10wzxhzdk11">Usage (command line) <a id="Usage+%28command+line%29"></a></h2>
+<h2 id="usage-command-line-wzxhzdk11wzxhzdk12">Usage (command line) <a id="Usage+%28command+line%29"></a></h2>
 <p>Encryption is enabled by supplying any of the encryption related options.</p>
 <p>An owner password is set with the <code>-o</code> option. This password is actually used as encryption key. Many tools for PDF processing ask for this password to disregard any restriction imposed on the PDF document.</p>
 <p>If no owner password has been supplied but FOP was asked to apply some restrictions, a random password is used. In this case it is obviously impossiible to disregard restrictions in PDF processing tools.</p>
 <p>A user password, supplied with the <code>-u</code> option, will cause the PDF display software to ask the reader for this password in order to view the contents of the document. If no user password was supplied, viewing the content is not restricted.</p>
 <p>Further restrictions can be imposed by using the <code>-noprint</code> , <code>-nocopy</code> , <code>-noedit</code> and <code>-noannotations</code> options, which disable printing, copying text, editing in Adobe Acrobat and making annotations, respectively.</p>
-<h2 id="usage-embedded-wzxhzdk12wzxhzdk13">Usage (embedded) <a id="Usage+%28embedded%29"></a></h2>
+<h2 id="usage-embedded-wzxhzdk13wzxhzdk14">Usage (embedded) <a id="Usage+%28embedded%29"></a></h2>
 <p>When FOP is embedded in another Java application you need to set an options map on the renderer. These are the supported options:</p>
 <table>
 <thead>
@@ -414,13 +414,19 @@ $(document).ready(function () {
 </tr>
 </tbody>
 </table>
-<p>import org.apache.fop.pdf.PDFEncryptionParams;</p>
-<p class="."></p>
-<p class=".">FOUserAgent userAgent = fopFactory.newFOUserAgent();
-useragent.getRendererOptions().put("encryption-params", new PDFEncryptionParams(
-    null, "password", false, false, true, true));
-Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
-</p>
+<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>
+
+<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="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>
+</pre></div>
+
+
+<p>The parameters for the constructor of PDFEncryptionParams are:</p>
 <ol>
 <li>
 <p>userPassword: String, may be null</p>
@@ -462,13 +468,13 @@ Fop fop = fopFactory.newFop(MimeConstant
 <p>noannotations: Boolean or "true"/"false"</p>
 </li>
 </ol>
-<h2 id="environment-wzxhzdk14wzxhzdk15">Environment <a id="Environment"></a></h2>
+<h2 id="environment-wzxhzdk15wzxhzdk16">Environment <a id="Environment"></a></h2>
 <p>In order to use PDF encryption, FOP has to be compiled with cryptography support. Currently, only <a href="http://java.sun.com/j2se/1.4/docs/guide/security/jce/JCERefGuide.html">JCE</a> is supported. JCE is part of JDK 1.4. For earlier JDKs, it can be installed separately. The build process automatically detects JCE presence and installs PDF encryption support if possible, otherwise a stub is compiled in.</p>
 <p>Cryptography support must also be present at run time. In particular, a provider for the RC4 cipher is needed. Unfortunately, the sample JCE provider in Sun's JDK 1.4 does <strong>not</strong> provide RC4. If you get a message saying
 "Cannot find any provider supporting RC4"
 then you don't have the needed infrastructure.</p>
 <p>There are several commercial and a few Open Source packages which provide RC4. A pure Java implementation is produced by <a href="http://www.bouncycastle.org/">The Legion of the Bouncy Castle</a> . <a href="http://www.mozilla.org/projects/security/pki/jss/">Mozilla JSS</a> is an interface to a native implementation.</p>
-<h2 id="installing-a-crypto-provider-wzxhzdk16wzxhzdk17">Installing a crypto provider <a id="install_crypto"></a></h2>
+<h2 id="installing-a-crypto-provider-wzxhzdk17wzxhzdk18">Installing a crypto provider <a id="install_crypto"></a></h2>
 <p>The pure Java implementation from <a href="http://www.bouncycastle.org/">Bouncy Castle</a> is easy to install.</p>
 <ol>
 <li>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.0/running.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.0/running.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.0/running.html Mon Dec  3 15:47:41 2012
@@ -341,8 +341,8 @@ $(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/1.0/">1.0</a></div> -->
-      	<div class="section-content"><h1 id="running-apachewzxhzdk0-fop">Running Apache&trade; FOP</h1>
-<h2 id="system-requirements-wzxhzdk1wzxhzdk2">System Requirements <a id="require"></a></h2>
+      	<div class="section-content"><h1 id="running-apachewzxhzdk1-fop">Running Apache&trade; FOP</h1>
+<h2 id="system-requirements-wzxhzdk2wzxhzdk3">System Requirements <a id="require"></a></h2>
 <p>The following software must be installed:</p>
 <ul>
 <li>
@@ -385,105 +385,114 @@ $(document).ready(function () {
 <ul>
 <li>If you will be using FOP to process SVG, you must do so in a graphical environment. See <a href="graphics.html#batik">FOP: Graphics (Batik)</a> for details.</li>
 </ul>
-<h2 id="installation-wzxhzdk3wzxhzdk4">Installation <a id="install"></a></h2>
-<h3 id="instructions-wzxhzdk5wzxhzdk6">Instructions <a id="install-instruct"></a></h3>
+<h2 id="installation-wzxhzdk4wzxhzdk5">Installation <a id="install"></a></h2>
+<h3 id="instructions-wzxhzdk6wzxhzdk7">Instructions <a id="install-instruct"></a></h3>
 <p>Basic FOP installation consists of first unzipping the <code>.gz</code> file that is the distribution medium, then unarchiving the resulting <code>.tar</code> file in a directory/folder that is convenient on your system. Please consult your operating system documentation or Zip application software documentation for instructions specific to your site.</p>
-<h3 id="problems-wzxhzdk7wzxhzdk8">Problems <a id="install-problems"></a></h3>
+<h3 id="problems-wzxhzdk8wzxhzdk9">Problems <a id="install-problems"></a></h3>
 <p>Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip and unarchive their distribution media. This is a legacy of older Mac operating systems, which had a 31-character pathname limit. Several Mac OSX users have recommended that Mac OSX users use the shell command <code>tar -xzf</code> instead.</p>
-<h2 id="starting-fop-as-a-standalone-application-wzxhzdk9wzxhzdk10">Starting FOP as a Standalone Application <a id="standalone-start"></a></h2>
-<h3 id="using-the-fop-script-or-batch-file-wzxhzdk11wzxhzdk12">Using the fop script or batch file <a id="fop-script"></a></h3>
+<h2 id="starting-fop-as-a-standalone-application-wzxhzdk10wzxhzdk11">Starting FOP as a Standalone Application <a id="standalone-start"></a></h2>
+<h3 id="using-the-fop-script-or-batch-file-wzxhzdk12wzxhzdk13">Using the fop script or batch file <a id="fop-script"></a></h3>
 <p>The usual and recommended practice for starting FOP from the command line is to run the batch file fop.bat (Windows) or the shell script fop (Unix/Linux). These scripts require that the environment variable JAVA_HOME be set to a path pointing to the appropriate Java installation on your system. Macintosh OSX includes a Java environment as part of its distribution. We are told by Mac OSX users that the path to use in this case is <code>/Library/Java/Home</code> . <strong>Caveat:</strong> We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum Java requirements, the two will inevitably not match on some systems. Please see <a href="http://developer.apple.com/java/faq">Java on Mac OSX FAQ</a> for information as it becomes available.</p>
-<p>USAGE
-Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>
- [OPTIONS]
-  -version          print FOP version and exit
-  -d                debug mode
-  -x                dump configuration settings
-  -q                quiet mode
-  -c cfg.xml        use additional configuration file cfg.xml
-  -l lang           the language to use for user information
-  -r                relaxed/less strict validation (where available)
-  -dpi xxx          target resolution in dots per inch (dpi) where xxx is a number
-  -s                for area tree XML, down to block areas only
-  -v                run in verbose mode (currently simply print FOP version and continue)</p>
-<p>-o [password]     PDF file will be encrypted with option owner password
-  -u [password]     PDF file will be encrypted with option user password
-  -noprint          PDF file will be encrypted without printing permission
-  -nocopy           PDF file will be encrypted without copy content permission
-  -noedit           PDF file will be encrypted without edit content permission
-  -noannotations    PDF file will be encrypted without edit annotation permission
-  -a                enables accessibility features (Tagged PDF etc., default off)
-  -pdfprofile prof  PDF file will be generated with the specified profile
-                    (Examples for prof: PDF/A-1b or PDF/X-3:2003)</p>
-<p>-conserve         Enable memory-conservation policy (trades memory-consumption for disk I/O)
-                    (Note: currently only influences whether the area tree is serialized.)</p>
-<p>[INPUT]
-  infile            xsl:fo input file (the same as the next)
-                    (use '-' for infile to pipe input from stdin)
-  -fo  infile       xsl:fo input file
-  -xml infile       xml input file, must be used together with -xsl
-  -atin infile      area tree input file
-  -ifin infile      intermediate format input file
-  -imagein infile   image input file (piping through stdin not supported)
-  -xsl stylesheet   xslt stylesheet</p>
-<p>-param name value <value> to use for parameter <name> in xslt stylesheet
-                    (repeat '-param name value' for each parameter)</p>
-<p>-catalog          use catalog resolver for input XML and XSLT files
- [OUTPUT]
-  outfile           input will be rendered as PDF into outfile
-                    (use '-' for outfile to pipe output to stdout)
-  -pdf outfile      input will be rendered as PDF (outfile req'd)
-  -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF
-                    (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b")
-  -awt              input will be displayed on screen
-  -rtf outfile      input will be rendered as RTF (outfile req'd)
-  -pcl outfile      input will be rendered as PCL (outfile req'd)
-  -ps outfile       input will be rendered as PostScript (outfile req'd)
-  -afp outfile      input will be rendered as AFP (outfile req'd)
-  -tiff outfile     input will be rendered as TIFF (outfile req'd)
-  -png outfile      input will be rendered as PNG (outfile req'd)
-  -txt outfile      input will be rendered as plain text (outfile req'd)
-  -at [mime] out    representation of area tree as XML (outfile req'd)
-                    specify optional mime output to allow the AT to be converted
-                    to final format later
-  -if [mime] out    representation of document in intermediate format XML (outfile req'd)
-                    specify optional mime output to allow the IF to be converted
-                    to final format later
-  -print            input file will be rendered and sent to the printer
-                    see options with "-print help"
-  -out mime outfile input will be rendered using the given MIME type
-                    (outfile req'd) Example: "-out application/pdf D:\out.pdf"
-                    (Tip: "-out list" prints the list of supported MIME types)
-  -svg outfile      input will be rendered as an SVG slides file (outfile req'd)
-                    Experimental feature - requires additional fop-sandbox.jar.</p>
-<p>-foout outfile    input will only be XSL transformed. The intermediate
-                    XSL-FO file is saved and no rendering is performed.
-                    (Only available if you use -xml and -xsl parameters)</p>
-<p>[Examples]
-  fop foo.fo foo.pdf
-  fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
-  fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
-  fop -xml foo.xml -xsl foo.xsl -foout foo.fo
-  fop -xml - -xsl foo.xsl -pdf -
-  fop foo.fo -mif foo.mif
-  fop foo.fo -rtf foo.rtf
-  fop foo.fo -print
-  fop foo.fo -awt
-PDF encryption is only available if FOP was compiled with encryption support <strong>and</strong> if compatible encryption support is available at run time. Currently, only the JCE is supported. Check the <a href="pdfencryption.html">Details</a> .</p>
-<h3 id="writing-your-own-script-wzxhzdk16wzxhzdk17">Writing your own script <a id="your-own-script"></a></h3>
+<div class="codehilite"><pre><span class="n">USAGE</span>
+<span class="n">Fop</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">fo</span><span class="o">|-</span><span class="n">xml</span><span class="p">]</span> <span class="n">infile</span> <span class="p">[</span><span class="o">-</span><span class="n">xsl</span> <span class="n">file</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">awt</span><span class="o">|-</span><span class="n">pdf</span><span class="o">|-</span><span class="n">mif</span><span class="o">|-</span><span class="n">rtf</span><span class="o">|-</span><span class="n">tiff</span><span class="o">|-</span><span class="n">png</span><span class="o">|-</span><span class="n">pcl</span><span class="o">|-</span><span class="n">ps</span><span class="o">|-</span><span class="n">txt</span><span class="o">|-</span><span class="n">at</span> <span class="p">[</span><span class="n">mime
 </span><span class="p">]</span><span class="o">|-</span><span class="k">print</span><span class="p">]</span> <span class="sr">&lt;outfile&gt;</span>
+ <span class="p">[</span><span class="n">OPTIONS</span><span class="p">]</span>
+  <span class="o">-</span><span class="n">version</span>          <span class="k">print</span> <span class="n">FOP</span> <span class="n">version</span> <span class="ow">and</span> <span class="nb">exit</span>
+  <span class="o">-</span><span class="n">d</span>                <span class="n">debug</span> <span class="n">mode</span>
+  <span class="o">-</span><span class="n">x</span>                <span class="nb">dump</span> <span class="n">configuration</span> <span class="n">settings</span>
+  <span class="o">-</span><span class="sx">q  </span>              <span class="n">quiet</span> <span class="n">mode</span>
+  <span class="o">-</span><span class="n">c</span> <span class="n">cfg</span><span class="o">.</span><span class="n">xml</span>        <span class="k">use</span> <span class="n">additional</span> <span class="n">configuration</span> <span class="n">file</span> <span class="n">cfg</span><span class="o">.</span><span class="n">xml</span>
+  <span class="o">-</span><span class="n">l</span> <span class="n">lang</span>           <span class="n">the</span> <span class="n">language</span> <span class="n">to</span> <span class="k">use</span> <span class="k">for</span> <span class="n">user</span> <span class="n">information</span>
+  <span class="o">-</span><span class="n">r</span>                <span class="n">relaxed</span><span class="o">/</span><span class="n">less</span> <span class="n">strict</span> <span class="n">validation</span> <span class="p">(</span><span class="n">where</span> <span class="n">available</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">dpi</span> <span class="n">xxx</span>          <span class="n">target</span> <span class="n">resolution</span> <span class="n">in</span> <span class="n">dots</span> <span class="n">per</span> <span class="n">inch</span> <span class="p">(</span><span class="n">dpi</span><span class="p">)</span> <span class="n">where</span> <span class="n">xxx</span> <span class="n">is</span> <span class="n">a</span> <span class="n">number</span>
+  <span class="o">-</span><span class="n">s</span>                <span class="k">for</span> <span class="n">area</span> <span class="n">tree</span> <span class="n">XML</span><span class="p">,</span> <span class="n">down</span> <span class="n">to</span> <span class="n">block</span> <span class="n">areas</span> <span class="n">only</span>
+  <span class="o">-</span><span class="n">v</span>                <span class="n">run</span> <span class="n">in</span> <span class="n">verbose</span> <span class="n">mode</span> <span class="p">(</span><span class="n">currently</span> <span class="n">simply</span> <span class="k">print</span> <span class="n">FOP</span> <span class="n">version</span> <span class="ow">and</span> <span class="k">continue</span><span class="p">)</span>
+
+  <span class="o">-</span><span class="n">o</span> <span class="p">[</span><span class="n">password</span><span class="p">]</span>     <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">with</span> <span class="n">option</span> <span class="n">owner</span> <span class="n">password</span>
+  <span class="o">-</span><span class="n">u</span> <span class="p">[</span><span class="n">password</span><span class="p">]</span>     <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">with</span> <span class="n">option</span> <span class="n">user</span> <span class="n">password</span>
+  <span class="o">-</span><span class="n">noprint</span>          <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">without</span> <span class="n">printing</span> <span class="n">permission</span>
+  <span class="o">-</span><span class="n">nocopy</span>           <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">without</span> <span class="n">copy</span> <span class="n">content</span> <span class="n">permission</span>
+  <span class="o">-</span><span class="n">noedit</span>           <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">without</span> <span class="n">edit</span> <span class="n">content</span> <span class="n">permission</span>
+  <span class="o">-</span><span class="n">noannotations</span>    <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">encrypted</span> <span class="n">without</span> <span class="n">edit</span> <span class="n">annotation</span> <span class="n">permission</span>
+  <span class="o">-</span><span class="n">a</span>                <span class="n">enables</span> <span class="n">accessibility</span> <span class="n">features</span> <span class="p">(</span><span class="n">Tagged</span> <span class="n">PDF</span> <span class="n">etc</span><span class="o">.</span><span class="p">,</span> <span class="n">default</span> <span class="n">off</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">pdfprofile</span> <span class="n">prof</span>  <span class="n">PDF</span> <span class="n">file</span> <span class="n">will</span> <span class="n">be</span> <span class="n">generated</span> <span class="n">with</span> <span class="n">the</span> <span class="n">specified</span> <span class="n">profile</span>
+                    <span class="p">(</span><span class="n">Examples</span> <span class="k">for</span> <span class="n">prof:</span> <span class="n">PDF</span><span class="sr">/A-1b or PDF/</span><span class="n">X</span><span class="o">-</span><span class="mi">3</span><span class="p">:</span><span class="mi">2003</span><span class="p">)</span>
+
+  <span class="o">-</span><span class="n">conserve</span>         <span class="n">Enable</span> <span class="n">memory</span><span class="o">-</span><span class="n">conservation</span> <span class="n">policy</span> <span class="p">(</span><span class="n">trades</span> <span class="n">memory</span><span class="o">-</span><span class="n">consumption</span> <span class="k">for</span> <span class="n">disk</span> <span class="n">I</span><span class="o">/</span><span class="n">O</span><span class="p">)</span>
+                    <span class="p">(</span><span class="n">Note:</span> <span class="n">currently</span> <span class="n">only</span> <span class="n">influences</span> <span class="n">whether</span> <span class="n">the</span> <span class="n">area</span> <span class="n">tree</span> <span class="n">is</span> <span class="n">serialized</span><span class="o">.</span><span class="p">)</span>
+ <span class="p">[</span><span class="n">INPUT</span><span class="p">]</span>
+  <span class="n">infile</span>            <span class="n">xsl:fo</span> <span class="n">input</span> <span class="n">file</span> <span class="p">(</span><span class="n">the</span> <span class="n">same</span> <span class="n">as</span> <span class="n">the</span> <span class="k">next</span><span class="p">)</span>
+                    <span class="p">(</span><span class="k">use</span> <span class="s">&#39;-&#39;</span> <span class="k">for</span> <span class="n">infile</span> <span class="n">to</span> <span class="nb">pipe</span> <span class="n">input</span> <span class="n">from</span> <span class="n">stdin</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">fo</span>  <span class="n">infile</span>       <span class="n">xsl:fo</span> <span class="n">input</span> <span class="n">file</span>
+  <span class="o">-</span><span class="n">xml</span> <span class="n">infile</span>       <span class="n">xml</span> <span class="n">input</span> <span class="n">file</span><span class="p">,</span> <span class="n">must</span> <span class="n">be</span> <span class="n">used</span> <span class="n">together</span> <span class="n">with</span> <span class="o">-</span><span class="n">xsl</span>
+  <span class="o">-</span><span class="n">atin</span> <span class="n">infile</span>      <span class="n">area</span> <span class="n">tree</span> <span class="n">input</span> <span class="n">file</span>
+  <span class="o">-</span><span class="n">ifin</span> <span class="n">infile</span>      <span class="n">intermediate</span> <span class="nb">format</span> <span class="n">input</span> <span class="n">file</span>
+  <span class="o">-</span><span class="n">imagein</span> <span class="n">infile</span>   <span class="n">image</span> <span class="n">input</span> <span class="n">file</span> <span class="p">(</span><span class="n">piping</span> <span class="n">through</span> <span class="n">stdin</span> <span class="ow">not</span> <span class="n">supported</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">xsl</span> <span class="n">stylesheet</span>   <span class="n">xslt</span> <span class="n">stylesheet</span>
+
+  <span class="o">-</span><span class="n">param</span> <span class="n">name</span> <span class="n">value</span> <span class="sr">&lt;value&gt;</span> <span class="n">to</span> <span class="k">use</span> <span class="k">for</span> <span class="n">parameter</span> <span class="sr">&lt;name&gt;</span> <span class="n">in</span> <span class="n">xslt</span> <span class="n">stylesheet</span>
+                    <span class="p">(</span><span class="n">repeat</span> <span class="s">&#39;-param name value&#39;</span> <span class="k">for</span> <span class="nb">each</span> <span class="n">parameter</span><span class="p">)</span>
+
+  <span class="o">-</span><span class="n">catalog</span>          <span class="k">use</span> <span class="n">catalog</span> <span class="n">resolver</span> <span class="k">for</span> <span class="n">input</span> <span class="n">XML</span> <span class="ow">and</span> <span class="n">XSLT</span> <span class="n">files</span>
+ <span class="p">[</span><span class="n">OUTPUT</span><span class="p">]</span>
+  <span class="n">outfile</span>           <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">PDF</span> <span class="n">into</span> <span class="n">outfile</span>
+                    <span class="p">(</span><span class="k">use</span> <span class="s">&#39;-&#39;</span> <span class="k">for</span> <span class="n">outfile</span> <span class="n">to</span> <span class="nb">pipe</span> <span class="n">output</span> <span class="n">to</span> <span class="n">stdout</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">pdf</span> <span class="n">outfile</span>      <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">PDF</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">  -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF</span>
+<span class="s">                    (outfile req&#39;</span><span class="n">d</span><span class="p">,</span> <span class="n">same</span> <span class="n">as</span> <span class="s">&quot;-pdf outfile -pdfprofile PDF/A-1b&quot;</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">awt</span>              <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">displayed</span> <span class="n">on</span> <span class="n">screen</span>
+  <span class="o">-</span><span class="n">rtf</span> <span class="n">outfile</span>      <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">RTF</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">  -pcl outfile      input will be rendered as PCL (outfile req&#39;</span><span class="n">d</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">ps</span> <span class="n">outfile</span>       <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">PostScript</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">  -afp outfile      input will be rendered as AFP (outfile req&#39;</span><span class="n">d</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">tiff</span> <span class="n">outfile</span>     <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">TIFF</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">  -png outfile      input will be rendered as PNG (outfile req&#39;</span><span class="n">d</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">txt</span> <span class="n">outfile</span>      <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">plain</span> <span class="n">text</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">  -at [mime] out    representation of area tree as XML (outfile req&#39;</span><span class="n">d</span><span class="p">)</span>
+                    <span class="n">specify</span> <span class="n">optional</span> <span class="n">mime</span> <span class="n">output</span> <span class="n">to</span> <span class="n">allow</span> <span class="n">the</span> <span class="n">AT</span> <span class="n">to</span> <span class="n">be</span> <span class="n">converted</span>
+                    <span class="n">to</span> <span class="n">final</span> <span class="nb">format</span> <span class="n">later</span>
+  <span class="o">-</span><span class="k">if</span> <span class="p">[</span><span class="n">mime</span><span class="p">]</span> <span class="n">out</span>    <span class="n">representation</span> <span class="n">of</span> <span class="n">document</span> <span class="n">in</span> <span class="n">intermediate</span> <span class="nb">format</span> <span class="n">XML</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="s">&#39;d)</span>
+<span class="s">                    specify optional mime output to allow the IF to be converted</span>
+<span class="s">                    to final format later</span>
+<span class="s">  -print            input file will be rendered and sent to the printer</span>
+<span class="s">                    see options with &quot;-print help&quot;</span>
+<span class="s">  -out mime outfile input will be rendered using the given MIME type</span>
+<span class="s">                    (outfile req&#39;</span><span class="n">d</span><span class="p">)</span> <span class="n">Example:</span> <span class="s">&quot;-out application/pdf D:\out.pdf&quot;</span>
+                    <span class="p">(</span><span class="n">Tip:</span> <span class="s">&quot;-out list&quot;</span> <span class="n">prints</span> <span class="n">the</span> <span class="n">list</span> <span class="n">of</span> <span class="n">supported</span> <span class="n">MIME</span> <span class="n">types</span><span class="p">)</span>
+  <span class="o">-</span><span class="n">svg</span> <span class="n">outfile</span>      <span class="n">input</span> <span class="n">will</span> <span class="n">be</span> <span class="n">rendered</span> <span class="n">as</span> <span class="n">an</span> <span class="n">SVG</span> <span class="n">slides</span> <span class="n">file</span> <span class="p">(</span><span class="n">outfile</span> <span class="n">req</span><span class="err">&#39;</span><span class="n">d</span><span class="p">)</span>
+                    <span class="n">Experimental</span> <span class="n">feature</span> <span class="o">-</span> <span class="n">requires</span> <span class="n">additional</span> <span class="n">fop</span><span class="o">-</span><span class="n">sandbox</span><span class="o">.</span><span class="n">jar</span><span class="o">.</span>
+
+  <span class="o">-</span><span class="n">foout</span> <span class="n">outfile</span>    <span class="n">input</span> <span class="n">will</span> <span class="n">only</span> <span class="n">be</span> <span class="n">XSL</span> <span class="n">transformed</span><span class="o">.</span> <span class="n">The</span> <span class="n">intermediate</span>
+                    <span class="n">XSL</span><span class="o">-</span><span class="n">FO</span> <span class="n">file</span> <span class="n">is</span> <span class="n">saved</span> <span class="ow">and</span> <span class="nb">no</span> <span class="n">rendering</span> <span class="n">is</span> <span class="n">performed</span><span class="o">.</span>
+                    <span class="p">(</span><span class="n">Only</span> <span class="n">available</span> <span class="k">if</span> <span class="n">you</span> <span class="k">use</span> <span class="o">-</span><span class="n">xml</span> <span class="ow">and</span> <span class="o">-</span><span class="n">xsl</span> <span class="n">parameters</span><span class="p">)</span>
+
+ <span class="p">[</span><span class="n">Examples</span><span class="p">]</span>
+  <span class="n">fop</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="n">foo</span><span class="o">.</span><span class="n">pdf</span>
+  <span class="n">fop</span> <span class="o">-</span><span class="n">fo</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="o">-</span><span class="n">pdf</span> <span class="n">foo</span><span class="o">.</span><span class="n">pdf</span> <span class="p">(</span><span class="n">does</span> <span class="n">the</span> <span class="n">same</span> <span class="n">as</span> <span class="n">the</span> <span class="n">previous</span> <span class="n">line</span><span class="p">)</span>
+  <span class="n">fop</span> <span class="o">-</span><span class="n">xml</span> <span class="n">foo</span><span class="o">.</span><span class="n">xml</span> <span class="o">-</span><span class="n">xsl</span> <span class="n">foo</span><span class="o">.</span><span class="n">xsl</span> <span class="o">-</span><span class="n">pdf</span> <span class="n">foo</span><span class="o">.</span><span class="n">pdf</span>
+  <span class="n">fop</span> <span class="o">-</span><span class="n">xml</span> <span class="n">foo</span><span class="o">.</span><span class="n">xml</span> <span class="o">-</span><span class="n">xsl</span> <span class="n">foo</span><span class="o">.</span><span class="n">xsl</span> <span class="o">-</span><span class="n">foout</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span>
+  <span class="n">fop</span> <span class="o">-</span><span class="n">xml</span> <span class="o">-</span> <span class="o">-</span><span class="n">xsl</span> <span class="n">foo</span><span class="o">.</span><span class="n">xsl</span> <span class="o">-</span><span class="n">pdf</span> <span class="o">-</span>
+  <span class="n">fop</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="o">-</span><span class="n">mif</span> <span class="n">foo</span><span class="o">.</span><span class="n">mif</span>
+  <span class="n">fop</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="o">-</span><span class="n">rtf</span> <span class="n">foo</span><span class="o">.</span><span class="n">rtf</span>
+  <span class="n">fop</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="o">-</span><span class="k">print</span>
+  <span class="n">fop</span> <span class="n">foo</span><span class="o">.</span><span class="n">fo</span> <span class="o">-</span><span class="n">awt</span>
+</pre></div>
+
+
+<p>PDF encryption is only available if FOP was compiled with encryption support <strong>and</strong> if compatible encryption support is available at run time. Currently, only the JCE is supported. Check the <a href="pdfencryption.html">Details</a> .</p>
+<h3 id="writing-your-own-script-wzxhzdk14wzxhzdk15">Writing your own script <a id="your-own-script"></a></h3>
 <p>FOP's entry point for your own scripts is the class <code>org.apache.fop.cli.Main</code> . The general pattern for the command line is: <code>java -classpath &lt;CLASSPATH&gt;
         org.apache.fop.cli.Main &lt;arguments&gt;</code> . The arguments consist of the options and infile and outfile specifications as shown above for the standard scripts. You may wish to review the standard scripts to make sure that you get your environment properly configured.</p>
-<h3 id="running-with-javas-jar-option-wzxhzdk18wzxhzdk19">Running with java's -jar option <a id="jar-option"></a></h3>
+<h3 id="running-with-javas-jar-option-wzxhzdk16wzxhzdk17">Running with java's -jar option <a id="jar-option"></a></h3>
 <p>As an alternative to the start scripts you can run <code>java
         -jar path/to/build/fop.jar &lt;arguments&gt;</code> , relying on FOP to build the classpath for running FOP dynamically, see <a href="#dynamical-classpath">below</a> . If you use hyphenation, you must put <code>fop-hyph.jar</code> in the <code>lib</code> directory.</p>
 <p>You can also run <code>java -jar path/to/fop.jar
       &lt;arguments&gt;</code> , relying on the <code>Class-Path</code> entry in the manifest file. This works if you put <code>fop.jar</code> and all jar files from the <code>lib</code> directory in a single directory. If you use hyphenation, you must also put <code>fop-hyph.jar</code> in that directory.</p>
 <p>In both cases the arguments consist of the options and infile and outfile specifications as shown above for the standard scripts.</p>
-<h3 id="fops-dynamical-classpath-construction-wzxhzdk20wzxhzdk21">FOP's dynamical classpath construction <a id="dynamical-classpath"></a></h3>
+<h3 id="fops-dynamical-classpath-construction-wzxhzdk18wzxhzdk19">FOP's dynamical classpath construction <a id="dynamical-classpath"></a></h3>
 <p>If FOP is started without a proper classpath, it tries to add its dependencies dynamically. If the system property <code>fop.home</code> contains the name of a directory, then FOP uses that directory as the base directory for its search. Otherwise the current working directory is the base directory. If the base directory is called <code>build</code> , then its parent directory becomes the base directory.</p>
 <p>FOP expects to find <code>fop.jar</code> in the <code>build</code> subdirectory of the base directory, and adds it to the classpath. Subsequently FOP adds all <code>jar</code> files in the lib directory to the classpath. The lib directory is either the <code>lib</code> subdirectory of the base directory, or, if that does not exist, the base directory itself.</p>
 <p>If the system property <code>fop.optional.lib</code> contains the name of a directory, then all <code>jar</code> files in that directory are also added to the classpath. See the methods <code>getJARList</code> and <code>checkDependencies</code> in <code>org.apache.fop.cli.Main</code> .</p>
-<h2 id="using-xalan-to-check-xsl-fo-input-wzxhzdk22wzxhzdk23">Using Xalan to Check XSL-FO Input <a id="check-input"></a></h2>
+<h2 id="using-xalan-to-check-xsl-fo-input-wzxhzdk20wzxhzdk21">Using Xalan to Check XSL-FO Input <a id="check-input"></a></h2>
 <p>FOP sessions that use -xml and -xsl input instead of -fo input are actually controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting the XSL-FO to PDF (or another FOP output format). Although FOP controls both of these processes, the first is included merely as a convenience and for performance reasons. Only the second is part of FOP's core processing. If a user has a problem running FOP, it is important to determine which of these two processes is causing the problem. If the problem is in the first process, the user's stylesheet is likely the cause. The FOP development team does not have resources to help with stylesheet issues, although we have included links to some useful <a href="../resources.html#specs">Specifications</a> and <a href="../resources.html#articles">Books/Articles</a> . If the problem is in the second process, FOP may have a bug or an unimplemented feature that does require attention from the FOP development team.
 The user is always responsible to provide correct XSL-FO code to FOP.
 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)
@@ -491,7 +500,7 @@ When asking for help on the FOP mailing 
 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>Note that there are some subtle differences between the FOP and Xalan command-lines.</p>
-<h2 id="memory-usage-wzxhzdk24wzxhzdk25">Memory Usage <a id="memory"></a></h2>
+<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>
 <p>If you are running out of memory when using FOP, here are some ideas that may help:</p>
 <ul>
@@ -508,7 +517,7 @@ The -foout option works the same way as 
 <p>Use multiple page sequences. FOP starts rendering after the end of a page sequence is encountered. While the actual rendering is done page-by-page, some additional memory is freed after the page sequence has been rendered. This can be substantial if the page sequence contains lots of FO elements.</p>
 </li>
 </ul>
-<h2 id="problems-wzxhzdk26wzxhzdk27">Problems <a id="problems"></a></h2>
+<h2 id="problems-wzxhzdk24wzxhzdk25">Problems <a id="problems"></a></h2>
 <p>If you have problems running FOP, please see the <a href="../gethelp.html">"How to get Help" page</a> .</p></div>
       </div>
       

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

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.1/accessibility.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.1/accessibility.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.1/accessibility.html Mon Dec  3 15:47:41 2012
@@ -341,29 +341,20 @@ $(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/1.1/">1.1</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk0-fop-accessibility">Apache&trade; FOP: Accessibility</h1>
-<h2 id="overview-wzxhzdk1wzxhzdk2">Overview <a id="overview"></a></h2>
+      	<div class="section-content"><h1 id="apachewzxhzdk1-fop-accessibility">Apache&trade; FOP: Accessibility</h1>
+<h2 id="overview-wzxhzdk2wzxhzdk3">Overview <a id="overview"></a></h2>
 <p>This page describes the <a href="http://en.wikipedia.org/wiki/Accessibility">accessibility</a> features of Apache&trade; FOP. <a href="http://www.section508.gov/">Section 508</a> defines accessibility in the context of electronic documents for the USA but other countries have similar requirements.</p>
 <p>Accessibility features are available only for the PDF output format and there are some implementation limitations. Also, certain actions must be undertaken by the content creator to ensure that FOP can create a truly accessible document.</p>
-<h2 id="enabling-accessibility-wzxhzdk4wzxhzdk5">Enabling accessibility <a id="Enabling+accessibility"></a></h2>
+<h2 id="enabling-accessibility-wzxhzdk5wzxhzdk6">Enabling accessibility <a id="Enabling+accessibility"></a></h2>
 <p>There are 3 ways to enable accessibility:</p>
 <ol>
-<li>
-<p><strong>Command line:</strong> The command line option -a turns on accessibility: <code>fop -a -fo mydocument.fo -pdf mydocument.pdf</code> </p>
-</li>
-<li>
-<p><strong>Embedding:</strong>  <code>userAgent.setAccessibility(true);</code> </p>
-</li>
-<li>
-<p><strong>Optional setting in fop.xconf file:</strong>  <code>&lt;fop version="1.0"&gt;
-              &lt;accessibility&gt;true&lt;/accessibility&gt;
-              ...
-          &lt;/fop&gt;</code> </p>
-</li>
+<li><strong>Command line:</strong> The command line option -a turns on accessibility:<br/><code>fop -a -fo mydocument.fo -pdf mydocument.pdf</code><br/></li>
+<li><strong>Embedding:</strong><br/><code>userAgent.setAccessibility(true);</code> <br/> </li>
+<li><strong>Optional setting in fop.xconf file:</strong><br/><code>&lt;fop version="1.0"&gt;</code><br/><code>&lt;accessibility&gt;true&lt;/accessibility&gt;</code><br/><code>...</code><br/><code>&lt;/fop&gt;</code></li>
 </ol>
 <p>When accessibility is enabled, additional information relating to the logical structure of the document is added to the PDF. That information allows the PDF viewer (or a text-to-speech application) to retrieve the natural reading order of the document.
 The processing of the logical structure is memory-hungry. You may need to adjust the Java heap size in order to process larger files.</p>
-<h1 id="changes-to-your-xsl-fo-input-files-wzxhzdk6wzxhzdk7">Changes to your XSL-FO input files <a id="source"></a></h1>
+<h2 id="changes-to-your-xsl-fo-input-files-wzxhzdk7wzxhzdk8">Changes to your XSL-FO input files <a id="source"></a></h2>
 <p>Apache FOP cannot automatically generate accessible PDFs. Some of the work can only be performed by the content provider. Following are some changes that may be necessary to your XSL-FO content in order to generate really accessible documents:</p>
 <ul>
 <li>
@@ -379,18 +370,21 @@ The processing of the logical structure 
 <p>Specify the natural language of the document using the language and country properties (or via the <code>xml:lang</code> shorthand property).</p>
 </li>
 </ul>
-<h2 id="customized-tagging-wzxhzdk8wzxhzdk9">Customized Tagging <a id="customTags"></a></h2>
+<h2 id="customized-tagging-wzxhzdk9wzxhzdk10">Customized Tagging <a id="customTags"></a></h2>
 <p>The <a href="#PDFReference">PDF Reference</a> defines a set of standard Structure Types to tag content. For example, ‘P’ is used for identifying paragraphs, ‘H1’ to ‘H6’ for headers, ‘L’ for lists, ‘Div’ for block-level groups of elements, etc. This standard set is aimed at improving interoperability between applications producing or consuming PDF.</p>
 <p>FOP provides a default mapping of Formatting Objects to elements from that standard set. For example, <code>fo:page-sequence</code> is mapped to ‘Part’, <code>fo:block</code> is mapped to ‘P’, <code>fo:list-block</code> to ‘L’, etc.</p>
-<p>You may want to customize that mapping to improve the accuracy of the tagging or deal with particular FO constructs. For example, you may want to make use of the ‘H1’ to ‘H6’ tags to make the hierarchical structure of the document appear in the PDF. This is achieved by using the <code>role</code> XSL-FO property:
-...
-<fo:block role="H1" font-weight="bold">I. A Level 1 Heading</fo:block>
-<fo:block>This is the first paragraph of the first section...</fo:block>
+<p>You may want to customize that mapping to improve the accuracy of the tagging or deal with particular FO constructs. For example, you may want to make use of the ‘H1’ to ‘H6’ tags to make the hierarchical structure of the document appear in the PDF. This is achieved by using the <code>role</code> XSL-FO property:</p>
+<div class="codehilite"><pre>...
+<span class="nt">&lt;fo:block</span> <span class="na">role=</span><span class="s">&quot;H1&quot;</span> <span class="na">font-weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">&gt;</span>I. A Level 1 Heading<span class="nt">&lt;/fo:block&gt;</span>
+<span class="nt">&lt;fo:block&gt;</span>This is the first paragraph of the first section...<span class="nt">&lt;/fo:block&gt;</span>
 ...
-If a non-standard structure type is specified, FOP will issue a warning and fall back to the default tag associated to the Formatting Object.</p>
-<h2 id="testing-wzxhzdk14wzxhzdk15">Testing <a id="testing"></a></h2>
+</pre></div>
+
+
+<p>If a non-standard structure type is specified, FOP will issue a warning and fall back to the default tag associated to the Formatting Object.</p>
+<h2 id="testing-wzxhzdk11wzxhzdk12">Testing <a id="testing"></a></h2>
 <p>Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its Accessibility Check feature creates a report indicating any deficiencies with a PDF document. Alternatively, you can just let a screen reader read the document aloud.</p>
-<h2 id="limitations-wzxhzdk16wzxhzdk17">Limitations <a id="limitations"></a></h2>
+<h2 id="limitations-wzxhzdk13wzxhzdk14">Limitations <a id="limitations"></a></h2>
 <p>Accessibility support in Apache FOP is relatively new, so there are certain limitations. Please help us identify and close any gaps.</p>
 <ul>
 <li>
@@ -406,7 +400,7 @@ If a non-standard structure type is spec
 <p>The side regions (region-before, region-after etc.) are currently not specially identified. Screen readers may read their content at page changes.</p>
 </li>
 </ul>
-<h2 id="related-links-wzxhzdk18wzxhzdk19">Related Links <a id="links"></a></h2>
+<h2 id="related-links-wzxhzdk15wzxhzdk16">Related Links <a id="links"></a></h2>
 <p>Many resources providing guidance about creating accessible documents can be found on the web. Here are a few links, along with additional resources around the topic:</p>
 <ul>
 <li>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.1/anttask.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.1/anttask.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.1/anttask.html Mon Dec  3 15:47:41 2012
@@ -341,92 +341,172 @@ $(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/1.1/">1.1</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk1-fop-ant-task">Apache&trade; FOP: Ant task</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk5-fop-ant-task">Apache&trade; FOP: Ant task</h1>
 <p>Apache&trade; FOP provides an Ant task for automating the document build process.</p>
-<h2 id="description-wzxhzdk3wzxhzdk4">Description <a id="basics"></a></h2>
+<h2 id="description-wzxhzdk7wzxhzdk8">Description <a id="basics"></a></h2>
 <p>The FOP Ant task will convert XSL-FO documents to PDF, PS, PCL etc. output (see <a href="output.html">Output formats</a> for available formats).</p>
 <p>To call FOP tasks within Ant, first add a FOP task definition to your Ant build file. One method of defining the task is as follows:</p>
-<property name="fop.home" value="....path to your FOP HOME directory..."/>
+<div class="codehilite"><pre><span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;fop.home&quot;</span> <span class="na">value=</span><span class="s">&quot;....path to your FOP HOME directory...&quot;/</span><span class="nt">&gt;</span>
 
-<taskdef name="fop" 
-         classname="org.apache.fop.tools.anttasks.Fop">
-  <classpath>
-    <fileset dir="${fop.home}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${fop.home}/build">
-      <include name="fop.jar"/>
-      <include name="fop-hyph.jar" />
-    </fileset>
-  </classpath>
-</taskdef>
-
-Then create FOP tasks within your Ant build file, using the FOP task parameters listed below.
-
-## Parameters for FOP Ant task <a id="parameters"></a>
-
-<caption>Parameters specified as attributes</caption>| Attribute | Description | Required |
-|-----------|-------------|----------|
-| fofile | XSL-FO file to be rendered | Yes, if no fileset nested element is used |
-| xmlfile | XML input file | Yes, if no fofile is specified |
-| xsltfile | XSLT input file | Yes, if no fofile is specified |
-| outfile | Output filename | Yes, when fofile is used. (This attribute is not valid for filesets.) |
-| format | Possible output formats:<br></br> `application/X-fop-awt-preview` <br></br> `application/X-fop-print` <br></br> `application/X-fop-areatree` <br></br> `application/pdf` <br></br> `application/postscript` <br></br> `application/mif` <br></br> `application/rtf` , `text/richtext` , `text/rtf` <br></br> `application/x-pcl` , `application/vnd.hp-PCL` <br></br> `application/x-afp` , `application/vnd.ibm.modcap` <br></br> `text/plain` <br></br> `image/svg+xml` <br></br> `image/gif` <br></br> `image/png` <br></br> `image/tiff` <br></br> | No, defaults to `application/pdf`  |
-| outdir | Output directory | Required if a fileset is used to specify the files to render; optional for fofile. (Can alternatively specify the full path in the fofile value.) |
-| force | Recreate target files, even if they are newer than their corresponding source files. Note: This attribute is available in post-0.20.5 versions (0.20.x nightly build and 1.0dev) only; target files are always generated (i.e., force=true) in 0.20.5 release. | No, default is `false`  |
-| basedir | Base directory to resolve relative references (e.g., graphics files) within the FO document. | No, for single FO File entry, default is to use the location of that FO file. |
-| relativebase | For fileset usage only. A value of `true` specifies using the location of each .fo file as the base directory for resolving relative file references located within that .fo file. A value of `false` specifies using the value of basedir for all files within the fileset, or just the current working directory if basedir is not specified. | No, default is `false` . |
-| userconfig | User configuration file (same as the FOP "-c" command line option). | No |
-| messagelevel | Logging level<br></br>Possible values: `error` , `warn` , `info` , `verbose` , `debug` . **Currently doesn't work in FOP Trunk!!!**  | No, defaults to `verbose`  |
-| logFiles | Controls whether the names of the files that are processed are logged ( `true` ) or not ( `false` ). **Currently doesn't work in FOP Trunk!!!**  | No, default is `true`  |
-| throwexceptions | Controls whether or not an exception is thrown if an error occurs during rendering. | Default is `true`  |
-
-<caption>Parameters specified as nested elements</caption>| Attribute | Description | Required |
-|-----------|-------------|----------|
-| fileset |  [FileSets](http://ant.apache.org/manual/CoreTypes/fileset.html) are used to specify multiple XSL-FO files to be rendered. | Yes, if no fofile attribute is supplied |
-
-## Examples <a id="examples"></a>
-
-The following example converts a single XSL-FO file to a PDF document:
-
-    <target name="generate-pdf" description="Generates a single PDF file">
-       <fop format="application/pdf" 
-            fofile="c:\working\foDirectory\foDocument.fo"
-            outfile="c:\working\pdfDirectory\pdfDocument.pdf" />
-    </target>
-
-This example converts all XSL-FO files within an entire directory to PostScript:
-
-    <target name="generate-multiple-ps" 
-            description="Generates multiple PostScript files">
-       <fop format="application/postscript" 
-            outdir="${build.dir}" messagelevel="debug">
-            <fileset dir="${fo.examples.dir}">
-               <include name="*.fo"/>
-            </fileset>
-       </fop>
-    </target>
-
-The following example transforms and converts a single XML and XSLT file to an AFP document:
-
-    <target name="generate-afp-from-transform" description="Generates a single AFP file from an XSLT stylesheet">
-       <fop format="application/x-afp" 
-            xmlfile="c:\working\foDirectory\Document.xml"
-            xsltfile="c:\working\foDirectory\Document.xslt"
-            outfile="c:\working\afpDirectory\Document.afp" />
-    </target>
-
-This example transforms and converts all XML files within an entire directory to PostScript:
-
-    <target name="generate-multiple-ps-from-transform" description="Generates multiple PostScript files using an XSLT stylesheet">
-       <fop format="application/postscript" 
-            xsltfile="c:\working\foDirectory\Document.xslt"
-            outdir="${build.dir}" messagelevel="debug">
-            <fileset dir="${test.dir}">
-               <include name="*.xml"/>
-            </fileset>
-       </fop>
-    </target></div>
+<span class="nt">&lt;taskdef</span> <span class="na">name=</span><span class="s">&quot;fop&quot;</span> 
+         <span class="na">classname=</span><span class="s">&quot;org.apache.fop.tools.anttasks.Fop&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;classpath&gt;</span>
+    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fop</span><span class="o">.</span><span class="n">home</span><span class="cp">}</span><span class="s">/lib&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.jar&quot;/</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;/fileset&gt;</span>
+    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fop</span><span class="o">.</span><span class="n">home</span><span class="cp">}</span><span class="s">/build&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;fop.jar&quot;/</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;fop-hyph.jar&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;/fileset&gt;</span>
+  <span class="nt">&lt;/classpath&gt;</span>
+<span class="nt">&lt;/taskdef&gt;</span>
+</pre></div>
+
+
+<p>Then create FOP tasks within your Ant build file, using the FOP task parameters listed below.</p>
+<h2 id="parameters-for-fop-ant-task-wzxhzdk9wzxhzdk10">Parameters for FOP Ant task <a id="parameters"></a></h2>
+<p><caption>Parameters specified as attributes</caption></p>
+<table>
+<thead>
+<tr>
+<th>Attribute</th>
+<th>Description</th>
+<th>Required</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>fofile</td>
+<td>XSL-FO file to be rendered</td>
+<td>Yes, if no fileset nested element is used</td>
+</tr>
+<tr>
+<td>xmlfile</td>
+<td>XML input file</td>
+<td>Yes, if no fofile is specified</td>
+</tr>
+<tr>
+<td>xsltfile</td>
+<td>XSLT input file</td>
+<td>Yes, if no fofile is specified</td>
+</tr>
+<tr>
+<td>outfile</td>
+<td>Output filename</td>
+<td>Yes, when fofile is used. (This attribute is not valid for filesets.)</td>
+</tr>
+<tr>
+<td>format</td>
+<td>Possible output formats:<br></br> <code>application/X-fop-awt-preview</code> <br></br> <code>application/X-fop-print</code> <br></br> <code>application/X-fop-areatree</code> <br></br> <code>application/pdf</code> <br></br> <code>application/postscript</code> <br></br> <code>application/mif</code> <br></br> <code>application/rtf</code> , <code>text/richtext</code> , <code>text/rtf</code> <br></br> <code>application/x-pcl</code> , <code>application/vnd.hp-PCL</code> <br></br> <code>application/x-afp</code> , <code>application/vnd.ibm.modcap</code> <br></br> <code>text/plain</code> <br></br> <code>image/svg+xml</code> <br></br> <code>image/gif</code> <br></br> <code>image/png</code> <br></br> <code>image/tiff</code> <br></br></td>
+<td>No, defaults to <code>application/pdf</code></td>
+</tr>
+<tr>
+<td>outdir</td>
+<td>Output directory</td>
+<td>Required if a fileset is used to specify the files to render; optional for fofile. (Can alternatively specify the full path in the fofile value.)</td>
+</tr>
+<tr>
+<td>force</td>
+<td>Recreate target files, even if they are newer than their corresponding source files. Note: This attribute is available in post-0.20.5 versions (0.20.x nightly build and 1.0dev) only; target files are always generated (i.e., force=true) in 0.20.5 release.</td>
+<td>No, default is <code>false</code></td>
+</tr>
+<tr>
+<td>basedir</td>
+<td>Base directory to resolve relative references (e.g., graphics files) within the FO document.</td>
+<td>No, for single FO File entry, default is to use the location of that FO file.</td>
+</tr>
+<tr>
+<td>relativebase</td>
+<td>For fileset usage only. A value of <code>true</code> specifies using the location of each .fo file as the base directory for resolving relative file references located within that .fo file. A value of <code>false</code> specifies using the value of basedir for all files within the fileset, or just the current working directory if basedir is not specified.</td>
+<td>No, default is <code>false</code> .</td>
+</tr>
+<tr>
+<td>userconfig</td>
+<td>User configuration file (same as the FOP "-c" command line option).</td>
+<td>No</td>
+</tr>
+<tr>
+<td>messagelevel</td>
+<td>Logging level<br></br>Possible values: <code>error</code> , <code>warn</code> , <code>info</code> , <code>verbose</code> , <code>debug</code> . <strong>Currently doesn't work in FOP Trunk!!!</strong></td>
+<td>No, defaults to <code>verbose</code></td>
+</tr>
+<tr>
+<td>logFiles</td>
+<td>Controls whether the names of the files that are processed are logged ( <code>true</code> ) or not ( <code>false</code> ). <strong>Currently doesn't work in FOP Trunk!!!</strong></td>
+<td>No, default is <code>true</code></td>
+</tr>
+<tr>
+<td>throwexceptions</td>
+<td>Controls whether or not an exception is thrown if an error occurs during rendering.</td>
+<td>Default is <code>true</code></td>
+</tr>
+</tbody>
+</table>
+<p><br/></p>
+<table>
+<thead>
+<tr>
+<th><caption>Parameters specified as nested elements</caption></th>
+<th>Attribute</th>
+<th>Description</th>
+<th>Required</th>
+<th></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td></td>
+<td>fileset</td>
+<td><a href="http://ant.apache.org/manual/CoreTypes/fileset.html">FileSets</a> are used to specify multiple XSL-FO files to be rendered.</td>
+<td>Yes, if no fofile attribute is supplied</td>
+<td></td>
+</tr>
+</tbody>
+</table>
+<h2 id="examples-wzxhzdk14wzxhzdk15">Examples <a id="examples"></a></h2>
+<p>The following example converts a single XSL-FO file to a PDF document:</p>
+<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-pdf&quot;</span> <span class="na">description=</span><span class="s">&quot;Generates a single PDF file&quot;</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/pdf&quot;</span> 
+        <span class="na">fofile=</span><span class="s">&quot;c:\working\foDirectory\foDocument.fo&quot;</span>
+        <span class="na">outfile=</span><span class="s">&quot;c:\working\pdfDirectory\pdfDocument.pdf&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/target&gt;</span>
+</pre></div>
+
+
+<p>This example converts all XSL-FO files within an entire directory to PostScript:</p>
+<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-multiple-ps&quot;</span> 
+        <span class="na">description=</span><span class="s">&quot;Generates multiple PostScript files&quot;</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/postscript&quot;</span> 
+        <span class="na">outdir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">build</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span> <span class="na">messagelevel=</span><span class="s">&quot;debug&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fo</span><span class="o">.</span><span class="n">examples</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span><span class="nt">&gt;</span>
+           <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.fo&quot;/</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;/fileset&gt;</span>
+   <span class="nt">&lt;/fop&gt;</span>
+<span class="nt">&lt;/target&gt;</span>
+</pre></div>
+
+
+<p>The following example transforms and converts a single XML and XSLT file to an AFP document:</p>
+<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-afp-from-transform&quot;</span> <span class="na">description=</span><span class="s">&quot;Generates a single AFP file from an XSLT stylesheet&quot;</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/x-afp&quot;</span> 
+        <span class="na">xmlfile=</span><span class="s">&quot;c:\working\foDirectory\Document.xml&quot;</span>
+        <span class="na">xsltfile=</span><span class="s">&quot;c:\working\foDirectory\Document.xslt&quot;</span>
+        <span class="na">outfile=</span><span class="s">&quot;c:\working\afpDirectory\Document.afp&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/target&gt;</span>
+</pre></div>
+
+
+<p>This example transforms and converts all XML files within an entire directory to PostScript:</p>
+<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-multiple-ps-from-transform&quot;</span> <span class="na">description=</span><span class="s">&quot;Generates multiple PostScript files using an XSLT stylesheet&quot;</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/postscript&quot;</span> 
+        <span class="na">xsltfile=</span><span class="s">&quot;c:\working\foDirectory\Document.xslt&quot;</span>
+        <span class="na">outdir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">build</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span> <span class="na">messagelevel=</span><span class="s">&quot;debug&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">test</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span><span class="nt">&gt;</span>
+           <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.xml&quot;/</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;/fileset&gt;</span>
+   <span class="nt">&lt;/fop&gt;</span>
+<span class="nt">&lt;/target&gt;</span>
+</pre></div></div>
       </div>
       
       <div class="clear"></div>



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