You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ga...@apache.org on 2012/07/05 21:15:15 UTC

svn commit: r1357814 [3/7] - in /xmlgraphics/fop/branches/fop-1_1: ./ src/documentation/content/ src/documentation/content/xdocs/ src/documentation/content/xdocs/1.1rc1/ src/documentation/content/xdocs/1.1rc1/fotree/ src/documentation/content/xdocs/1.1...

Added: xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/extensions.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/extensions.xml?rev=1357814&view=auto
==============================================================================
--- xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/extensions.xml (added)
+++ xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/extensions.xml Thu Jul  5 19:15:13 2012
@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+  <header>
+    <title>Standard Apache™ FOP Extensions</title>
+    <version>$Revision$</version>
+  </header>
+  <body>
+    <p>
+      By "extension", we mean any data that can be placed in the input XML document that
+      is not addressed by the XSL-FO standard.
+      By having a mechanism for supporting extensions, Apache™ FOP is able to add features that
+      are not covered in the specification.
+    </p>
+    <p>
+      The extensions documented here are included with FOP, and are automatically available
+      to you. If you wish to add an extension of your own to FOP, please see the
+      <a href="../dev/extensions.html">Developers' Extension Page</a>.
+    </p>
+    <note>All extensions require the correct use of an appropriate namespace in your input document.</note>
+    <section id="svg">
+      <title>SVG</title>
+      <p>
+        Please see the <a href="graphics.html#svg">SVG documentation</a> for more details.
+      </p>
+    </section>
+    <section id="fo-extensions">
+      <title>FO Extensions</title>
+      <section id="fox-namespace">
+        <title>Namespace</title>
+        <p>
+          By convention, FO extensions in FOP use the "fox" namespace prefix.
+          To use any of the FO extensions, add a namespace entry for
+          <code>http://xmlgraphics.apache.org/fop/extensions</code> to the root element:
+        </p>
+        <source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+               xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">]]></source>
+      </section>
+      <section id="bookmarks">
+        <title>PDF Bookmarks</title>
+        <p>
+          In old versions of Apache FOP there was a <code>fox:outline</code> element
+          which was used to create outlines in PDF files. The redesigned code makes use
+          of the <a href="http://www.w3.org/TR/xsl11/#fo_bookmark-tree">bookmark feature defined in the W3C XSL 1.1 standard</a>.
+        </p>
+      </section>
+      <section id="named-destinations">
+        <title>Anchors or Named Destinations</title>
+        <p>Use the fox:destination element to define "named destinations" inside a PDF document.
+These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
+fox:destination elements can be placed almost anywhere in the fo document, including a child of
+root, a block-level element, or an inline-level element.
+For the destination to actually work, it must correspond to an "id" attribute on some fo element
+within the document. In other words, the "id" attribute actually creates the "view" within the
+PDF document. The fox:destination simply gives that view an independent name.
+</p>
+        <source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
+...
+<fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
+        <warning>It is possible that in some future release of FOP, <em>all </em>elements with
+"id" attributes will generate named-destinations, which will eliminate the need for
+fox:destination.</warning>
+      </section>
+      <section id="table-continue-label">
+        <title>Table Continuation Label</title>
+        <p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
+        <!--p>Use the fox:continued-label element to create content in table-header and
+table-footer cells that will appear only on pages after the first page that the table
+appears. fox:continued-label is itself inline content, and is a container of fo:inline
+content. This content will be laid out only if the table does not fit on a single page and flows
+to following pages. Here is an example of FO code creating such a table-header:</p>
+<source><![CDATA[<fo:table-header>
+  <fo:table-row>
+    <fo:table-cell>
+      <fo:block>Header column 1 with continued label
+          <fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>Header column 2 with no continued label</fo:block>
+    </fo:table-cell>
+  </fo:table-row>
+</fo:table-header>]]></source-->
+      </section>
+      <section id="widow-orphan-content-limit">
+        <title>fox:orphan-content-limit and fox:widow-content-limit</title>
+        <p>
+          The two proprietary extension properties, fox:orphan-content-limit and
+          fox:widow-content-limit, are used to improve the layout of list-blocks and tables.
+          If you have a table with many entries, you don't want a single row to be left over
+          on a page. You will want to make sure that at least two or three lines are kept
+          together. The properties take an absolute length which specifies the area at the
+          beginning (fox:widow-content-limit) or at the end (fox:orphan-content-limit) of a
+          table or list-block. The properties are inherited and only have an effect on fo:table
+          and fo:list-block. An example: fox:widow-content-limit="3 * 1.2em" would make sure
+          the you'll have at least three lines (assuming line-height="1.2") together on a table
+          or list-block.
+        </p>
+      </section>
+      <section id="external-document">
+        <title>fox:external-document</title>
+        <note>
+          This feature is incomplete. Support for multi-page documents will be added shortly.
+          At the moment, only single-page images will work. And this will not work with RTF output.
+        </note>
+        <p>
+          This is a proprietary extension element which allows to add whole images as pages to
+          an FO document. For example, if you have a scanned document or a fax as multi-page TIFF
+          file, you can append or insert this document using the <code>fox:external-document</code>
+          element. Each page of the external document will create one full page in the target
+          format.
+        </p>
+        <p>
+          The <code>fox:external-document</code> element is structurally a peer to
+          <code>fo:page-sequence</code>, so wherever you can put an <code>fo:page-sequence</code>
+          you could also place a <code>fox:external-document</code>.
+          Therefore, the specified contents for <code>fo:root</code> change to:
+        </p>
+        <p>
+          <code>
+            (layout-master-set, declarations?, bookmark-tree?, (page-sequence|page-sequence-wrapper|fox:external-document|fox:destination)+)
+          </code>
+        </p>
+        <section>
+          <title>Specification</title>
+          <p>
+            The <code>fox:external-document</code> extension formatting object is used to specify
+            how to create a (sub-)sequence of pages within a document. The content of these pages
+            comes from the individual subimages/pages of an image or paged document (for example:
+            multi-page TIFF in the form of faxes or scanned documents, or PDF files). The
+            formatting object creates the necessary areas to display one image per page.
+          </p>
+          <p>
+            In terms of page numbers, the behaviour is the same as for
+            <code>fo:page-sequence</code>. The placement of the image inside the page is similar
+            to that of <code>fo:external-graphic</code> or <code>fo:instream-foreign-object</code>,
+            i.e. the viewport (and therefore the page size) is defined by either the intrinsic
+            size of the image or by the size properties that apply to this formatting object.
+          </p>
+          <p>Content: EMPTY</p>
+          <p>The following properties apply to this formatting object:</p>
+          <ul>
+            <li>(Common Accessibility Properties) (not implemented, yet)</li>
+            <li>(Common Aural Properties) (not implemented, yet)</li>
+            <li>block-progression-dimension</li>
+            <li>content-height</li>
+            <li>content-type</li>
+            <li>content-width</li>
+            <li>display-align</li>
+            <li>height</li>
+            <li>id</li>
+            <li>inline-progression-dimension</li>
+            <li>overflow</li>
+            <li>pages: &lt;page-set&gt; (see below) (not implemented, yet)</li>
+            <li>reference-orientation</li>
+            <li>scaling</li>
+            <li>scaling-method</li>
+            <li>src</li>
+            <li>text-align</li>
+            <li>width</li>
+          </ul>
+          <p>
+            Datatype "page-set": Value: auto | &lt;integer-range&gt;,
+            Default: "auto" which means all pages/subimages of the document.
+            &lt;integer-range&gt; allows values such as "7" or "1-3"
+          </p>
+          <note>
+            <code>fox:external-document</code> is not suitable for concatenating FO documents.
+            For this, XInclude is recommended.
+          </note>
+        </section>
+      </section>
+      <section id="transform">
+        <title>Free-form Transformation for fo:block-container</title>
+        <p>
+          For <code>fo:block-container</code> elements whose <code>absolute-position</code> set to
+          "absolute" or "fixed" you can use the extension attribute <code>fox:transform</code>
+          to apply a free-form transformation to the whole block-container. The content of the
+          <code>fox:transform</code> attribute is the same as for
+          <a href="http://www.w3.org/TR/SVG/coords.html#TransformAttribute">SVG's transform attribute</a>.
+          The transformation specified here is performed in addition to other implicit
+          transformations of the block-container (resulting from top, left and other properties)
+          and after them.
+        </p>
+        <p>
+          Examples: <code>fox:transform="rotate(45)"</code> would rotate the block-container
+          by 45 degrees clock-wise around its upper-left corner.
+          <code>fox:transform="translate(10000,0)"</code> would move the block-container to the
+          right by 10 points (=10000 millipoints, FOP uses millipoints internally!).
+        </p>
+        <note>
+          This extension attribute doesn't work for all output formats! It's currently only
+          supported for PDF, PS and Java2D-based renderers.
+        </note>
+      </section>
+      <section id="color-functions">
+        <title>Color functions</title>
+        <p>
+          XSL-FO supports specifying color using the rgb(), rgb-icc() and system-color() functions.
+          Apache FOP provides additional color functions for special use cases. Please note that
+          using these functions compromises the interoperability of an FO document.
+        </p>
+        <section id="color-function-cmyk">
+          <title>cmyk()</title>
+          <p><code>color cmyk(numeric, numeric, numeric, numeric)</code></p>
+          <p>
+            This function will construct a color in device-specific CMYK color space. The numbers
+            must be between 0.0 and 1.0. For output formats that don't support device-specific
+            color space the CMYK value is converted to an sRGB value.
+          </p>
+        </section>
+        <section id="pseudo-color-profiles">
+          <title>#CMYK pseudo-profile</title>
+          <p><code>color rgb-icc(numeric, numeric, numeric, #CMYK, numeric, numeric, numeric, numeric)</code></p>
+          <p>
+            The <code>rgb-icc</code> function will respond to a pseudo-profile called "#CMYK"
+            which indicates a device-specific CMYK color space. The "#CMYK" profile is implicitely
+            available and doesn't have to be (and cannot be) defined through an
+            <code>fo:color-profile</code> element. It is provided for compatibility with certain
+            commercial XSL-FO implementations. Please note that this is not part of the official
+            specification but rather a convention. The following two color specifications are
+            equivalent:
+          </p>
+          <ul>
+            <li><code>cmyk(0%,0%,20%,40%)</code></li>
+            <li><code>rgb-icc(153, 153, 102, #CMYK, 0, 0, 0.2, 0.4)</code></li>
+          </ul>
+        </section>
+      </section>
+      <section id="prepress">
+        <title>Prepress Support</title>
+
+        <p>
+          This section defines a number of extensions related to
+          <a href="http://en.wikipedia.org/wiki/Prepress">prepress</a> support.
+          <code>fox:scale</code> defines a general scale factor for the generated pages.
+          <code>fox:bleed</code> defines the
+          <a href="http://en.wikipedia.org/wiki/Bleed_%28printing%29">bleed area</a> for a page.
+          <code>fox:crop-offset</code> defines the outer edges of the area in which crop marks,
+          registration marks, color bars and page information are placed.
+          For details, please read on below.
+        </p>
+        <note>
+          Those extensions have been implemented in the PDF and Java2D renderers only.
+        </note>
+
+        <section id="scale">
+          <title>fox:scale</title>
+          <p>Value: &lt;number&gt;{1,2}</p>
+          <p>Initial: 1</p>
+          <p>Applies to: fo:simple-page-master</p>
+          <p>
+            This property specifies a scale factor along resp. the x and y axes. If only one number
+            is provided it is used for both the x and y scales. A scale factor smaller than 1
+            shrinks the page. A scale factor greater than 1 enlarges the page.
+          </p>
+        </section>
+        <section id="bleed">
+          <title>fox:bleed</title>
+          <p>
+              Value: &lt;length&gt;{1,4}
+          </p>
+          <p>
+              Initial: 0pt
+          </p>
+          <p>Applies to: fo:simple-page-master</p>
+          <p>
+              If there is only one value, it applies to all sides. If there are two values, the top and bottom
+              bleed widths are set to the first value and the right and left bleed widths are set to the second.
+              If there are three values, the top is set to the first value, the left and right are set to the second,
+              and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and
+              left, respectively.
+              (Corresponds to <a href="http://www.w3.org/TR/xsl11/#padding">the definition of
+                padding</a>).
+          </p>
+          <p>
+              This extension indirectly defines the BleedBox and is calculated by expanding the TrimBox by
+              the bleed widths. The lengths must be non-negative.
+          </p>
+        </section>
+        <section id="cropOffset">
+          <title>fox:crop-offset</title>
+          <p>
+            Value: &lt;length&gt;{1,4}
+          </p>
+          <p>
+            Initial: bleed (see below)
+          </p>
+          <p>Applies to: fo:simple-page-master</p>
+          <p>
+            Same behaviour as with fox:bleed. The initial value is set to the same values as the
+            fox:bleed property.
+          </p>
+          <p>
+            This extension indirectly defines the MediaBox and is calculated by expanding
+            the TrimBox by the crop offsets. The lengths must be non-negative.
+          </p>
+        </section>
+        <section id="cropBox">
+          <title>fox:crop-box</title>
+          <p>
+            Value: [trim-box | bleed-box | media-box]
+          </p>
+          <p>
+            Initial: media-box
+          </p>
+          <p>Applies to: fo:simple-page-master</p>
+          <p>
+            The crop box controls how Acrobat displays the page (CropBox in PDF) or how the Java2DRenderer sizes
+            the output media. The PDF specification defines that the CropBox defaults to the MediaBox. This extension
+            follows that definition. To simplify usage and cover most use cases, the three supported enumeration
+            values "trim-box", "bleed-box" and "media-box" set the CropBox to one of those three other boxes.
+          </p>
+          <p>
+            If requested in the future, we could offer to specify the CropBox in absolute coordinates rather
+            than just by referencing another box.
+          </p>
+        </section>
+      </section>
+    </section>
+  </body>
+</document>
\ No newline at end of file

Added: xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fonts.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fonts.xml?rev=1357814&view=auto
==============================================================================
--- xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fonts.xml (added)
+++ xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fonts.xml Thu Jul  5 19:15:13 2012
@@ -0,0 +1,579 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+  <header>
+    <title>Apache™ FOP: Fonts</title>
+    <version>$Revision$</version>
+    <authors>
+      <person name="Jeremias M&#xE4;rki" email=""/>
+      <person name="Tore Engvig" email=""/>
+      <person name="Adrian Cumiskey" email=""/>
+      <person name="Max Berger" email=""/>
+    </authors>
+  </header>
+  <body>
+    <section id="intro">
+      <title>Summary</title>
+      <p>The following table summarizes the font capabilities of the various Apache� FOP renderers:</p>
+      <table>
+        <tr>
+          <th>Renderer</th>
+          <th>Base-14</th>
+          <th>AWT/OS</th>
+          <th>Custom</th>
+          <th>Custom Embedding</th>
+        </tr>
+        <tr>
+          <td>PDF</td>
+          <td>yes</td>
+          <td>no</td>
+          <td>yes</td>
+          <td>yes</td>
+        </tr>
+        <tr>
+          <td>PostScript</td>
+          <td>yes</td>
+          <td>no</td>
+          <td>yes</td>
+          <td>yes</td>
+        </tr>
+        <tr>
+          <td>PCL</td>
+          <td>yes (modified)</td>
+          <td>yes (painted as bitmaps)</td>
+          <td>yes (painted as bitmaps)</td>
+          <td>no</td>
+        </tr>
+        <tr>
+          <td>AFP</td>
+          <td>no</td>
+          <td>no</td>
+          <td>yes</td>
+          <td>yes</td>
+        </tr>
+        <tr>
+          <td>Java2D/AWT/Bitmap</td>
+          <td>if available from OS</td>
+          <td>yes</td>
+          <td>yes</td>
+          <td>n/a (display only)</td>
+        </tr>
+        <tr>
+          <td>Print</td>
+          <td>if available from OS</td>
+          <td>yes</td>
+          <td>yes</td>
+          <td>controlled by OS printer driver</td>
+        </tr>
+        <tr>
+          <td>RTF</td>
+          <td>n/a (font metrics not needed)</td>
+          <td>n/a</td>
+          <td>n/a</td>
+          <td>n/a</td>
+        </tr>
+        <tr>
+          <td>TXT</td>
+          <td>yes (used for layout but not for output)</td>
+          <td>no</td>
+          <td>yes (used for layout but not for output)</td>
+          <td>no</td>
+        </tr>
+<!--tr> NOT AVAILABLE
+          <td>MIF</td>
+          <td>n/a (font metrics not needed)</td>
+          <td>n/a</td>
+          <td>n/a</td>
+          <td>n/a</td>
+        </tr-->
+<!--tr> NOT AVAILABLE
+          <td>SVG</td>
+          <td>if available from OS</td>
+          <td>yes</td>
+          <td>no</td>
+          <td>no</td>
+        </tr-->
+        <tr>
+          <td>XML</td>
+          <td>yes</td>
+          <td>no</td>
+          <td>yes</td>
+          <td>n/a</td>
+        </tr>
+      </table>
+    </section>
+    <section>
+      <title>Base-14 Fonts</title>
+      <p>
+        The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be
+        available to every PostScript interpreter and PDF reader:
+        Helvetica (normal, bold, italic, bold italic),
+        Times (normal, bold, italic, bold italic),
+        Courier (normal, bold, italic, bold italic),
+        Symbol and ZapfDingbats.
+      </p>
+      <p>
+        The following font family names are hard-coded into FOP for the Base-14 font set:
+      </p>
+      <table>
+        <tr>
+          <th>Base-14 font</th>
+          <th>font families</th>
+        </tr>
+        <tr>
+          <td>Helvetica</td>
+          <td>Helvetica, sans-serif, SansSerif</td>
+        </tr>
+        <tr>
+          <td>Times</td>
+          <td>Times, Times Roman, Times-Roman, serif, any</td>
+        </tr>
+        <tr>
+          <td>Courier</td>
+          <td>Courier, monospace, Monospaced</td>
+        </tr>
+        <tr>
+          <td>Symbol</td>
+          <td>Symbol</td>
+        </tr>
+        <tr>
+          <td>ZapfDingbats</td>
+          <td>ZapfDingbats</td>
+        </tr>
+      </table>
+      <p>
+        Please note that recent versions of Adobe Acrobat Reader replace
+        "Helvetica" with "Arial" and "Times" with "Times New Roman" internally.
+        GhostScript replaces "Helvetica" with "Nimbus Sans L" and "Times" with 
+        "Nimbus Roman No9 L". Other document viewers may do similar font
+        substitutions. If you need to make sure that there are no such
+        substitutions, you need to specify an explicit font and embed it in
+        the target document.
+      </p>
+    </section>
+    <section id="missing-fonts">
+      <title>Missing Fonts</title>
+      <p>
+        When FOP does not have a specific font at its disposal (because it's 
+        not installed in the operating system or set up in FOP's configuration),
+        the font is replaced with "any". "any" is internally mapped to the
+        Base-14 font "Times" (see above).
+      </p>
+    </section>
+    <section id="missing-glyphs">
+      <title>Missing Glyphs</title>
+      <p>
+        Every font contains a particular set of
+        <a href="http://en.wikipedia.org/wiki/Glyph">glyphs</a>. If no glyph can be found for
+        a given character, FOP will issue a warning and use the glpyh for "#" (if available)
+        instead. Before it does that, it consults a (currently hard-coded) registry of
+        glyph substitution groups (see Glyphs.java in Apache XML Graphics Commons).
+        This registry can supply alternative glyphs in some cases (like using space when a no-break
+        space is requested). But there's no guarantee that the result will be as expected (for
+        example, in the case of hyphens and similar glyphs). A better way is to use a font that
+        has all the necessary glyphs. This glyph substitution is only a last resort.
+      </p>
+    </section>
+    <section id="awt">
+      <title>Java2D/AWT/Operating System Fonts</title>
+      <p>
+        The Java2D family of renderers (Java2D, AWT, Print, TIFF, PNG), use the
+        Java AWT subsystem for font metric information. Through operating system
+        registration, the AWT subsystem knows what fonts are available on the system,
+        and the font metrics for each one.
+      </p>
+      <p>
+        When working with one of these output formats and you're missing a font, just
+        install it in your operating system and they should be available for these
+        renderers. Please note that this is not true for other output formats such as
+        PDF or PostScript.
+      </p>
+    </section>
+    <section id="custom">
+      <title>Custom Fonts</title>
+      <p>
+        Support for custom fonts is highly output format dependent (see above table).
+        This section shows how to add Type 1 and TrueType fonts to the PDF, PostScript and
+        Java2D-based renderers. Other renderers (like AFP) support other font formats. Details
+        in this case can be found on the page about <a href="output.html">output formats</a>.
+      </p>
+      <p>
+        In earlier FOP versions, it was always necessary to create an XML font metrics file
+        if you wanted to add a custom font. This unconvenient step has been removed and in
+        addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts
+        installed in your operating system or can scan user-specified directories for fonts.
+        Font registration via XML font metrics file is still supported and may still be necessary
+        for some very special cases as fallback variant while we stabilize font auto-detection.
+      </p>
+      <p>
+        Basic information about fonts can be found at:
+      </p>
+      <ul>
+        <li>
+          <a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a>
+        </li>
+        <li>
+          <a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a>
+        </li>
+      </ul>
+    </section>
+    <section id="basics">
+      <title>Basic font configuration</title>
+      <p>
+        If you want FOP to use custom fonts, you need to tell it where to find them. This
+        is done in the configuration file and once per renderer (because each output format
+        is a little different). In the basic form, you can either tell FOP to find your
+        operating system fonts or you can specify directories that it will search for
+        support fonts. These fonts will then automatically be registered.
+      </p>
+      <source><![CDATA[
+<renderers>
+   <renderer mime="application/pdf">
+      <fonts>
+         <!-- register all the fonts found in a directory -->
+         <directory>C:\MyFonts1</directory>
+  
+         <!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
+         <directory recursive="true">C:\MyFonts2</directory>
+
+         <!-- automatically detect operating system installed fonts -->
+         <auto-detect/>  
+      </fonts>
+   </renderer>
+</renderers>]]></source>
+      <note>
+        Review the documentation for <a href="configuration.html">FOP Configuration</a>
+        for instructions on making the FOP configuration available to FOP when it runs.
+        Otherwise, FOP has no way of finding your custom font information. It is currently
+        not possible to easily configure fonts from Java code.
+      </note>
+    </section>
+    <section id="advanced">
+      <title>Advanced font configuration</title>
+      <p>
+        The instructions found above should be sufficient for most users. Below are some
+        additional instructions in case the basic font configuration doesn't lead to
+        the desired results.
+      </p>
+      <section id="type1-metrics">
+        <title>Type 1 Font Metrics</title>
+        <p>FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
+          To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
+        <p>Windows:</p>
+        <source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
+          org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
+        <p>Unix:</p>
+        <source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar
+          org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
+        <p>PFMReader [options]:</p>
+        <ul>
+          <li><strong>-fn &lt;fontname&gt;</strong> By default, FOP uses the fontname from the
+            .pfm file when embedding the font. Use the "-fn" option to override this name with one you have
+            chosen. This may be useful in some cases to ensure that applications using the output document
+            (Acrobat Reader for example) use the embedded font instead of a local font with the same
+            name.</li>
+        </ul>
+        <note>The classpath in the above example has been simplified for readability.
+          You will have to adjust the classpath to the names of the actual JAR files in the lib directory.
+          xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later.</note>
+        <note>The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values.
+          FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file.
+          The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually.
+          The constructed values however appear to have no visible influence.</note>
+      </section>
+      <section id="truetype-metrics">
+        <title>TrueType Font Metrics</title>
+        <p>FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
+          Use it in a similar manner to PFMReader.
+          For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:</p>
+        <source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
+          org.apache.fop.fonts.apps.TTFReader [options]
+          C:\myfonts\cmr10.ttf ttfcm.xml</source>
+        <p>TTFReader [options]:</p>
+        <ul>
+          <li><strong>-d &lt;DEBUG | INFO &gt;</strong> Sets the debug level (default is
+            INFO).</li>
+          <li><strong>-fn &lt;fontname&gt;</strong> Same as for PFMReader.</li>
+          <li><strong>-ttcname &lt;fontname&gt;</strong> If you're reading data from a
+            TrueType Collection (.ttc file) you must specify which font from the collection you will read
+            metrics from.
+            If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
+          <li><strong>-enc ansi</strong> Creates a WinAnsi-encoded font metrics file.
+            Without this option, a CID-keyed font metrics file is created.
+            The table below summarizes the differences between these two encoding options as currently
+            used within FOP.
+            Please note that this information only applies to TrueType fonts and TrueType collections:</li>
+        </ul>
+        <table id="ttf-encoding">
+          <tr>
+            <th>Issue</th>
+            <th>WinAnsi</th>
+            <th>CID-keyed</th>
+          </tr>
+          <tr>
+            <td>Usable Character Set</td>
+            <td>Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.</td>
+            <td>Limited only by the characters in the font itself.</td>
+          </tr>
+          <tr>
+            <td>Embedding the Font</td>
+            <td>Optional.</td>
+            <td>Mandatory. Not embedding the font produces invalid PDF documents.</td>
+          </tr>
+        </table>
+        <warning>
+          You may experience failures with certain TrueType fonts, especially if they don't contain 
+          the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this.
+        </warning>
+      </section>
+      <section id="truetype-collections-metrics">
+        <title>TrueType Collections</title>
+        <p>TrueType collections (.ttc files) contain more than one font.
+          To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader.</p>
+        <p>To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
+          It will display all of the font names and exit with an Exception.</p>
+        <p>Here is an example of generating a metrics file for a .ttc file:</p>
+        <source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
+          org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho"
+          msmincho.ttc msminch.xml</source>
+        <p>
+          Alternatively, the individual sub-fonts of a TrueType Collections can be selected
+          using the "sub-font" attribute on the "font" element. That means that generating
+          an XML font metrics file for TrueType collections is not necessary anymore. Example:
+        </p>
+        <source><![CDATA[<font embed-url="gulim.ttc" sub-font="GulimChe">
+  <font-triplet name="GulimChe" style="normal" weight="normal"/>
+</font>]]></source>
+      </section>
+      <section id="register">
+        <title>Register Fonts with FOP</title>
+        <p>You must tell FOP how to find and use the font metrics files by registering them in the <a href="configuration.html">FOP Configuration</a>. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:</p>
+        <source><![CDATA[
+<renderers>
+   <renderer mime="application/pdf">
+      <fonts>
+         <!-- register a particular font -->
+         <font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
+           embed-url="file:///C:/myfonts/FTL_____.pfb"
+           encoding-mode="single-byte">
+            <font-triplet name="FrutigerLight" style="normal" weight="normal"/>
+         </font>
+  
+         <!-- register all the fonts found in a directory -->
+         <directory>C:\MyFonts1</directory>
+  
+         <!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
+         <directory recursive="true">C:\MyFonts2</directory>
+
+         <!-- automatically detect operating system installed fonts -->
+         <auto-detect/>  
+      </fonts>
+   </renderer>
+</renderers>]]></source>
+        <ul>
+          <li>
+            URLs are used to access the font metric and font files.
+            Relative URLs are resolved relative to the font-base property (or base) if available.
+            See <a href="configuration.html">FOP: Configuration</a> for more information.
+          </li>
+          <li>The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.</li>
+          <li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
+          <li>The font "kerning" attribute is optional. Default is "true".</li>
+          <li>If embedding is off (i.e. embed-url is not set), the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
+          <li>When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.</li>
+          <li>The attribute "encoding-mode" is optional an may have the following values:
+            <ul>
+              <li>auto: default font encoding mode ("cid" for Truetype, "single-byte" for Type 1)</li>
+              <li>single-byte: use single-byte encodings in the target format (if applicable)</li>
+              <li>cid: encode as CID-keyed font (currently only supported for PDF output with TrueType fonts)</li>
+            </ul>
+          </li>
+          <li>The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths.  The "recursive" attribute can be specified to recursively add fonts from all sub directories.</li>
+          <li>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.</li>
+          <li>Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.</li>
+          <li>Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.</li>
+          <li>
+            If relative URLs are specified, they are evaluated relative to the value of the 
+            "font-base" setting. If there is no "font-base" setting, the fonts are evaluated 
+            relative to the base directory.
+          </li>
+        </ul>
+<!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
+      </section>
+      <section id="autodetect">
+        <title>Auto-Detect and auto-embed feature</title>
+        <p>When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.</p>
+        <p>FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:</p>
+        <source>Manifest-Version: 1.0
+          
+          Name: font/myfont.ttf
+          Content-Type: application/x-font</source>
+        <p>This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.</p>
+        <section id="font-cache">
+          <title>The font cache</title>
+          <p>
+            Apache FOP maintains a cache file that is used to speed up auto-detection. This file
+            is usually found in the ".fop" directory under the user's home directory. It's called
+            "fop-fonts.cache". When the user's home directory is not writable, the font cache file
+            is put in the directory for temporary files.
+          </p>
+          <p>
+            If there was a problem loading a particular font, it is flagged in the cache file so
+            it is not loaded anymore. So, if a font is actually around but is still not found
+            by Apache FOP, it's worth a try to delete the font cache file which forces Apache FOP
+            to reparse all fonts.
+          </p>
+        </section>
+      </section>
+      <section id="embedding">
+        <title>Embedding</title>
+        <p>
+          By default, all fonts are embedded if an output format supports font embedding. In some
+          cases, however, it is preferred that some fonts are only referenced. When working
+          with referenced fonts it is important to be in control of the target environment where
+          the produced document is consumed, i.e. the necessary fonts have to be installed there.
+        </p>
+        <p>
+          There are two different ways how you can specify that a font should be referenced:
+        </p>
+        <ol>
+          <li>
+            When using the old-style "font" element to configure a single font, font referencing
+            is controlled by the embed-url attribute. If you don't specify the embed-url attribute
+            the font will not be embedded, but will only be referenced.
+          </li>
+          <li>
+            For automatically configured fonts there's a different mechanism to specify which
+            fonts should be referenced rather than embedded. This is done in the "referenced-fonts"
+            element in the configuration. Here's an example:
+          </li>
+        </ol>
+        <source><![CDATA[
+<fop version="1.0">
+   <fonts>
+      <referenced-fonts>
+        <match font-family="Helvetica"/>
+        <match font-family="DejaVu.*"/>
+      </referenced-fonts>
+   </fonts>
+</fop>]]></source>
+        <p>
+          At the moment, you can only match fonts against their font-family. It is possible to use
+          regular expressions as is shown in the second example above ("DejaVu.*"). The syntax for
+          the regular expressions used here are the one used by the
+          <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html"><code>java.util.regex</code> package</a>.
+          So, in the above snippet "Helvetica" and all variants of the "DejaVu" font family are
+          referenced. If you want to reference all fonts, just specify <code>font-family=".*"</code>.
+        </p>
+        <p>
+          The <code>referenced-fonts</code> element can be placed either inside the general
+          <code>fonts</code> element (right under the root) or in the <code>fonts</code> element
+          under the renderer configuration. In the first case, matches apply to all renderers.
+          In the second case, matches only apply to the renderer where the element was specified.
+          Both cases can be used at the same time.
+        </p>
+        <p>
+          Various notes related to embedded fonts:
+        </p>
+        <ul>
+          <li>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</li>
+          <li>The font is simply embedded into the PDF file, it is not converted.</li>
+          <li>When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
+            This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</li>
+          <li>When embedding PostScript fonts, the entire font is always embedded.</li>
+          <li>When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the
+          original font, containing only the glyphs used, is embedded in the output document.
+          That's the default, but if you specify encoding-mode="single-byte" (see above), the
+          complete font is embedded.</li>
+        </ul>
+      </section>
+      <section id="substitution">
+        <title>Substitution</title>
+        <p>When a &lt;substitutions/&gt; section is defined in the configuration, FOP will re-map any font-family references found in your FO input to a given substitution font.</p>
+        <ul>
+          <li>If a &lt;substitution/&gt; is declared, it is mandatory that both a &lt;from/&gt; and &lt;to/&gt; child element is declared with a font-family attribute.</li>
+          <li>Both font-weight and font-style are optional attributes, if they are provided then a value of 'normal' is assumed.</li>
+        </ul>
+        <p>For example you could make all FO font-family references to 'Arial' with weights between 700 and 900 reference the normal 'Arial Black' font.</p>
+        <source><![CDATA[
+<fop version="1.0">
+   <fonts>
+      <substitutions>
+         <substitution>
+            <from font-family="Arial" font-weight="700..900"/>
+            <to font-family="Arial Black"/>
+         </substitution>
+         <substitution>
+            <from font-family="FrutigerLight"/>
+            <to font-family="Times" font-weight="bold" font-style="italic"/>
+         </substitution>
+      </substitutions>
+   </fonts>
+</fop>]]></source>
+      </section>
+<!-- The following section should no longer be required
+      <section id="embedding-base14">
+        <title>Explicitly embedding the base 14 fonts</title>
+        <p>
+          There are cases where you might want to force the embedding of one or more of the base 14 fonts that
+          can normally be considered available on the target platform (viewer, printer). One of these cases is
+          <a href="pdfa.html">PDF/A</a> which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
+          Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a 
+          problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
+          the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
+          PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
+          and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
+          or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
+        </p>
+        <p>Example:</p>
+        <source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<font-metrics type="TYPE1">
+  <font-name>Symbol</font-name>
+  <embed/>
+  <encoding>SymbolEncoding</encoding>
+  <cap-height>673</cap-height>
+  <x-height>766</x-height>
+  [..]]]></source>
+      </section-->
+    </section>
+    <section id="selection">
+      <title>Font Selection Strategies</title>
+      <p>
+          There are two font selection strategies: character-by-character or auto. The default is auto.</p>
+      <p>Auto selected the first font from the list which is able to display the most characters in a given word. This means (assume font A has characters for abclmn, font B for lnmxyz, fontlist is A,B):</p>
+      <ul>
+        <li>aaa lll xxx would be displayed in fonts A A B</li>
+        <li>aaaxx would be displayed in font A</li>
+        <li>aaaxxx would be displayed in font A</li>
+        <li>aaaxxxx would be displayed in font B</li>
+      </ul>
+      <p>Character-by-Character is NOT yet supported!</p>
+    </section>
+    <section id="font-list">
+      <title>Font List Command-Line Tool</title>
+      <p>
+        FOP contains a small command-line tool that lets you generate a list of all configured
+        fonts. Its class name is: <code>org.apache.fop.tools.fontlist.FontListMain</code>.
+        Run it with the "-?" parameter to get help for the various options.
+      </p>
+    </section>
+  </body>
+</document>
\ No newline at end of file

Added: xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fotree/disabled-testcases.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fotree/disabled-testcases.xml?rev=1357814&view=auto
==============================================================================
--- xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fotree/disabled-testcases.xml (added)
+++ xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/fotree/disabled-testcases.xml Thu Jul  5 19:15:13 2012
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<disabled-testcases>
+  <testcase>
+    <name>demo test failure</name>
+    <file>demo-test-failure.fo</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>Markers and core function evaluation</name>
+    <file>from-table-column_marker.fo</file>
+    <description>The code currently evaluates this function according to the column in which the 
+    marker appears in the source document, rather than the column it is retrieved in.</description>
+  </testcase>
+</disabled-testcases>

Added: xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/graphics.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/graphics.xml?rev=1357814&view=auto
==============================================================================
--- xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/graphics.xml (added)
+++ xmlgraphics/fop/branches/fop-1_1/src/documentation/content/xdocs/1.1rc1/graphics.xml Thu Jul  5 19:15:13 2012
@@ -0,0 +1,590 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+  <header>
+    <title>Apache™ FOP: Graphics Formats</title>
+    <version>$Revision$</version>
+  </header>
+  <body>
+    <section id="introduction">
+      <title>Introduction</title>
+      <p>
+        Some noteworthy features of the image handling subsystem are:
+      </p>
+      <ul>
+        <li>
+          The image libraries Jimi and JAI are not supported. Instead, Apache™ FOP uses the
+          Image I/O API that was introduced with Java 1.4 for all bitmap codecs.
+        </li>
+        <li>
+          Some bitmap images are not converted to a standardized 24 bit RGB image but are
+          instead handled in their native format.
+        </li>
+        <li>
+          A plug-in mechanism offers a possibility to add support for new formats without changing
+          the FOP's source code.
+        </li>
+      </ul>
+      <p>
+        The actual <a href="http://xmlgraphics.apache.org/commons/image-loader.html">image loading framework</a>
+        does not reside in Apache FOP, but in
+        <a href="ext:xmlgraphics.apache.org/commons/">XML Graphics Commons</a>.
+      </p>
+    </section>
+    <section id="support-overview">
+      <title>Overview of Graphics Support</title>
+      <p>
+        The table below summarizes the <em>theoretical</em> support for graphical formats
+        within FOP. In other words, within the constraints of the limitations listed here,
+        these formats <em>should</em> work. However, many of them have not been tested,
+        and there may be limitations that have not yet been discovered or documented.
+        The packages needed to support some formats are not included in the FOP distribution
+        and must be installed separately. Follow the links in the "Support Through" columns
+        for more details.
+      </p>
+      <table>
+        <tr>
+          <th rowspan="2">Format</th>
+          <th rowspan="2">Type</th>
+          <th colspan="3">Support Through</th>
+        </tr>
+        <tr>
+          <th><a href="#native">Apache FOP (native)</a></th>
+          <th><a href="#batik">Apache Batik</a></th>
+          <th><a href="#imageio">Image I/O</a></th>
+        </tr>
+        <tr>
+          <td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+          <td>bitmap</td>
+          <td/>
+          <td/>
+          <td>X [1]</td>
+        </tr>
+        <tr>
+          <td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+          <td>vector (with embedded bitmaps)</td>
+          <td>(X)</td>
+          <td/>
+          <td/>
+        </tr>
+        <tr>
+          <td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+          <td>metafile (both bitmap and vector), most frequently used for vector drawings</td>
+          <td>(X)</td>
+          <td/>
+          <td/>
+        </tr>
+        <tr>
+          <td>GIF (Graphics Interchange Format)</td>
+          <td>bitmap</td>
+          <td/>
+          <td/>
+          <td>X</td>
+        </tr>
+        <tr>
+          <td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+          <td>bitmap</td>
+          <td>(X)</td>
+          <td/>
+          <td>X</td>
+        </tr>
+        <tr>
+          <td><a href="#png">PNG</a> (Portable Network Graphic)</td>
+          <td>bitmap</td>
+          <td/>
+          <td/>
+          <td>X</td>
+        </tr>
+        <tr>
+          <td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+          <td>vector (with embedded bitmaps)</td>
+          <td/>
+          <td>X</td>
+          <td/>
+        </tr>
+        <tr>
+          <td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+          <td>bitmap</td>
+          <td>(X)</td>
+          <td/>
+          <td>X [1]</td>
+        </tr>
+        <tr>
+          <td><a href="#wmf">WMF</a> (Windows Metafile)</td>
+          <td>vector (with embedded bitmaps)</td>
+          <td/>
+          <td>(X)</td>
+          <td/>
+        </tr>
+      </table>
+      <p>
+        Legend:
+      </p>
+      <ul>
+        <li>"(X)" means restricted support. Please see the details below.</li>
+        <li>
+          [1]: Requires the presence of <a href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a>
+          (or an equivalent Image I/O compatible codec) in the classpath. JAI Image I/O Tools also
+          adds support for JPEG 2000, WBMP, RAW and PNM. Other Image I/O codecs may provide
+          support for additional formats.
+        </li>
+      </ul>
+      <note>
+        <a href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a> is not the same as the
+        <a href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</a>! The
+        former simply exposes JAI's codecs using the Image&amp;nbsp;I/O API but does not include all
+        the image manipulation functionality.
+      </note>
+      <section id="format-map">
+        <title>Map of supported image formats by output format</title>
+        <p>
+          Not all image formats are supported for all output formats! For example, while you can
+          use EPS (Encapsulated PostScript) files when you generate PostScript output, this format
+          will not be supported by any other output format. Here's an overview of which image
+          formats are supported by which output format:
+        </p>
+        <table>
+          <tr>
+            <th>Image Format</th>
+            <th>PDF</th>
+            <th>PostScript</th>
+            <th>Java2D, PNG, TIFF, AWT</th>
+            <th>PCL</th>
+            <th>AFP</th>
+            <th>RTF</th>
+          </tr>
+          <tr>
+            <td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+            <td/>
+            <td/>
+            <td/>
+            <td/>
+            <td/>
+            <td>X [1]</td>
+          </tr>
+          <tr>
+            <td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+            <td/>
+            <td>X [1]</td>
+            <td/>
+            <td/>
+            <td/>
+            <td/>
+          </tr>
+          <tr>
+            <td>GIF (Graphics Interchange Format)</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+            <td>X [1]</td>
+            <td>X [1]</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X [1]</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#png">PNG</a> (Portable Network Graphic)</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+            <td>X [2]</td>
+            <td>X [2]</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X [2]</td>
+            <td>X</td>
+          </tr>
+          <tr>
+            <td><a href="#wmf">WMF</a> (Windows Metafile)</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+            <td>X</td>
+          </tr>
+        </table>
+        <p>
+          Legend:
+        </p>
+        <ul>
+          <li>
+            [1]: Supported without the need to decode the image.
+          </li>
+          <li>
+            [2]: Supported without the need to decode the image, but only for certain subtypes.
+          </li>
+        </ul>
+      </section>
+    </section>
+    <section id="packages">
+      <title>Graphics Packages</title>
+      <section id="native">
+        <title>XML Graphics Commons Native</title>
+        <p>
+          <a href="ext:xmlgraphics.apache.org/commons">XML Graphics Commons</a> supports a number
+          of graphic file formats natively as basic functionality: all bitmap formats for which
+          there are Image I/O codecs available (JPEG, PNG, GIF, TIFF, etc.), EPS and EMF.
+        </p>
+      </section>
+      <section id="fop-native">
+        <title>FOP Native</title>
+        <p>
+          FOP has no native image plug-ins for the image loading framework of its own but currently
+          hosts the Batik-dependent SVG and WMF plug-ins until they can be moved to
+          <a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>.
+        </p>
+      </section>
+      <section id="batik">
+        <title>Apache Batik</title>
+        <p>
+          <a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a> will later receive the
+          SVG and WMF plug-ins for the image loading framework that are currently hosted inside
+          FOP.
+        </p>
+        <p>
+          Current FOP distributions include a distribution of the
+          <a class="fork" href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>.
+          Because Batik's API changes frequently, it is highly recommended that you use the
+          version that ships with FOP, at least when running FOP.
+        </p>
+        <warning>Batik must be run in a graphical environment.</warning>
+        <p>
+          Batik must be run in a graphical environment.
+          It uses AWT classes for rendering SVG, which in turn require an X server on Unixish
+          systems. If you run a server without X, or if you can't connect to the X server due to
+          security restrictions or policies (a so-called "headless" environment), SVG rendering
+          will fail.
+        </p>
+        <p>Here are some workarounds:</p>
+        <ul>
+          <li>
+            Start Java with the <code>-Djava.awt.headless=true</code> command line option.
+          </li>
+          <li>
+            Install an X server which provides an in-memory framebuffer without actually using a
+            screen device or any display hardware. One example is Xvfb.
+          </li>
+          <li>
+            Install a toolkit which emulates AWT without the need for an underlying X server. One
+            example is the <a href="http://www.eteks.com/pja/en">PJA toolkit</a>, which is free
+            and comes with detailed installation instructions.
+          </li>
+        </ul>
+      </section>
+      <section id="imageio">
+        <title>Image I/O</title>
+        <p>
+          The image loading framework in <a href="ext:xmlgraphics.apache.org/commons">XML Graphics Commons</a>
+          provides a wrapper to load images through the 
+          <a class="fork" href="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/index.html">JDK's Image I/O API</a> (JSR 015).
+          Image I/O allows to dynamically add additional image codecs. An example of such an
+          add-on library are the
+          <a class="fork" href="http://java.sun.com/products/java-media/jai/">JAI Image I/O Tools</a>
+          available from Sun.
+        </p>
+      </section>
+    </section>
+    <section id="image-formats">
+      <title>Details on image formats</title>
+      <section id="bmp">
+        <title>BMP</title>
+        <p>
+          BMP images are supported through an Image I/O codec. There may be limitations of the
+          codec which are outside the control of Apache FOP.
+        </p>
+      </section>
+      <section id="emf">
+        <title>EMF</title>
+        <p>
+          Windows Enhanced Metafiles (EMF) are only supported in RTF output where they are
+          embedded without decoding.
+        </p>
+      </section>
+      <section id="eps">
+        <title>EPS</title>
+        <p>Apache FOP allows to use EPS files when generating PostScript output only.</p>
+        <p>
+          Other output targets can't be supported at the moment because
+          FOP lacks a PostScript interpreter. Furthermore, FOP is currently not able
+          to parse the preview bitmaps sometimes contained in EPS files.
+        </p>
+      </section>
+      <section id="gif">
+        <title>GIF</title>
+        <p>
+          GIF images are supported through an Image&amp;nbsp;I/O codec. Transparency is supported but
+          not guaranteed to work with every output format.
+        </p>
+      </section>
+      <section id="jpeg">
+        <title>JPEG</title>
+        <p>
+          FOP native support (i.e. the handling of undecoded images) of JPEG does not include all
+          variants, especially those containing unusual color lookup tables and color profiles.
+          If you have trouble with a JPEG image in FOP, try opening it with an image processing 
+          program (such as Photoshop or Gimp) and then saving it. Specifying 24-bit color output 
+          may also help. For the PDF and PostScript renderers most JPEG images can be passed 
+          through without decompression. User reports indicate that grayscale, RGB, and 
+          CMYK color spaces are all rendered properly. However, for other output formats, the
+          JPEG images have to be decompressed. Tests have shown that there are some limitation
+          in some Image&amp;nbsp;I/O codecs concerning images in the CMYK color space. Work-arounds are
+          in place but may not always work as expected.
+        </p>
+      </section>
+      <section id="png">
+        <title>PNG</title>
+        <p>
+          PNG images are supported through an Image&amp;nbsp;I/O codec. Transparency is supported but
+          not guaranteed to work with every output format.
+        </p>
+      </section>
+      <section id="svg">
+        <title>SVG</title>
+        <section id="svg-intro">
+          <title>Introduction</title>
+          <p>FOP uses <a href="#batik"> Apache Batik</a> for SVG support.
+            This format can be handled as an <code>fo:instream-foreign-object</code> or in a separate
+            file referenced with <code>fo:external-graphic</code>.</p>
+          <note>   
+            Batik's SVG Rasterizer utility may also be used to convert standalone SVG
+            documents into PDF.  For more information please see the
+            <a href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</a>
+            on the Batik site.
+          </note>
+        </section>
+        <section id="svg-pdf-graphics">
+          <title>Placing SVG Graphics into PDF</title>
+          <p>
+            The SVG is rendered into PDF by using PDF commands to draw and fill
+            lines and curves. This means that the graphical objects created with
+            this remain as vector graphics. The same applies to PostScript output.
+            For other output formats the SVG graphic may be converted to a bitmap
+            image.
+          </p>
+          <p>
+            There are a number of SVG things that cannot be converted directly into
+            PDF. Parts of the graphic such as effects, patterns and images are inserted
+            into the PDF as a raster graphic. The resolution of these raster images can
+            be controlled through the "target resolution" setting in the 
+            <a href="configuration.html">configuration</a>.</p>
+          <p>
+            Currently transparency is limited in PDF so some SVG images that
+            contain effects or graphics with transparent areas may not be displayed
+            correctly.
+          </p>
+        </section>
+        <section id="svg-pdf-text">
+          <title>Placing SVG Text into PDF and PostScript</title>
+          <p>If possible, Batik will use normal PDF or PostScript text when inserting text. It does
+            this by checking if the text can be drawn normally and the font is
+            supported. This example svg <a href="../dev/svg/text.svg">text.svg</a> /
+            <a href="../dev/svg/text.pdf">text.pdf</a> / <a href="../dev/svg/text.png">text.png</a>
+            shows how various types and effects with text are handled.
+            Note that SVG font support is not yet implemented. Furthermore, text handling in
+            PostScript output is inferior to PDF output - more text will be painted as shapes in
+            PS than in PDF.
+          </p>
+          <p>
+            When there's no support to paint text using native text operations,
+            text is converted and drawn as a set of shapes by Batik, using the
+            stroking text painter. This means that a typical character will
+            have about 10 curves (each curve consists of at least 20 characters).
+            This can make the output files large and when it is viewed the
+            viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on
+            "Smooth Line Art" in the preferences will fix this). Copy/paste functionality
+            will not be supported in this case.
+            If the text is inserted into the output file using the inbuilt text commands
+            it will use a single character.
+          </p>
+          <p>
+            Note that because SVG text can be rendered as either text or a vector graphic, you 
+            may need to consider settings in your viewer for both. The Acrobat viewer has both 
+            "smooth line art" and "smooth text" settings that may need to be set for SVG images 
+            to be displayed nicely on your screen (see Edit / Preferences / Display).
+            This setting will not affect the printing of your document, which should be OK in 
+            any case, but will only affect the quality of the screen display.
+          </p>
+        </section>
+        <section id="svg-font-selection">
+          <title>Font selection notes</title>
+          <p>
+            Apache Batik uses the AWT/Java2D subsystem as font source while FOP has its own font
+            subsystem. Great care has been taken that font selection does the best possible choices.
+            But it must be noted when creating PDF or PostScript that a font used in SVG graphics
+            needs to be registered with the operating system as well as in FOP's configuration.
+            By using FOP's font auto-detection, you simply have to install the font in the operating
+            system and not care about anything else. This is less of an issue if you create
+            formats like TIFFs, PNGs or PCL because in these cases SVG graphics are usually rendered
+            to bitmaps which means that on both sides (Batik and FOP), AWT/Java2D is used as the
+            single font source.
+          </p>
+          <p>
+            Whenever an SVG is converted into a PDF or PostScript file, the font that has been used
+            inside Batik has to be mapped to a font used by the actual output format. Features like
+            font substitution in FOP may need to be taken into account but can also be an advantage
+            when working around font mapping issues. Like for XSL-FO content, you'll get a warning
+            if a particular font could not be found and had to be substituted, or if a particular
+            glyph is missing in a font.
+          </p> 
+        </section>
+        <section id="svg-scaling">
+          <title>Scaling</title>
+          <p>
+            Currently, SVG images are rendered with the dimensions specified <em>in the SVG 
+              file</em>, within the viewport specified in the fo:external-graphic element.
+            For everything to work properly, the two should be equal. The SVG standard leaves 
+            this issue as an implementation detail. Additional scaling options are available
+            through XSL-FO means.
+          </p>
+          <p>
+            If you use pixels to specify the size of an SVG graphic the "source resolution" setting
+            in the <a href="configuration.html">configuration</a> will be used to determine the
+            size of a pixel. The use of pixels to specify sizes is discouraged as they may
+            be interpreted differently in different environments.
+          </p>
+        </section>
+        <section id="svg-problems">
+          <title>Known Problems</title>
+          <ul>
+            <li>
+              Soft mask transparency is combined with white so that it looks better
+              on PDF 1.3 viewers but this causes the soft mask to be slightly lighter
+              or darker on PDF 1.4 viewers.
+            </li>
+            <li>
+              There is some problem with a gradient inside a pattern which may cause a PDF
+              error when viewed in Acrobat 5.
+            </li>
+            <li>
+              Text is not always handled correctly, it may select the wrong font
+              especially if characters have multiple fonts in the font list.
+            </li>
+            <li>
+              Uniform transparency for images and other SVG elements that are converted
+              into a raster graphic are not drawn properly in PDF. The image is opaque.
+            </li>
+          </ul>
+        </section>
+      </section>
+      <section id="tiff">
+        <title>TIFF</title>
+        <p>
+          FOP can embed TIFF images without decompression into PDF, PostScript and AFP if they
+          have either CCITT T.4, CCITT T.6, or JPEG compression. Otherwise, a TIFF-capable
+          Image&amp;nbsp;I/O codec is necessary for decoding the image.
+        </p>
+        <p>
+          There may be some limitation concerning images in the CMYK color space.
+        </p>
+      </section>
+      <section id="wmf">
+        <title>WMF</title>
+        <p>
+          Windows Metafiles (WMF) are supported through classes in 
+          <a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>. At the moment, support
+          for this format is experimental and may not always work as expected.
+        </p>
+      </section>
+    </section>
+    <section id="resolution">
+      <title>Graphics Resolution</title>
+      <p>
+        Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution 
+        values. FOP tries to use this resolution information whenever possible to determine
+        the image's intrinsic size. This size is used during the layout process when it is not
+        superseded by an explicit size on fo:external-graphic (content-width and content-height 
+        properties).
+      </p>
+      <p>
+        Please note that not all images contain resolution information. If it's not available
+        the source resolution set on the FopFactory (or through the user configuration XML) is used.
+        The default here is 72 dpi.
+      </p>
+      <p>
+        Bitmap images are generally embedded into the output format at their original resolution
+        (as is). No resampling of the image is performed. Explicit resampling is on our wishlist, 
+        but hasn't been implemented, yet. Bitmaps included in SVG graphics may be resampled to 
+        the resolution specified in the "target resolution" setting in the 
+        <a href="configuration.html">configuration</a> if SVG filters are applied. This can be
+        used as a work-around to resample images in FO documents. 
+      </p>
+    </section>
+    <section id="page-selection">
+      <title>Page selection for multi-page formats</title>
+      <p>
+        Some image formats such as TIFF support multiple pages/sub-images per file. You can
+        select a particular page using a special URI fragment in the form:
+        &lt;uri&gt;#page=&lt;nr&gt;
+        (for example: <code>http://localhost/images/myimage.tiff#page=3</code>)
+      </p>
+    </section>
+    <section id="caching">
+      <title>Image caching</title>
+      <p>
+        FOP caches images between runs. There is one cache per FopFactory instance. The URI is 
+        used as a key to identify images which means that when a particular URI appears again, 
+        the image is taken from the cache. If you have a servlet that generates a different 
+        image each time it is called with the same URI you need to use a constantly 
+        changing dummy parameter on the URI to avoid caching.
+      </p>
+      <p>
+        The image cache has been improved considerably in the redesigned code. Therefore,
+        resetting the image cache should be a thing of the past. If you 
+        still experience OutOfMemoryErrors, please notify us.
+      </p>
+      <p>
+        If all else fails, the image cache can be cleared like this:
+        <code>fopFactory.getImageManager().getCache().clearCache();</code>
+      </p>
+    </section>
+  </body>
+</document>
\ No newline at end of file



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