xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r841686 [1/3] - in /websites/staging/xmlgraphics/trunk/content: ./ fop/ fop/1.0/ fop/1.1/ fop/trunk/
Date Tue, 11 Dec 2012 13:32:27 GMT
Author: buildbot
Date: Tue Dec 11 13:32:25 2012
New Revision: 841686

Log:
Staging update by buildbot for xmlgraphics

Modified:
    websites/staging/xmlgraphics/trunk/content/   (props changed)
    websites/staging/xmlgraphics/trunk/content/fop/1.0/embedding.html
    websites/staging/xmlgraphics/trunk/content/fop/1.0/output.html
    websites/staging/xmlgraphics/trunk/content/fop/1.0/pdfencryption.html
    websites/staging/xmlgraphics/trunk/content/fop/1.0/servlets.html
    websites/staging/xmlgraphics/trunk/content/fop/1.1/embedding.html
    websites/staging/xmlgraphics/trunk/content/fop/1.1/output.html
    websites/staging/xmlgraphics/trunk/content/fop/changes.html
    websites/staging/xmlgraphics/trunk/content/fop/download.html
    websites/staging/xmlgraphics/trunk/content/fop/trunk/embedding.html
    websites/staging/xmlgraphics/trunk/content/fop/trunk/output.html
    websites/staging/xmlgraphics/trunk/content/fop/trunk/pdfencryption.html
    websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html

Propchange: websites/staging/xmlgraphics/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Dec 11 13:32:25 2012
@@ -1 +1 @@
-1420120
+1420146

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.0/embedding.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.0/embedding.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.0/embedding.html Tue Dec 11 13:32:25
2012
@@ -341,7 +341,7 @@ $(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="apachewzxhzdk21-fop-embedding">Apache&trade;
FOP: Embedding</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk22-fop-embedding">Apache&trade;
FOP: Embedding</h1>
 <p><subtitle>How to Embed Apache&trade; FOP in a Java application</subtitle></p>
 <h2 id="overview">Overview</h2>
 <p>Review <a href="running.html">Running FOP</a> for important information
that applies to embedded applications as well as command-line use, such as options and performance.</p>
@@ -621,7 +621,11 @@ Set a <strong>URIResolver</strong> for c
 <p>Whenever possible, try to use SAX to couple the individual components involved (parser,
XSL transformer, SQL datasource etc.).</p>
 </li>
 <li>
-<p>Depending on the target OutputStream (in case of a FileOutputStream, but not for
a ByteArrayOutputStream, for example) it may improve performance considerably if you buffer
the OutputStream using a BufferedOutputStream: <code>out = new java.io.BufferedOutputStream(out);</code></p>
+<p>Depending on the target OutputStream (in case of a FileOutputStream, but not for
a ByteArrayOutputStream, for example) it may improve performance considerably if you buffer
the OutputStream using a BufferedOutputStream:</p>
+<div class="codehilite"><pre><span class="err">`</span><span class="n">out</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span
class="o">.</span><span class="na">io</span><span class="o">.</span><span
class="na">BufferedOutputStream</span><span class="o">(</span><span
class="n">out</span><span class="o">);</span><span class="err">`</span>
+</pre></div>
+
+
 <p>Make sure you properly close the OutputStream when FOP is finished.</p>
 </li>
 <li>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.0/output.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.0/output.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.0/output.html Tue Dec 11 13:32:25 2012
@@ -351,11 +351,17 @@ $(document).ready(function () {
 <p>With a work-around, it is possible to match the PDF/PS output in a Java2D-based
renderer pretty closely. The clue is to use the <a href="intermediate.html">intermediate
format</a>. The trick is to layout the document using FOP's own font subsystem but then
render the document using Java2D. Here are the necessary steps (using the command-line):</p>
 <ol>
 <li>
-<p>Produce an IF file: <code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code></p>
-<p>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>
+<p>Produce an IF file:</p>
+<ul>
+<li><code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code></li>
+</ul>
+<p>Specifying "application/pdf" for the "<code>-at</code>" 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:</p>
+<ul>
+<li><code>fop -atin myfile.at.xml -pdf myfile.pdf</code></li>
+</ul>
 </li>
 <li>
 <p>Render to a Java2D-based renderer:</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 Tue Dec 11 13:32:25
2012
@@ -346,13 +346,13 @@ $(document).ready(function () {
 <h2 id="Overview">Overview</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-usage-28command-line29">Usage (command line) {#Usage-%28command-line%29}</h2>
+<h2 id="commandline">Usage (command line)</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-usage-28embedded29">Usage (embedded) {#Usage-%28embedded%29}</h2>
+<h2 id="embedded">Usage (embedded)</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>

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 Tue Dec 11 13:32:25 2012
@@ -341,7 +341,7 @@ $(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="apachewzxhzdk4-fop-servlets">Apache&trade;
FOP: Servlets</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk5-fop-servlets">Apache&trade;
FOP: Servlets</h1>
 <p><subtitle>How to use Apache&trade; FOP in a Servlet</subtitle></p>
 <h2 id="overview">Overview</h2>
 <p>This page discusses topic all around using Apache&trade; FOP in a servlet environment.</p>
@@ -494,12 +494,15 @@ The <code>Source</code> instance used ab
 </li>
 <li>
 <p>Give IEx the opportunity to cache. In particular, ensure the server does not set
any headers causing IEx not to cache the content. This may be a real problem if the document
is sent over HTTPS, because most IEx installations will by default <em>not</em>
cache any content retrieved over HTTPS. Setting the <code>Expires</code> header
entry may help in this case:</p>
-</li>
-</ul>
-<p><code>response.setDateHeader("Expires", System.currentTimeMillis() + cacheExpiringDuration
* 1000);</code></p>
+<div class="codehilite"><pre><span class="err">`</span><span class="n">response</span><span
class="o">.</span><span class="na">setDateHeader</span><span class="o">(</span><span
class="s">&quot;Expires&quot;</span><span class="o">,</span>
<span class="n">System</span><span class="o">.</span><span class="na">currentTimeMillis</span><span
class="o">()</span> <span class="o">+</span> <span class="n">cacheExpiringDuration</span>
<span class="o">*</span> <span class="mi">1000</span><span class="o">);</span><span
class="err">`</span>
+</pre></div>
+
+
 <p>Consult your server manual and the relevant RFCs for further details on HTTP headers
and caching.</p>
-<ul>
-<li>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.</li>
+</li>
+<li>
+<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-engine">Servlet Engines</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>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.1/embedding.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.1/embedding.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.1/embedding.html Tue Dec 11 13:32:25
2012
@@ -341,7 +341,7 @@ $(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="apachewzxhzdk21-fop-embedding">Apache&trade;
FOP: Embedding</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk24-fop-embedding">Apache&trade;
FOP: Embedding</h1>
 <p><subtitle>How to Embed FOP in a Java application</subtitle></p>
 <h2 id="overview">Overview</h2>
 <p>Review <a href="running.html">Running Apache&trade; FOP</a> for
important information that applies to embedded applications as well as command-line use, such
as options and performance.</p>
@@ -448,11 +448,15 @@ $(document).ready(function () {
 <p>Once the Fop instance is set up, call <code>getDefaultHandler()</code>
to obtain a SAX DefaultHandler instance to which you can send the SAX events making up the
XSL-FO document you'd like to render. FOP processing starts as soon as the DefaultHandler's
<code>startDocument()</code> method is called. Processing stops again when the
DefaultHandler's <code>endDocument()</code> method is called. Please refer to
the basic usage pattern shown above to render a simple XSL-FO document.</p>
 <h3 id="render-with-xslt">Processing XSL-FO generated from XML+XSLT</h3>
 <p>If you want to process XSL-FO generated from XML using XSLT we recommend again using
standard JAXP to do the XSLT part and piping the generated SAX events directly through to
FOP. The only thing you'd change to do that on the basic usage pattern above is to set up
the Transformer differently:</p>
-<p>//without XSLT:
-  //Transformer transformer = factory.newTransformer(); // identity transformer</p>
-<p>//with XSLT:
-  Source xslt = new StreamSource(new File("mystylesheet.xsl"));
-  Transformer transformer = factory.newTransformer(xslt);</p>
+<div class="codehilite"><pre><span class="c1">//without XSLT:</span>
+<span class="c1">//Transformer transformer = factory.newTransformer(); // identity
transformer</span>
+
+<span class="c1">//with XSLT:</span>
+<span class="n">Source</span> <span class="n">xslt</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="s">&quot;mystylesheet.xsl&quot;</span><span
class="o">));</span>
+<span class="n">Transformer</span> <span class="n">transformer</span>
<span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="na">newTransformer</span><span class="o">(</span><span class="n">xslt</span><span
class="o">);</span>
+</pre></div>
+
+
 <h2 id="input">Input Sources</h2>
 <p>The input XSL-FO document is always received by FOP as a SAX stream (see the <a
href="../dev/design/parsing.html">Parsing Design Document</a> for the rationale).</p>
 <p>However, you may not always have your input document available as a SAX stream.
But with JAXP it's easy to convert different input sources to a SAX stream so you can pipe
it into FOP. That sounds more difficult than it is. You simply have to set up the right Source
instance as input for the JAXP transformation. A few examples:</p>
@@ -485,57 +489,70 @@ $(document).ready(function () {
 <h3 id="fop-factory">Customizing the FopFactory</h3>
 <p>The FopFactory holds configuration data and references to objects which are reusable
over multiple rendering runs. It's important to instantiate it only once (except in special
environments) and reuse it every time to create new FOUserAgent and Fop instances.</p>
 <p>You can set all sorts of things on the FopFactory:</p>
-<p>-
-The <strong>font base URL</strong> to use when resolving relative URLs for fonts.
Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.getFontManager().setFontBaseURL(&quot;file:///C:/Temp/fonts&quot;);`</span>
+<ul>
+<li>
+<p>The <strong>font base URL</strong> to use when resolving relative URLs
for fonts. Example:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">getFontManager</span><span class="o">().</span><span
class="na">setFontBaseURL</span><span class="o">(</span><span class="s">&quot;file:///C:/Temp/fonts&quot;</span><span
class="o">);</span>
 </pre></div>
 
 
-<p>-
-The <strong>hyphenation base URL</strong> to use when resolving relative URLs
for hyphenation patterns. Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.setHyphenBaseURL(&quot;file:///C:/Temp/hyph&quot;);`</span>
+</li>
+<li>
+<p>The <strong>hyphenation base URL</strong> to use when resolving relative
URLs for hyphenation patterns. Example:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">setHyphenBaseURL</span><span class="o">(</span><span
class="s">&quot;file:///C:/Temp/hyph&quot;</span><span class="o">);</span>
 </pre></div>
 
 
+</li>
+</ul>
 <p>-
 Disable <strong>strict validation</strong>. When disabled FOP is less strict
about the rules established by the XSL-FO specification. Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.setStrictValidation(false);`</span>
+<div class="codehilite"><pre>    <span class="n">fopFactory</span><span
class="o">.</span><span class="na">setStrictValidation</span><span
class="o">(</span><span class="kc">false</span><span class="o">);</span>
 </pre></div>
 
 
-<p>-
-Enable an <strong>alternative set of rules for text indents</strong> that tries
to mimic the behaviour of many commercial FO implementations, that chose to break the specification
in this respect. The default of this option is 'false', which causes Apache FOP to behave
exactly as described in the specification. To enable the alternative behaviour, call:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);`</span>
+<ul>
+<li>
+<p>Enable an <strong>alternative set of rules for text indents</strong>
that tries to mimic the behaviour of many commercial FO implementations, that chose to break
the specification in this respect. The default of this option is 'false', which causes Apache
FOP to behave exactly as described in the specification. To enable the alternative behaviour,
call:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">setBreakIndentInheritanceOnReferenceAreaBoundary</span><span
class="o">(</span><span class="kc">true</span><span class="o">);</span>
 </pre></div>
 
 
-<p>-
-Set the <strong>source resolution</strong> for the document. This is used internally
to determine the pixel size for SVG images and bitmap images without resolution information.
Default: 72 dpi. Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.setSourceResolution(96);
// =96dpi (dots/pixels per Inch)`</span>
+</li>
+<li>
+<p>Set the <strong>source resolution</strong> for the document. This is
used internally to determine the pixel size for SVG images and bitmap images without resolution
information. Default: 72 dpi. Example:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">setSourceResolution</span><span
class="o">(</span><span class="mi">96</span><span class="o">);</span>
<span class="c1">// =96dpi (dots/pixels per Inch)</span>
 </pre></div>
 
 
-<p>-
-Manually add an <strong>ElementMapping instance</strong>. If you want to supply
a special FOP extension you can give the instance to the FOUserAgent. Normally, the FOP extensions
can be automatically detected (see the documentation on extension for more info). Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.addElementMapping(myElementMapping);//
myElementMapping is a org.apache.fop.fo.ElementMapping`</span>
+</li>
+<li>
+<p>Manually add an <strong>ElementMapping instance</strong>. If you want
to supply a special FOP extension you can give the instance to the FOUserAgent. Normally,
the FOP extensions can be automatically detected (see the documentation on extension for more
info). Example:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">addElementMapping</span><span class="o">(</span><span
class="n">myElementMapping</span><span class="o">);</span> <span class="c1">//
myElementMapping is a org.apache.fop.fo.ElementMapping</span>
 </pre></div>
 
 
-<p>-
-Set a <strong>URIResolver</strong> for custom URI resolution. By supplying a
JAXP URIResolver you can add custom URI resolution functionality to FOP. For example, you
can use <a href="http://xml.apache.org/commons/components/resolver/">Apache XML Commons
Resolver</a> to make use of XCatalogs. Example:</p>
-<div class="codehilite"><pre><span class="sb">`fopFactory.setURIResolver(myResolver);//
myResolver is a javax.xml.transform.URIResolver`</span>
+</li>
+<li>
+<p>Set a <strong>URIResolver</strong> for custom URI resolution. By supplying
a JAXP URIResolver you can add custom URI resolution functionality to FOP. For example, you
can use <a href="http://xml.apache.org/commons/components/resolver/">Apache XML Commons
Resolver</a> to make use of XCatalogs. Example:</p>
+<div class="codehilite"><pre><span class="n">fopFactory</span><span
class="o">.</span><span class="na">setURIResolver</span><span class="o">(</span><span
class="n">myResolver</span><span class="o">);</span> <span class="c1">//
myResolver is a javax.xml.transform.URIResolver</span>
 </pre></div>
 
 
+</li>
+</ul>
 <p>Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The
URIResolver on the FopFactory is primarily used to resolve URIs on factory-level (hyphenation
patterns, for example) and it is always used if no other URIResolver (for example on the FOUserAgent)
resolved the URI first.</p>
 <h3 id="user-agent">Customizing the User Agent</h3>
 <p>The user agent is the entity that allows you to interact with a single rendering
run, i.e. the processing of a single document. If you wish to customize the user agent's behaviour,
the first step is to create your own instance of FOUserAgent using the appropriate factory
method on FopFactory and pass that to the factory method that will create a new Fop instance:</p>
-<p>FopFactory fopFactory = FopFactory.newInstance(); // Reuse the FopFactory if possible!
-  // do the following for each new rendering run
-  FOUserAgent userAgent = fopFactory.newFOUserAgent();
-  // customize userAgent
-  Fop fop = fopFactory.newFop(MimeConstants.MIME_POSTSCRIPT, userAgent, out);
-You can do all sorts of things on the user agent:</p>
+<div class="codehilite"><pre><span class="n">FopFactory</span> <span
class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span
class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
<span class="c1">// Reuse the FopFactory if possible!</span>
+<span class="c1">// do the following for each new rendering run</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="c1">// customize userAgent</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_POSTSCRIPT</span><span class="o">,</span>
<span class="n">userAgent</span><span class="o">,</span> <span
class="n">out</span><span class="o">);</span>
+</pre></div>
+
+
+<p>You can do all sorts of things on the user agent:</p>
 <p>-
 The <strong>base URL</strong> to use when resolving relative URLs. Example:</p>
 <div class="codehilite"><pre><span class="sb">`userAgent.setBaseURL(&quot;file:///C:/Temp/&quot;);`</span>
@@ -650,7 +667,11 @@ Set a <strong>URIResolver</strong> for c
 <p>Whenever possible, try to use SAX to couple the individual components involved (parser,
XSL transformer, SQL datasource etc.).</p>
 </li>
 <li>
-<p>Depending on the target OutputStream (in case of a FileOutputStream, but not for
a ByteArrayOutputStream, for example) it may improve performance considerably if you buffer
the OutputStream using a BufferedOutputStream: <code>out = new java.io.BufferedOutputStream(out);</code></p>
+<p>Depending on the target OutputStream (in case of a FileOutputStream, but not for
a ByteArrayOutputStream, for example) it may improve performance considerably if you buffer
the OutputStream using a BufferedOutputStream:</p>
+<div class="codehilite"><pre><span class="n">out</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">java</span><span
class="o">.</span><span class="na">io</span><span class="o">.</span><span
class="na">BufferedOutputStream</span><span class="o">(</span><span
class="n">out</span><span class="o">);</span>
+</pre></div>
+
+
 <p>Make sure you properly close the OutputStream when FOP is finished.</p>
 </li>
 <li>

Modified: websites/staging/xmlgraphics/trunk/content/fop/1.1/output.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/1.1/output.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/1.1/output.html Tue Dec 11 13:32:25 2012
@@ -341,7 +341,7 @@ $(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="apachewzxhzdk42-fop-output-formats">Apache&trade;
FOP Output Formats</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk43-fop-output-formats">Apache&trade;
FOP Output Formats</h1>
 <p><authors><person email="keiron@aftexsw.com" name="Keiron Liddle"></person><person
email="" name="Art Welch"></person></authors></p>
 <p>Apache&trade; FOP supports multiple output formats by using a different renderer
for each format. The renderers do not all have the same set of capabilities, sometimes because
of the output format itself, sometimes because some renderers get more development attention
than others.</p>
 <h2 id="general">General Information</h2>
@@ -351,11 +351,17 @@ $(document).ready(function () {
 <p>With a work-around, it is possible to match the PDF/PS output in a Java2D-based
renderer pretty closely. The clue is to use the <a href="intermediate.html">intermediate
format</a>. The trick is to layout the document using FOP's own font subsystem but then
render the document using Java2D. Here are the necessary steps (using the command-line):</p>
 <ol>
 <li>
-<p>Produce an IF file: <code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code></p>
-<p>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>
+<p>Produce an IF file:</p>
+<ul>
+<li><code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code></li>
+</ul>
+<p>Specifying "application/pdf" for the "<code>-at</code>" 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:</p>
+<ul>
+<li><code>fop -atin myfile.at.xml -pdf myfile.pdf</code></li>
+</ul>
 </li>
 <li>
 <p>Render to a Java2D-based renderer:</p>
@@ -374,12 +380,16 @@ $(document).ready(function () {
 </ol>
 <h3 id="general-direct-output">Output to a Printer or Other Device</h3>
 <p>The most obvious way to print your document is to use the FOP <a href="#print">print
renderer</a>, which uses the Java2D API (AWT). However, you can also send output from
the Postscript renderer directly to a Postscript device, or output from the PCL renderer directly
to a PCL device.</p>
-<p>Here are Windows command-line examples for Postscript and PCL:
-fop ... -ps \computername\printerfop ... -pcl \computername\printer
-Here is some Java code to accomplish the task in UNIX:
-proc = Runtime.getRuntime().exec("lp -d" + print_queue + " -o -dp -");
-out = proc.getOutputStream();
-Set the output MIME type to "application/x-pcl" (MimeConstants.MIME_PCL) and it happily sends
the PCL to the UNIX printer queue.</p>
+<p>Here are Windows command-line examples for Postscript and PCL:</p>
+<p><code>fop ... -ps \\computername\printer</code></p>
+<p><code>fop ... -pcl \\computername\printer</code></p>
+<p>Here is some Java code to accomplish the task in UNIX:</p>
+<div class="codehilite"><pre><span class="n">proc</span> <span
class="o">=</span> <span class="n">Runtime</span><span class="o">.</span><span
class="na">getRuntime</span><span class="o">().</span><span class="na">exec</span><span
class="o">(</span><span class="s">&quot;lp -d&quot;</span> <span
class="o">+</span> <span class="n">print_queue</span> <span class="o">+</span>
<span class="s">&quot; -o -dp -&quot;</span><span class="o">);</span>
+<span class="n">out</span> <span class="o">=</span> <span class="n">proc</span><span
class="o">.</span><span class="na">getOutputStream</span><span class="o">();</span>
+</pre></div>
+
+
+<p>Set the output MIME type to "<code>application/x-pcl</code>" (<code>MimeConstants.MIME_PCL</code>)
and it happily sends the PCL to the UNIX printer queue.</p>
 <h2 id="pdf">PDF</h2>
 <p>PDF is the best supported output format. It is also the most accurate with text
and layout. This creates a PDF document that is streamed out as each page is rendered. This
means that the internal page index information is stored near the end of the document. The
PDF version supported is 1.4. PDF versions are forwards/backwards compatible.</p>
 <p>Note that FOP does not currently support PDF/A-1a. Support for <a href="accessibility.html">Tagged
PDF</a>, <a href="pdfa.html">PDF/A-1b</a> and <a href="pdfx.html">PDF/X</a>
has recently been added, however.</p>



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


Mime
View raw message