You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by vh...@apache.org on 2008/03/25 13:50:16 UTC
svn commit: r640791 [7/15] - in /xmlgraphics/site/deploy/fop: ./ 0.94/ 0.95/
0.95/images/ images/ skin/
Added: xmlgraphics/site/deploy/fop/0.95/graphics.html
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/0.95/graphics.html?rev=640791&view=auto
==============================================================================
--- xmlgraphics/site/deploy/fop/0.95/graphics.html (added)
+++ xmlgraphics/site/deploy/fop/0.95/graphics.html Tue Mar 25 05:49:51 2008
@@ -0,0 +1,936 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9-dev">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Apache FOP: Graphics Formats</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+ |header
+ +-->
+<div class="header">
+<!--+
+ |start group logo
+ +-->
+<div class="grouplogo">
+<a href="http://xmlgraphics.apache.org/"><img class="logoImage" alt="Apache XML Graphics" src="../images/group-logo.gif" title="Apache XML Graphics is responsible for the creation and maintenance of software for managing the conversion of XML formats to graphical output, and the creation and maintenance of related software components, based on software licensed to the Foundation"></a>
+</div>
+<!--+
+ |end group logo
+ +-->
+<!--+
+ |start Project Logo
+ +-->
+<div class="projectlogo">
+<a href="http://xmlgraphics.apache.org/fop/"><img class="logoImage" alt="Apache FOP" src="../images/logo.jpg" title="Apache FOP (Formatting Objects Processor) is the world's first output independent formatter. Output formats currently supported include PDF, PCL, PS, SVG, XML (area tree representation), Print, AWT, MIF and TXT. The primary output target is PDF."></a>
+</div>
+<!--+
+ |end Project Logo
+ +-->
+<!--+
+ |start Search
+ +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">
+ <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+ |end search
+ +-->
+<!--+
+ |start Tabs
+ +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../0.94/index.html">Version 0.94</a>
+</li>
+<li class="current">
+<a class="selected" href="../0.95/index.html">Version 0.95beta</a>
+</li>
+<li>
+<a class="unselected" href="../trunk/index.html">FOP Trunk</a>
+</li>
+<li>
+<a class="unselected" href="../dev/index.html">Development</a>
+</li>
+</ul>
+<!--+
+ |end Tabs
+ +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+ |start Subtabs
+ +-->
+<div id="level2tabs"></div>
+<!--+
+ |end Endtabs
+ +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+// --></script>
+</div>
+<!--+
+ |breadtrail
+ +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache.org</a> > <a href="http://xml.apache.org/">XML Federation</a> > <a href="http://xmlgraphics.apache.org/">xmlgraphics.apache.org</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+ |start Menu, mainarea
+ +-->
+<!--+
+ |start Menu
+ +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">FOP 0.95beta</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../0.95/index.html">About</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/releaseNotes_0.95beta.html">Release Notes</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/changes_0.95beta.html">Changes</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/knownissues_overview.html">Known Issues</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/upgrading.html">Upgrading</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.6', '../skin/')" id="menu_1.1.6Title" class="menutitle">Using FOP</div>
+<div id="menu_1.1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../0.95/compiling.html">Build</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/configuration.html">Configure</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/running.html">Run</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/embedding.html">Embed</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/servlets.html">Servlets</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/anttask.html">Ant Task</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.7', '../skin/')" id="menu_selected_1.1.7Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Features</div>
+<div id="menu_selected_1.1.7" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../0.95/output.html">Output Targets</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/intermediate.html">Intermediate Format</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfencryption.html">PDF Encryption</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfa.html">PDF/A</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfx.html">PDF/X</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Graphics</div>
+</div>
+<div class="menuitem">
+<a href="../0.95/fonts.html">Fonts</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/hyphenation.html">Hyphenation</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/extensions.html">Extensions</a>
+</div>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+ |alternative credits
+ +-->
+<div id="credit2">
+<a href="http://eu.apachecon.com/"><img border="0" title="ApacheCon Europe 2008" alt="ApacheCon Europe 2008 - logo" src="http://apache.org/ads/ApacheCon/2008-europe-125x125.png" style="width: 125px;height: 125px;"></a><a href="http://us.apachecon.com/"><img border="0" title="ApacheCon US 2008" alt="ApacheCon US 2008 - logo" src="http://apache.org/ads/ApacheCon/2008-usa-125x125.png" style="width: 125px;height: 125px;"></a>
+</div>
+</div>
+<!--+
+ |end Menu
+ +-->
+<!--+
+ |start content
+ +-->
+<div id="content">
+<div title="raw XML" class="xmllink">
+<a class="dida" href="graphics.xml"><img alt="XML - icon" src="../skin/images/xmldoc.gif" class="skin"><br>
+ XML</a>
+</div>
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="graphics.pdf"><img alt="PDF -icon" src="../skin/images/pdfdoc.gif" class="skin"><br>
+ PDF</a>
+</div>
+<div class="trail">Font size:
+ <input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">
+ <input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+ <input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Apache FOP: Graphics Formats</h1>
+<div id="front-matter">
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#support-overview">Overview of Graphics Support</a>
+<ul class="minitoc">
+<li>
+<a href="#format-map">Map of supported image formats by output format</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#packages">Graphics Packages</a>
+<ul class="minitoc">
+<li>
+<a href="#native">XML Graphics Commons Native</a>
+</li>
+<li>
+<a href="#fop-native">FOP Native</a>
+</li>
+<li>
+<a href="#batik">Apache Batik</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#image-formats">Details on image formats</a>
+<ul class="minitoc">
+<li>
+<a href="#bmp">BMP</a>
+</li>
+<li>
+<a href="#emf">EMF</a>
+</li>
+<li>
+<a href="#eps">EPS</a>
+</li>
+<li>
+<a href="#gif">GIF</a>
+</li>
+<li>
+<a href="#jpeg">JPEG</a>
+</li>
+<li>
+<a href="#png">PNG</a>
+</li>
+<li>
+<a href="#svg">SVG</a>
+<ul class="minitoc">
+<li>
+<a href="#svg-intro">Introduction</a>
+</li>
+<li>
+<a href="#svg-pdf-graphics">Placing SVG Graphics into PDF</a>
+</li>
+<li>
+<a href="#svg-pdf-text">Placing SVG Text into PDF and PostScript</a>
+</li>
+<li>
+<a href="#svg-scaling">Scaling</a>
+</li>
+<li>
+<a href="#svg-problems">Known Problems</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#tiff">TIFF</a>
+</li>
+<li>
+<a href="#wmf">WMF</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#resolution">Graphics Resolution</a>
+</li>
+<li>
+<a href="#page-selection">Page selection for multi-page formats</a>
+</li>
+<li>
+<a href="#caching">Image caching</a>
+</li>
+</ul>
+</div>
+</div>
+
+<a name="N10011"></a><a name="introduction"></a>
+<h2 class="underlined_10">Introduction</h2>
+<div class="section">
+<p>
+ After the Apache FOP 0.94 release, the image handling subsystem has been rewritten in
+ order to improve the range of supported images and image subtypes, to lower the
+ overall memory consumption when handling images, to produce smaller output files and to
+ increase the performance in certain areas. Of course, this causes a few changes most of
+ which the user will probably not notice. The most important changes are:
+ </p>
+<ul>
+
+<li>
+ The image libraries Jimi and JAI are no longer 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 no longer 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>
+ no longer resides in Apache FOP, but was instead placed in
+ <a href="http://xmlgraphics.apache.org/commons/">XML Graphics Commons</a>.
+ </p>
+</div>
+
+<a name="N10032"></a><a name="support-overview"></a>
+<h2 class="underlined_10">Overview of Graphics Support</h2>
+<div class="section">
+<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 class="ForrestTable" cellspacing="1" cellpadding="4">
+
+<tr>
+
+<th colspan="1" rowspan="2">Format</th>
+ <th colspan="1" rowspan="2">Type</th>
+ <th colspan="3" rowspan="1">Support Through</th>
+
+</tr>
+
+<tr>
+
+<th colspan="1" rowspan="1"><a href="#native">Apache FOP (native)</a></th>
+ <th colspan="1" rowspan="1"><a href="#batik">Apache Batik</a></th>
+ <th colspan="1" rowspan="1"><a href="#imageio">Image I/O</a></th>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X [1]</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+ <td colspan="1" rowspan="1">metafile (both bitmap and vector), most frequently used for vector drawings</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#png">PNG</a> (Portable Network Graphic)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1"></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X [1]</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#wmf">WMF</a> (Windows Metafile)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"></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 class="external" 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>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+
+<a class="external" href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a> is not the same as the
+ <a class="external" href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</a>! The
+ former simply exposes JAI's codecs using the Image I/O API but does not include all
+ the image manipulation functionality.
+ </div>
+</div>
+<a name="N1018D"></a><a name="format-map"></a>
+<h3 class="underlined_5">Map of supported image formats by output format</h3>
+<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 class="ForrestTable" cellspacing="1" cellpadding="4">
+
+<tr>
+
+<th colspan="1" rowspan="1">Image Format</th>
+ <th colspan="1" rowspan="1">PDF</th>
+ <th colspan="1" rowspan="1">PostScript</th>
+ <th colspan="1" rowspan="1">Java2D, PNG, TIFF, AWT</th>
+ <th colspan="1" rowspan="1">PCL</th>
+ <th colspan="1" rowspan="1">AFP</th>
+ <th colspan="1" rowspan="1">RTF</th>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X [1]</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+ <td colspan="1" rowspan="1"></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#png">PNG</a> (Portable Network Graphic)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"><a href="#wmf">WMF</a> (Windows Metafile)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">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>
+</div>
+
+<a name="N10331"></a><a name="packages"></a>
+<h2 class="underlined_10">Graphics Packages</h2>
+<div class="section">
+<a name="N10337"></a><a name="native"></a>
+<h3 class="underlined_5">XML Graphics Commons Native</h3>
+<p>
+
+<a href="http://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>
+<a name="N10345"></a><a name="fop-native"></a>
+<h3 class="underlined_5">FOP Native</h3>
+<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="http://xmlgraphics.apache.org/batik/">Apache Batik</a>.
+ </p>
+<a name="N10353"></a><a name="batik"></a>
+<h3 class="underlined_5">Apache Batik</h3>
+<p>
+
+<a href="http://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 target="_blank" class="fork" href="http://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>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">Batik must be run in a graphical environment.</div>
+</div>
+<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 <span class="codefrag">-Djava.awt.headless=true</span> 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 class="external" href="http://www.eteks.com/pja/en">PJA toolkit</a>, which is free
+ and comes with detailed installation instructions.
+ </li>
+
+</ul>
+</div>
+
+<a name="N10386"></a><a name="image-formats"></a>
+<h2 class="underlined_10">Details on image formats</h2>
+<div class="section">
+<a name="N1038C"></a><a name="bmp"></a>
+<h3 class="underlined_5">BMP</h3>
+<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>
+<a name="N10396"></a><a name="emf"></a>
+<h3 class="underlined_5">EMF</h3>
+<p>
+ Windows Enhanced Metafiles (EMF) are only supported in RTF output where they are
+ embedded without decoding.
+ </p>
+<a name="N103A0"></a><a name="eps"></a>
+<h3 class="underlined_5">EPS</h3>
+<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>
+<a name="N103AD"></a><a name="gif"></a>
+<h3 class="underlined_5">GIF</h3>
+<p>
+ GIF images are supported through an Image I/O codec. Transparency is supported but
+ not guaranteed to work with every output format.
+ </p>
+<a name="N103B7"></a><a name="jpeg"></a>
+<h3 class="underlined_5">JPEG</h3>
+<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 I/O codecs concerning images in the CMYK color space. Work-arounds are
+ in place but may not always work as expected.
+ </p>
+<a name="N103C1"></a><a name="png"></a>
+<h3 class="underlined_5">PNG</h3>
+<p>
+ PNG images are supported through an Image I/O codec. Transparency is supported but
+ not guaranteed to work with every output format.
+ </p>
+<a name="N103CB"></a><a name="svg"></a>
+<h3 class="underlined_5">SVG</h3>
+<a name="N103D1"></a><a name="svg-intro"></a>
+<h4>Introduction</h4>
+<p>FOP uses <a href="#batik"> Apache Batik</a> for SVG support.
+ This format can be handled as an <span class="codefrag">fo:instream-foreign-object</span> or in a separate
+ file referenced with <span class="codefrag">fo:external-graphic</span>.</p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+ 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.
+ </div>
+</div>
+<a name="N103EC"></a><a name="svg-pdf-graphics"></a>
+<h4>Placing SVG Graphics into PDF</h4>
+<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 many SVG images that
+ contain effects or graphics with transparent areas may not be displayed
+ correctly.
+ </p>
+<a name="N10400"></a><a name="svg-pdf-text"></a>
+<h4>Placing SVG Text into PDF and PostScript</h4>
+<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> /
+ <!--link href="../dev/svg/text.pdf"-->text.pdf<!--/link-->
+ shows how various types and effects with text are handled.
+ Note that tspan and outlined text are not yet implemented.</p>
+<p>
+ Otherwise, 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>
+<a name="N10418"></a><a name="svg-scaling"></a>
+<h4>Scaling</h4>
+<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>
+<a name="N1042C"></a><a name="svg-problems"></a>
+<h4>Known Problems</h4>
+<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>
+<a name="N10443"></a><a name="tiff"></a>
+<h3 class="underlined_5">TIFF</h3>
+<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 I/O codec is necessary for decoding the image.
+ </p>
+<p>
+ There may be some limitation concerning images in the CMYK color space.
+ </p>
+<a name="N10450"></a><a name="wmf"></a>
+<h3 class="underlined_5">WMF</h3>
+<p>
+ Windows Metafiles (WMF) are supported through classes in
+ <a href="http://xmlgraphics.apache.org/batik/">Apache Batik</a>. At the moment, support
+ for this format is experimental and may not always work as expected.
+ </p>
+</div>
+
+<a name="N1045F"></a><a name="resolution"></a>
+<h2 class="underlined_10">Graphics Resolution</h2>
+<div class="section">
+<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>
+</div>
+
+<a name="N10473"></a><a name="page-selection"></a>
+<h2 class="underlined_10">Page selection for multi-page formats</h2>
+<div class="section">
+<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:
+ <uri>#page=<nr>
+ (for example: <span class="codefrag">http://localhost/images/myimage.tiff#page=3</span>)
+ </p>
+</div>
+
+<a name="N10480"></a><a name="caching"></a>
+<h2 class="underlined_10">Image caching</h2>
+<div class="section">
+<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, a
+ resetCache() method like in earlier versions of FOP has become unnecessary. If you
+ still experience OutOfMemoryErrors, please notify us.
+ </p>
+</div>
+
+<span class="version">
+ version 632784</span>
+</div>
+<!--+
+ |end content
+ +-->
+<div class="clearboth"> </div>
+</div>
+<div id="footer">
+<!--+
+ |start bottomstrip
+ +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+// --></script>
+</div>
+<div class="copyright">
+ Copyright ©
+ 1999-2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+ |end bottomstrip
+ +-->
+</div>
+</body>
+</html>
Added: xmlgraphics/site/deploy/fop/0.95/graphics.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/0.95/graphics.pdf?rev=640791&view=auto
==============================================================================
Binary file - no diff available.
Propchange: xmlgraphics/site/deploy/fop/0.95/graphics.pdf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: xmlgraphics/site/deploy/fop/0.95/graphics.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/0.95/graphics.xml?rev=640791&view=auto
==============================================================================
--- xmlgraphics/site/deploy/fop/0.95/graphics.xml (added)
+++ xmlgraphics/site/deploy/fop/0.95/graphics.xml Tue Mar 25 05:49:51 2008
@@ -0,0 +1,548 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+ 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 V1.3//EN" "document-v13.dtd">
+<document>
+ <header>
+ <title>Apache FOP: Graphics Formats</title>
+ <version>$Revision$</version>
+ </header>
+ <body>
+ <section id="introduction">
+ <title>Introduction</title>
+ <p>
+ After the Apache FOP 0.94 release, the image handling subsystem has been rewritten in
+ order to improve the range of supported images and image subtypes, to lower the
+ overall memory consumption when handling images, to produce smaller output files and to
+ increase the performance in certain areas. Of course, this causes a few changes most of
+ which the user will probably not notice. The most important changes are:
+ </p>
+ <ul>
+ <li>
+ The image libraries Jimi and JAI are no longer 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 no longer 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 <link href="http://xmlgraphics.apache.org/commons/image-loader.html">image loading framework</link>
+ no longer resides in Apache FOP, but was instead placed in
+ <link href="ext:xmlgraphics.apache.org/commons/">XML Graphics Commons</link>.
+ </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" colspan="1">Format</th>
+ <th rowspan="2" colspan="1">Type</th>
+ <th colspan="3" rowspan="1">Support Through</th>
+ </tr>
+ <tr>
+ <th colspan="1" rowspan="1"><link href="#native">Apache FOP (native)</link></th>
+ <th colspan="1" rowspan="1"><link href="#batik">Apache Batik</link></th>
+ <th colspan="1" rowspan="1"><link href="#imageio">Image I/O</link></th>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#bmp">BMP</link> (Microsoft Windows Bitmap)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X [1]</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#emf">EMF</link> (Windows Enhanced Metafile)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#eps">EPS</link> (Encapsulated PostScript)</td>
+ <td colspan="1" rowspan="1">metafile (both bitmap and vector), most frequently used for vector drawings</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#jpeg">JPEG</link> (Joint Photographic Experts Group)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#png">PNG</link> (Portable Network Graphic)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#svg">SVG</link> (Scalable Vector Graphics)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1"/>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#tiff">TIFF</link> (Tag Image Format File)</td>
+ <td colspan="1" rowspan="1">bitmap</td>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X [1]</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#wmf">WMF</link> (Windows Metafile)</td>
+ <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">(X)</td>
+ <td colspan="1" rowspan="1"/>
+ </tr>
+ </table>
+ <p>
+ Legend:
+ </p>
+ <ul>
+ <li>"(X)" means restricted support. Please see the details below.</li>
+ <li>
+ [1]: Requires the presence of <link href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</link>
+ (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>
+ <link href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</link> is not the same as the
+ <link href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</link>! The
+ former simply exposes JAI's codecs using the Image�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 colspan="1" rowspan="1">Image Format</th>
+ <th colspan="1" rowspan="1">PDF</th>
+ <th colspan="1" rowspan="1">PostScript</th>
+ <th colspan="1" rowspan="1">Java2D, PNG, TIFF, AWT</th>
+ <th colspan="1" rowspan="1">PCL</th>
+ <th colspan="1" rowspan="1">AFP</th>
+ <th colspan="1" rowspan="1">RTF</th>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#bmp">BMP</link> (Microsoft Windows Bitmap)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#emf">EMF</link> (Windows Enhanced Metafile)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X [1]</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#eps">EPS</link> (Encapsulated PostScript)</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ <td colspan="1" rowspan="1"/>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#jpeg">JPEG</link> (Joint Photographic Experts Group)</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X [1]</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#png">PNG</link> (Portable Network Graphic)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#svg">SVG</link> (Scalable Vector Graphics)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#tiff">TIFF</link> (Tag Image Format File)</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X [2]</td>
+ <td colspan="1" rowspan="1">X</td>
+ </tr>
+ <tr>
+ <td colspan="1" rowspan="1"><link href="#wmf">WMF</link> (Windows Metafile)</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">X</td>
+ <td colspan="1" rowspan="1">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>
+ <link href="ext:xmlgraphics.apache.org/commons">XML Graphics Commons</link> 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
+ <link href="ext:xmlgraphics.apache.org/batik">Apache Batik</link>.
+ </p>
+ </section>
+ <section id="batik">
+ <title>Apache Batik</title>
+ <p>
+ <link href="ext:xmlgraphics.apache.org/batik">Apache Batik</link> 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
+ <link class="fork" href="ext:xmlgraphics.apache.org/batik">Apache Batik</link>.
+ 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 <link href="http://www.eteks.com/pja/en">PJA toolkit</link>, which is free
+ and comes with detailed installation instructions.
+ </li>
+ </ul>
+ </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�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�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�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 <link href="#batik"> Apache Batik</link> 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
+ <link href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</link>
+ 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
+ <link href="configuration.html">configuration</link>.</p>
+ <p>
+ Currently transparency is limited in PDF so many 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 <link href="../dev/svg/text.svg">text.svg</link> /
+ <!--link href="../dev/svg/text.pdf"-->text.pdf<!--/link-->
+ shows how various types and effects with text are handled.
+ Note that tspan and outlined text are not yet implemented.</p>
+ <p>
+ Otherwise, 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-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 <link href="configuration.html">configuration</link> 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�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
+ <link href="ext:xmlgraphics.apache.org/batik">Apache Batik</link>. 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
+ <link href="configuration.html">configuration</link> 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:
+ <uri>#page=<nr>
+ (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, a
+ resetCache() method like in earlier versions of FOP has become unnecessary. If you
+ still experience OutOfMemoryErrors, please notify us.
+ </p>
+ </section>
+ </body>
+</document>
Propchange: xmlgraphics/site/deploy/fop/0.95/graphics.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/site/deploy/fop/0.95/graphics.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/site/deploy/fop/0.95/hyphenation.html
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/0.95/hyphenation.html?rev=640791&view=auto
==============================================================================
--- xmlgraphics/site/deploy/fop/0.95/hyphenation.html (added)
+++ xmlgraphics/site/deploy/fop/0.95/hyphenation.html Tue Mar 25 05:49:51 2008
@@ -0,0 +1,514 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9-dev">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Apache FOP: Hyphenation</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+ |header
+ +-->
+<div class="header">
+<!--+
+ |start group logo
+ +-->
+<div class="grouplogo">
+<a href="http://xmlgraphics.apache.org/"><img class="logoImage" alt="Apache XML Graphics" src="../images/group-logo.gif" title="Apache XML Graphics is responsible for the creation and maintenance of software for managing the conversion of XML formats to graphical output, and the creation and maintenance of related software components, based on software licensed to the Foundation"></a>
+</div>
+<!--+
+ |end group logo
+ +-->
+<!--+
+ |start Project Logo
+ +-->
+<div class="projectlogo">
+<a href="http://xmlgraphics.apache.org/fop/"><img class="logoImage" alt="Apache FOP" src="../images/logo.jpg" title="Apache FOP (Formatting Objects Processor) is the world's first output independent formatter. Output formats currently supported include PDF, PCL, PS, SVG, XML (area tree representation), Print, AWT, MIF and TXT. The primary output target is PDF."></a>
+</div>
+<!--+
+ |end Project Logo
+ +-->
+<!--+
+ |start Search
+ +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">
+ <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+ |end search
+ +-->
+<!--+
+ |start Tabs
+ +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../0.94/index.html">Version 0.94</a>
+</li>
+<li class="current">
+<a class="selected" href="../0.95/index.html">Version 0.95beta</a>
+</li>
+<li>
+<a class="unselected" href="../trunk/index.html">FOP Trunk</a>
+</li>
+<li>
+<a class="unselected" href="../dev/index.html">Development</a>
+</li>
+</ul>
+<!--+
+ |end Tabs
+ +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+ |start Subtabs
+ +-->
+<div id="level2tabs"></div>
+<!--+
+ |end Endtabs
+ +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+// --></script>
+</div>
+<!--+
+ |breadtrail
+ +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache.org</a> > <a href="http://xml.apache.org/">XML Federation</a> > <a href="http://xmlgraphics.apache.org/">xmlgraphics.apache.org</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+ |start Menu, mainarea
+ +-->
+<!--+
+ |start Menu
+ +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">FOP 0.95beta</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../0.95/index.html">About</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/releaseNotes_0.95beta.html">Release Notes</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/changes_0.95beta.html">Changes</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/knownissues_overview.html">Known Issues</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/upgrading.html">Upgrading</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.6', '../skin/')" id="menu_1.1.6Title" class="menutitle">Using FOP</div>
+<div id="menu_1.1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../0.95/compiling.html">Build</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/configuration.html">Configure</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/running.html">Run</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/embedding.html">Embed</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/servlets.html">Servlets</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/anttask.html">Ant Task</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.7', '../skin/')" id="menu_selected_1.1.7Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Features</div>
+<div id="menu_selected_1.1.7" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../0.95/output.html">Output Targets</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/intermediate.html">Intermediate Format</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfencryption.html">PDF Encryption</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfa.html">PDF/A</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/pdfx.html">PDF/X</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/graphics.html">Graphics</a>
+</div>
+<div class="menuitem">
+<a href="../0.95/fonts.html">Fonts</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Hyphenation</div>
+</div>
+<div class="menuitem">
+<a href="../0.95/extensions.html">Extensions</a>
+</div>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+ |alternative credits
+ +-->
+<div id="credit2">
+<a href="http://eu.apachecon.com/"><img border="0" title="ApacheCon Europe 2008" alt="ApacheCon Europe 2008 - logo" src="http://apache.org/ads/ApacheCon/2008-europe-125x125.png" style="width: 125px;height: 125px;"></a><a href="http://us.apachecon.com/"><img border="0" title="ApacheCon US 2008" alt="ApacheCon US 2008 - logo" src="http://apache.org/ads/ApacheCon/2008-usa-125x125.png" style="width: 125px;height: 125px;"></a>
+</div>
+</div>
+<!--+
+ |end Menu
+ +-->
+<!--+
+ |start content
+ +-->
+<div id="content">
+<div title="raw XML" class="xmllink">
+<a class="dida" href="hyphenation.xml"><img alt="XML - icon" src="../skin/images/xmldoc.gif" class="skin"><br>
+ XML</a>
+</div>
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="hyphenation.pdf"><img alt="PDF -icon" src="../skin/images/pdfdoc.gif" class="skin"><br>
+ PDF</a>
+</div>
+<div class="trail">Font size:
+ <input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">
+ <input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+ <input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Apache FOP: Hyphenation</h1>
+<div id="front-matter">
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#support">Hyphenation Support</a>
+<ul class="minitoc">
+<li>
+<a href="#intro">Introduction</a>
+</li>
+<li>
+<a href="#license-issues">License Issues</a>
+</li>
+<li>
+<a href="#sources">Sources of Custom Hyphenation Pattern Files</a>
+</li>
+<li>
+<a href="#install">Installing Custom Hyphenation Patterns</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#patterns">Hyphenation Patterns</a>
+</li>
+</ul>
+</div>
+</div>
+
+<a name="N10011"></a><a name="support"></a>
+<h2 class="underlined_10">Hyphenation Support</h2>
+<div class="section">
+<a name="N10017"></a><a name="intro"></a>
+<h3 class="underlined_5">Introduction</h3>
+<p>FOP uses Liang's hyphenation algorithm, well known from TeX. It needs
+ language specific pattern and other data for operation.</p>
+<p>Because of <a href="#license-issues">licensing issues</a> (and for
+ convenience), all hyphenation patterns for FOP are made available through
+ the <a class="external" href="http://offo.sourceforge.net/hyphenation/index.html">Objects For
+ Formatting Objects</a> project.</p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">If you have made improvements to an existing FOP hyphenation pattern,
+ or if you have created one from scratch, please consider contributing these
+ to OFFO so that they can benefit other FOP users as well.
+ Please inquire on the <a href="../maillist.html#fop-user">FOP User
+ mailing list</a>.</div>
+</div>
+<a name="N10034"></a><a name="license-issues"></a>
+<h3 class="underlined_5">License Issues</h3>
+<p>Many of the hyphenation files distributed with TeX and its offspring are
+ licenced under the <a class="external" href="http://www.latex-project.org/lppl.html">LaTeX
+ Project Public License (LPPL)</a>, which prevents them from being
+ distributed with Apache software. The LPPL puts restrictions on file names
+ in redistributed derived works which we feel can't guarantee. Some
+ hyphenation pattern files have other or additional restrictions, for
+ example against use for commercial purposes.</p>
+<p>Although Apache FOP cannot redistribute hyphenation pattern files that do
+ not conform with its license scheme, that does not necessarily prevent users
+ from using such hyphenation patterns with FOP. However, it does place on
+ the user the responsibility for determining whether the user can rightly use
+ such hyphenation patterns under the hyphenation pattern license.</p>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">The user is responsible to settle license issues for hyphenation
+ pattern files that are obtained from non-Apache sources.</div>
+</div>
+<a name="N10049"></a><a name="sources"></a>
+<h3 class="underlined_5">Sources of Custom Hyphenation Pattern Files</h3>
+<p>The most important source of hyphenation pattern files is the
+ <a class="external" href="http://www.ctan.org/tex-archive/language/hyphenation/">CTAN TeX
+ Archive</a>.</p>
+<a name="N10058"></a><a name="install"></a>
+<h3 class="underlined_5">Installing Custom Hyphenation Patterns</h3>
+<p>To install a custom hyphenation pattern for use with FOP:</p>
+<ol>
+
+<li>Convert the TeX hyphenation pattern file to the FOP format. The FOP
+ format is an xml file conforming to the DTD found at
+ <span class="codefrag">{fop-dir}/hyph/hyphenation.dtd</span>.</li>
+
+<li>Name this new file following this schema:
+ <span class="codefrag">languageCode_countryCode.xml</span>. The country code is
+ optional, and should be used only if needed. For example:
+ <ul>
+
+<li>
+<span class="codefrag">en_US.xml</span> would be the file name for American
+ English hyphenation patterns.</li>
+
+<li>
+<span class="codefrag">it.xml</span> would be the file name for Italian
+ hyphenation patterns.</li>
+
+</ul>
+ The language and country codes must match the XSL-FO input, which
+ follows <a class="external" href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">ISO
+ 639</a> (languages) and <a class="external" href="http://www.ics.uci.edu/pub/ietf/http/related/iso3166.txt">ISO
+ 3166</a> (countries). NOTE: The ISO 639/ISO 3166 convention is that
+ language names are written in lower case, while country codes are written
+ in upper case. FOP does not check whether the language and country specified
+ in the FO source are actually from the current standard, but it relies
+ on it being two letter strings in a few places. So you can make up your
+ own codes for custom hyphenation patterns, but they should be two
+ letter strings too (patches for proper handling extensions are welcome)</li>
+
+<li>There are basically three ways to make the FOP-compatible hyphenation pattern
+ file(s) accessible to FOP:
+ <ul>
+
+<li>Download the precompiled JAR from <a class="external" href="http://offo.sourceforge.net/hyphenation/index.html">OFFO
+ </a> and place it either in the <span class="codefrag">{fop-dir}/lib</span> directory, or
+ in a directory of your choice (and append the full path to the JAR to
+ the environment variable <span class="codefrag">FOP_HYPHENATION_PATH</span>).</li>
+
+<li>Download the desired FOP-compatible hyphenation pattern file(s) from
+ <a class="external" href="http://offo.sourceforge.net/hyphenation/index.html">OFFO</a>,
+ and/or take your self created hyphenation pattern file(s),
+ <ul>
+
+<li>place them in the directory <span class="codefrag">{fop-dir}/hyph</span>, </li>
+
+<li>or place them in a directory of your choice and set the Ant variable
+ <span class="codefrag">user.hyph.dir</span> to point to that directory (in
+ <span class="codefrag">build-local.properties</span>),</li>
+
+</ul>
+ and run Ant with build target
+ <span class="codefrag">jar-hyphenation</span>. This will create a JAR containing the
+ compiled patterns in <span class="codefrag">{fop-dir}/build</span> that will be added to the
+ classpath on the next run.
+ (When FOP is built from scratch, and there are pattern source file(s)
+ present in the directory pointed to by the
+ <span class="codefrag">user.hyph.dir</span> variable, this JAR will automatically
+ be created from the supplied pattern(s)).</li>
+
+<li>Put the pattern source file(s) into a directory of your choice and
+ configure FOP to look for custom patterns in this directory, by setting the
+ <a href="configuration.html"><hyphenation-base></a>
+ configuration option.</li>
+
+</ul>
+
+</li>
+
+</ol>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+ Either of these three options will ensure hyphenation is working when using
+ FOP from the command-line. If FOP is being embedded, remember to add the location(s)
+ of the hyphenation JAR(s) to the CLASSPATH (option 1 and 2) or to set the
+ <a href="configuration.html#hyphenation-dir"><hyphenation-dir></a>
+ configuration option programmatically (option 3).
+ </div>
+</div>
+</div>
+
+<a name="N100CC"></a><a name="patterns"></a>
+<h2 class="underlined_10">Hyphenation Patterns</h2>
+<div class="section">
+<p>If you would like to build your own hyphenation pattern files, or modify
+ existing ones, this section will help you understand how to do so. Even
+ when creating a pattern file from scratch, it may be beneficial to start
+ with an existing file and modify it. See <a class="external" href="http://offo.sourceforge.net/hyphenation/index.html">
+ OFFO's Hyphenation page</a> for examples.
+ Here is a brief explanation of the contents of FOP's hyphenation patterns:</p>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">The remaining content of this section should be considered "draft"
+ quality. It was drafted from theoretical literature, and has not been
+ tested against actual FOP behavior. It may contain errors or omissions.
+ Do not rely on these instructions without testing everything stated here.
+ If you use these instructions, please provide feedback on the
+ <a href="../maillist.html#fop-user">FOP User mailing list</a>, either
+ confirming their accuracy, or raising specific problems that we can
+ address.</div>
+</div>
+<ul>
+
+<li>The root of the pattern file is the <hyphenation-info> element.</li>
+
+<li><hyphen-char>: its attribute "value" contains the character signalling
+ a hyphen in the <exceptions> section. It has nothing to do with the
+ hyphenation character used in FOP, use the XSLFO hyphenation-character
+ property for defining the hyphenation character there. At some points
+ a dash U+002D is hardwired in the code, so you'd better use this too
+ (patches to rectify the situation are welcome). There is no default,
+ if you declare exceptions with hyphenations, you must declare the
+ hyphen-char too.</li>
+
+<li><hyphen-min> contains two attributes:
+ <ul>
+
+<li>before: the minimum number of characters in a word allowed to exist
+ on a line immediately preceding a hyphenated word-break.</li>
+
+<li>after: the minimum number of characters in a word allowed to exist
+ on a line immediately after a hyphenated word-break.</li>
+
+</ul>
+ This element is unused and not even read. It should be considered a
+ documentation for parameters used during pattern generation.
+ </li>
+
+<li><classes> contains whitespace-separated character sets. The members
+ of each set should be treated as equivalent for purposes of hyphenation,
+ usually upper and lower case of the same character. The first character
+ of the set is the canonical character, the patterns and exceptions
+ should only contain these canonical representation characters (except
+ digits for weight, the period (.) as word delimiter in the patterns and
+ the hyphen char in exceptions, of course).</li>
+
+<li><exceptions> contains whitespace-separated words, each of which
+ has either explicit hyphen characters to denote acceptable breakage
+ points, or no hyphen characters, to indicate that this word should
+ never be hyphenated, or contain explicit <hyp> elements for specifying
+ changes of spelling due to hyphenation (like backen -> bak-ken or
+ Stoffarbe -> Stoff-farbe in the old german spelling). Exceptions override
+ the patterns described below. Explicit <hyp> declarations don't work
+ yet (patches welcome). Exceptions are generally a bit brittle, test
+ carefully.</li>
+
+<li><patterns> includes whitespace-separated patterns, which are what
+ drive most hyphenation decisions. The characters in these patterns are
+ explained as follows:
+ <ul>
+
+<li>non-numeric characters represent characters in a sub-word to be
+ evaluated</li>
+
+<li>the period character (.) represents a word boundary, i.e. either
+ the beginning or ending of a word</li>
+
+<li>numeric characters represent a scoring system for indicating the
+ acceptability of a hyphen in this location. Odd numbers represent an
+ acceptable location for a hyphen, with higher values overriding lower
+ inhibiting values. Even numbers indicate an unacceptable location, with
+ higher values overriding lower values indicating an acceptable position.
+ A value of zero (inhibiting) is implied when there is no number present.
+ Generally patterns are constructed so that valuse greater than 4 are rare.
+ Due to a bug currently patterns with values of 8 and greater don't
+ have an effect, so don't wonder.</li>
+
+</ul>
+ Here are some examples from the English patterns file:
+ <ul>
+
+<li>Knuth (<em>The TeXBook</em>, Appendix H) uses the example <strong>hach4</strong>, which indicates that it is extremely undesirable to place a hyphen after the substring "hach", for example in the word "toothach-es".</li>
+
+<li>
+<strong>.leg5e</strong> indicates that "leg-e", when it occurs at the beginning of a word, is a very good place to place a hyphen, if one is needed. Words like "leg-end" and "leg-er-de-main" fit this pattern.</li>
+
+</ul>
+ Note that the algorithm that uses this data searches for each of the word's substrings in the patterns, and chooses the <em>highest</em> value found for letter combination.
+ </li>
+
+</ul>
+<p>If you want to convert a TeX hyphenation pattern file, you have to undo
+ the TeX encoding for non-ASCII text. FOP uses Unicode, and the patterns
+ must be proper Unicode too. You should be aware of the XML encoding issues,
+ preferably use a good Unicode editor.</p>
+<p>Note that FOP does not do Unicode character normalization. If you use
+ combining chars for accents and other character decorations, you must
+ declare character classes for them, and use the same sequence of base character
+ and combining marks in the XSLFO source, otherwise the pattern wouldn't match.
+ Fortunately, Unicode provides precomposed characters for all important cases
+ in common languages, until now nobody run seriously into this issue. Some dead
+ languages and dialects, especially ancient ones, may pose a real problem
+ though.</p>
+<p>If you want to generate your own patterns, an open-source utility called
+ patgen is available on many Unix/Linux distributions and every TeX
+ distribution which can be used to assist in
+ creating pattern files from dictionaries. Pattern creation for languages like
+ english or german is an art. If you can, read Frank Liang's original paper
+ "Word Hy-phen-a-tion by Com-pu-ter" (yes, with hyphens). It is not available
+ online. The original patgen.web source, included in the TeX source distributions,
+ contains valuable comments, unfortunately technical details obscure often the
+ high level issues. Another important source is
+ <a class="external" href="http://www.ctan.org/tex-archive/systems/knuth/tex/texbook.tex">The
+ TeX Book</a>, appendix H (either read the TeX source, or run it through
+ TeX to typeset it). Secondary articles, for example the works by Petr Sojka,
+ may also give some much needed insight into problems arising in automated
+ hyphenation.</p>
+</div>
+
+<span class="version">
+ version 632784</span>
+</div>
+<!--+
+ |end content
+ +-->
+<div class="clearboth"> </div>
+</div>
+<div id="footer">
+<!--+
+ |start bottomstrip
+ +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+// --></script>
+</div>
+<div class="copyright">
+ Copyright ©
+ 1999-2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+ |end bottomstrip
+ +-->
+</div>
+</body>
+</html>
Added: xmlgraphics/site/deploy/fop/0.95/hyphenation.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/0.95/hyphenation.pdf?rev=640791&view=auto
==============================================================================
Binary file - no diff available.
Propchange: xmlgraphics/site/deploy/fop/0.95/hyphenation.pdf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org