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 vh...@apache.org on 2010/08/25 18:49:40 UTC

svn commit: r989216 [5/19] - in /xmlgraphics/fop/branches/Temp_TrueTypeInPostScript: ./ examples/plan/src/org/apache/fop/plan/ lib/ src/codegen/java/org/apache/fop/tools/ src/codegen/unicode/data/ src/codegen/unicode/java/org/apache/fop/hyphenation/ sr...

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/embedding.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/embedding.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/embedding.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/embedding.xml Wed Aug 25 16:49:26 2010
@@ -29,7 +29,7 @@
   <section id="overview">
     <title>Overview</title>
     <p>
-      Review <a href="running.html">Running FOP</a> for important information that applies 
+      Review <a href="running.html">Running FOP</a> for important information that applies
       to embedded applications as well as command-line use, such as options and performance.
     </p>
     <p>
@@ -54,7 +54,7 @@
   <section id="basics">
     <title>Basic Usage Pattern</title>
     <p>
-      Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO 
+      Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO
       input document. It is therefore a good idea that you know a few things about JAXP (which
       is a good skill anyway). Let's look at the basic usage pattern for FOP...
     </p>
@@ -82,14 +82,14 @@ try {
   // Step 4: Setup JAXP using identity transformer
   TransformerFactory factory = TransformerFactory.newInstance();
   Transformer transformer = factory.newTransformer(); // identity transformer
-           
-  // Step 5: Setup input and output for XSLT transformation 
+
+  // Step 5: Setup input and output for XSLT transformation
   // Setup input stream
   Source src = new StreamSource(new File("C:/Temp/myfile.fo"));
 
   // Resulting SAX events (the generated FO) must be piped through to FOP
   Result res = new SAXResult(fop.getDefaultHandler());
-            
+
   // Step 6: Start XSLT transformation and FOP processing
   transformer.transform(src, res);
 
@@ -102,13 +102,13 @@ try {
     </p>
     <ul>
       <li>
-        <strong>Step 1:</strong> You create a new FopFactory instance. The FopFactory instance holds 
+        <strong>Step 1:</strong> You create a new FopFactory instance. The FopFactory instance holds
         references to configuration information and cached data. It's important to reuse this
         instance if you plan to render multiple documents during a JVM's lifetime.
       </li>
       <li>
         <strong>Step 2:</strong> You set up an OutputStream that the generated document
-        will be written to. It's a good idea to buffer the OutputStream as demonstrated 
+        will be written to. It's a good idea to buffer the OutputStream as demonstrated
         to improve performance.
       </li>
       <li>
@@ -119,26 +119,26 @@ try {
         OutputStream you've setup up in step 2.
       </li>
       <li>
-        <strong>Step 4</strong> We recommend that you use JAXP Transformers even 
-        if you don't do XSLT transformations to generate the XSL-FO file. This way 
-        you can always use the same basic pattern. The example here sets up an 
-        "identity transformer" which just passes the input (Source) unchanged to the 
-        output (Result). You don't have to work with a SAXParser if you don't do any 
+        <strong>Step 4</strong> We recommend that you use JAXP Transformers even
+        if you don't do XSLT transformations to generate the XSL-FO file. This way
+        you can always use the same basic pattern. The example here sets up an
+        "identity transformer" which just passes the input (Source) unchanged to the
+        output (Result). You don't have to work with a SAXParser if you don't do any
         XSLT transformations.
       </li>
       <li>
-        <strong>Step 5:</strong> Here you set up the input and output for the XSLT 
-        transformation. The Source object is set up to load the "myfile.fo" file. 
-        The Result is set up so the output of the XSLT transformation is sent to FOP. 
-        The FO file is sent to FOP in the form of SAX events which is the most efficient 
-        way. Please always avoid saving intermediate results to a file or a memory buffer 
+        <strong>Step 5:</strong> Here you set up the input and output for the XSLT
+        transformation. The Source object is set up to load the "myfile.fo" file.
+        The Result is set up so the output of the XSLT transformation is sent to FOP.
+        The FO file is sent to FOP in the form of SAX events which is the most efficient
+        way. Please always avoid saving intermediate results to a file or a memory buffer
         because that affects performance negatively.
       </li>
       <li>
-        <strong>Step 6:</strong> Finally, we start the XSLT transformation by starting 
-        the JAXP Transformer. As soon as the JAXP Transformer starts to send its output 
-        to FOP, FOP itself starts its processing in the background. When the 
-        <code>transform()</code> method returns FOP will also have finished converting 
+        <strong>Step 6:</strong> Finally, we start the XSLT transformation by starting
+        the JAXP Transformer. As soon as the JAXP Transformer starts to send its output
+        to FOP, FOP itself starts its processing in the background. When the
+        <code>transform()</code> method returns FOP will also have finished converting
         the FO file to a PDF file and you can close the OutputStream.
         <note label="Tip!">
           It's a good idea to enclose the whole conversion in a try..finally statement. If
@@ -148,16 +148,16 @@ try {
       </li>
     </ul>
     <p>
-      If you're not totally familiar with JAXP Transformers, please have a look at the 
+      If you're not totally familiar with JAXP Transformers, please have a look at the
       <a href="#examples">Embedding examples</a> below. The section contains examples
       for all sorts of use cases. If you look at all of them in turn you should be able
       to see the patterns in use and the flexibility this approach offers without adding
       too much complexity.
     </p>
     <p>
-      This may look complicated at first, but it's really just the combination of an 
+      This may look complicated at first, but it's really just the combination of an
       XSL transformation and a FOP run. It's also easy to comment out the FOP part
-      for debugging purposes, for example when you're tracking down a bug in your 
+      for debugging purposes, for example when you're tracking down a bug in your
       stylesheet. You can easily write the XSL-FO output from the XSL transformation
       to a file to check if that part generates the expected output. An example for that
       can be found in the <a href="#examples">Embedding examples</a> (See "ExampleXML2FO").
@@ -170,7 +170,7 @@ try {
         While with Avalon Logging the loggers were directly given to FOP, FOP now retrieves
         its logger(s) through a statically available LogFactory. This is similar to the
         general pattern that you use when you work with Apache Log4J directly, for example.
-        We call this "static logging" (Commons Logging, Log4J) as opposed to "instance logging" 
+        We call this "static logging" (Commons Logging, Log4J) as opposed to "instance logging"
         (Avalon Logging). This has a consequence: You can't give FOP a logger for each
         processing run anymore. The log output of multiple, simultaneously running FOP instances
         is sent to the same logger.
@@ -204,12 +204,12 @@ try {
         the <a href="events.html">Events subsystem</a> is the right approach.
       </p>
     </section>
-  
+
     <section id="render">
       <title>Processing XSL-FO</title>
       <p>
-        Once the Fop instance is set up, call <code>getDefaultHandler()</code> to obtain a SAX 
-        DefaultHandler instance to which you can send the SAX events making up the XSL-FO 
+        Once the Fop instance is set up, call <code>getDefaultHandler()</code> to obtain a SAX
+        DefaultHandler instance to which you can send the SAX events making up the XSL-FO
         document you'd like to render. FOP processing starts as soon as the DefaultHandler's
         <code>startDocument()</code> method is called. Processing stops again when the
         DefaultHandler's <code>endDocument()</code> method is called. Please refer to the basic
@@ -220,15 +220,15 @@ try {
     <section id="render-with-xslt">
       <title>Processing XSL-FO generated from XML+XSLT</title>
       <p>
-        If you want to process XSL-FO generated from XML using XSLT we recommend 
-        again using standard JAXP to do the XSLT part and piping the generated SAX 
-        events directly through to FOP. The only thing you'd change to do that 
+        If you want to process XSL-FO generated from XML using XSLT we recommend
+        again using standard JAXP to do the XSLT part and piping the generated SAX
+        events directly through to FOP. The only thing you'd change to do that
         on the basic usage pattern above is to set up the Transformer differently:
       </p>
       <source><![CDATA[
   //without XSLT:
   //Transformer transformer = factory.newTransformer(); // identity transformer
-  
+
   //with XSLT:
   Source xslt = new StreamSource(new File("mystylesheet.xsl"));
   Transformer transformer = factory.newTransformer(xslt);]]></source>
@@ -237,14 +237,14 @@ try {
   <section id="input">
     <title>Input Sources</title>
     <p>
-      The input XSL-FO document is always received by FOP as a SAX stream (see the 
+      The input XSL-FO document is always received by FOP as a SAX stream (see the
       <a href="../dev/design/parsing.html">Parsing Design Document</a> for the rationale).
     </p>
     <p>
-      However, you may not always have your input document available as a SAX stream. 
+      However, you may not always have your input document available as a SAX stream.
       But with JAXP it's easy to convert different input sources to a SAX stream so you
       can pipe it into FOP. That sounds more difficult than it is. You simply have
-      to set up the right Source instance as input for the JAXP transformation. 
+      to set up the right Source instance as input for the JAXP transformation.
       A few examples:
     </p>
     <ul>
@@ -273,8 +273,8 @@ try {
     <p>
       There are a variety of upstream data manipulations possible.
       For example, you may have a DOM and an XSL stylesheet; or you may want to
-      set variables in the stylesheet. Interface documentation and some cookbook 
-      solutions to these situations are provided in 
+      set variables in the stylesheet. Interface documentation and some cookbook
+      solutions to these situations are provided in
       <a href="http://xml.apache.org/xalan-j/usagepatterns.html">Xalan Basic Usage Patterns</a>.
     </p>
   </section>
@@ -288,7 +288,7 @@ try {
       <title>Customizing the FopFactory</title>
       <p>
         The FopFactory holds configuration data and references to objects which are reusable over
-        multiple rendering runs. It's important to instantiate it only once (except in special 
+        multiple rendering runs. It's important to instantiate it only once (except in special
         environments) and reuse it every time to create new FOUserAgent and Fop instances.
       </p>
       <p>
@@ -299,34 +299,34 @@ try {
           <p>
             The <strong>font base URL</strong> to use when resolving relative URLs for fonts. Example:
           </p>
-          <source>fopFactory.setFontBaseURL("file:///C:/Temp/fonts");</source>
+          <source>fopFactory.getFontManager().setFontBaseURL("file:///C:/Temp/fonts");</source>
         </li>
         <li>
           <p>
-            The <strong>hyphenation base URL</strong> to use when resolving relative URLs for 
+            The <strong>hyphenation base URL</strong> to use when resolving relative URLs for
             hyphenation patterns. Example:
           </p>
           <source>fopFactory.setHyphenBaseURL("file:///C:/Temp/hyph");</source>
         </li>
         <li>
           <p>
-            Disable <strong>strict validation</strong>. When disabled FOP is less strict about the rules 
+            Disable <strong>strict validation</strong>. When disabled FOP is less strict about the rules
             established by the XSL-FO specification. Example:
           </p>
           <source>fopFactory.setStrictValidation(false);</source>
         </li>
         <li>
           <p>
-            Enable an <strong>alternative set of rules for text indents</strong> that tries to mimic the behaviour of many commercial 
-            FO implementations, that chose to break the specification in this respect. The default of this option is 
-            'false', which causes Apache FOP to behave exactly as described in the specification. To enable the 
+            Enable an <strong>alternative set of rules for text indents</strong> that tries to mimic the behaviour of many commercial
+            FO implementations, that chose to break the specification in this respect. The default of this option is
+            'false', which causes Apache FOP to behave exactly as described in the specification. To enable the
             alternative behaviour, call:
           </p>
           <source>fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);</source>
         </li>
         <li>
           <p>
-            Set the <strong>source resolution</strong> for the document. This is used internally to determine the pixel 
+            Set the <strong>source resolution</strong> for the document. This is used internally to determine the pixel
             size for SVG images and bitmap images without resolution information. Default: 72 dpi. Example:
           </p>
           <source>fopFactory.setSourceResolution(96); // =96dpi (dots/pixels per Inch)</source>
@@ -334,7 +334,7 @@ try {
         <li>
           <p>
             Manually add an <strong>ElementMapping instance</strong>. If you want to supply a special FOP extension
-            you can give the instance to the FOUserAgent. Normally, the FOP extensions can be automatically detected 
+            you can give the instance to the FOUserAgent. Normally, the FOP extensions can be automatically detected
             (see the documentation on extension for more info). Example:
           </p>
           <source>fopFactory.addElementMapping(myElementMapping); // myElementMapping is a org.apache.fop.fo.ElementMapping</source>
@@ -342,13 +342,13 @@ try {
         <li>
           <p>
             Set a <strong>URIResolver</strong> for custom URI resolution. By supplying a JAXP URIResolver you can add
-            custom URI resolution functionality to FOP. For example, you can use 
+            custom URI resolution functionality to FOP. For example, you can use
             <a href="ext:xml.apache.org/commons/resolver">Apache XML Commons Resolver</a> to make use of XCatalogs. Example:
           </p>
           <source>fopFactory.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolver</source>
           <note>
             Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FopFactory
-            is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used 
+            is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used
             if no other URIResolver (for example on the FOUserAgent) resolved the URI first.
           </note>
         </li>
@@ -357,9 +357,9 @@ try {
     <section id="user-agent">
       <title>Customizing the User Agent</title>
       <p>
-        The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single 
+        The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single
         document. If you wish to customize the user agent's behaviour, the first step is to create your own instance
-        of FOUserAgent using the appropriate factory method on FopFactory and pass that 
+        of FOUserAgent using the appropriate factory method on FopFactory and pass that
         to the factory method that will create a new Fop instance:
       </p>
       <source><![CDATA[
@@ -416,16 +416,16 @@ try {
         </li>
         <li>
           <p>
-            Set the <strong>target resolution</strong> for the document. This is used to 
-            specify the output resolution for bitmap images generated by bitmap renderers 
-            (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter 
+            Set the <strong>target resolution</strong> for the document. This is used to
+            specify the output resolution for bitmap images generated by bitmap renderers
+            (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter
             effects and such. Default: 72 dpi. Example:
           </p>
           <source>userAgent.setTargetResolution(300); // =300dpi (dots/pixels per Inch)</source>
         </li>
         <li>
           <p>
-            Set <strong>your own Renderer instance</strong>. If you want to supply your own renderer or 
+            Set <strong>your own Renderer instance</strong>. If you want to supply your own renderer or
             configure a Renderer in a special way you can give the instance to the FOUserAgent. Normally,
             the Renderer instance is created by FOP. Example:
           </p>
@@ -433,8 +433,8 @@ try {
         </li>
         <li>
           <p>
-            Set <strong>your own FOEventHandler instance</strong>. If you want to supply your own FOEventHandler or 
-            configure an FOEventHandler subclass in a special way you can give the instance to the FOUserAgent. Normally, 
+            Set <strong>your own FOEventHandler instance</strong>. If you want to supply your own FOEventHandler or
+            configure an FOEventHandler subclass in a special way you can give the instance to the FOUserAgent. Normally,
             the FOEventHandler instance is created by FOP. Example:
           </p>
           <source>userAgent.setFOEventHandlerOverride(myFOEventHandler); // myFOEventHandler is an org.apache.fop.fo.FOEventHandler</source>
@@ -442,7 +442,7 @@ try {
         <li>
           <p>
             Set a <strong>URIResolver</strong> for custom URI resolution. By supplying a JAXP URIResolver you can add
-            custom URI resolution functionality to FOP. For example, you can use 
+            custom URI resolution functionality to FOP. For example, you can use
             <a href="ext:xml.apache.org/commons/resolver">Apache XML Commons Resolver</a> to make use of XCatalogs. Example:
           </p>
           <source>userAgent.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolver</source>
@@ -462,7 +462,7 @@ try {
   <section id="config-external">
     <title>Using a Configuration File</title>
     <p>
-      Instead of setting the parameters manually in code as shown above you can also set 
+      Instead of setting the parameters manually in code as shown above you can also set
       many values from an XML configuration file:
     </p>
     <source><![CDATA[
@@ -489,7 +489,7 @@ fopFactory.setUserConfig(new File("C:/Te
       <p>
         Fop instances shouldn't (and can't) be reused. Please recreate
         Fop and FOUserAgent instances for each rendering run using the FopFactory.
-        This is a cheap operation as all reusable information is held in the 
+        This is a cheap operation as all reusable information is held in the
         FopFactory. That's why it's so important to reuse the FopFactory instance.
      </p>
     </section>
@@ -515,12 +515,12 @@ fopFactory.setUserConfig(new File("C:/Te
     <section id="render-info">
       <title>Getting information on the rendering process</title>
       <p>
-        To get the number of pages that were rendered by FOP you can call 
-        <code>Fop.getResults()</code>. This returns a <code>FormattingResults</code> object 
-        where you can look up the number of pages produced. It also gives you the 
-        page-sequences that were produced along with their id attribute and their 
-        numbers of pages. This is particularly useful if you render multiple 
-        documents (each enclosed by a page-sequence) and have to know the number of 
+        To get the number of pages that were rendered by FOP you can call
+        <code>Fop.getResults()</code>. This returns a <code>FormattingResults</code> object
+        where you can look up the number of pages produced. It also gives you the
+        page-sequences that were produced along with their id attribute and their
+        numbers of pages. This is particularly useful if you render multiple
+        documents (each enclosed by a page-sequence) and have to know the number of
         pages of each document.
       </p>
     </section>
@@ -532,19 +532,19 @@ fopFactory.setUserConfig(new File("C:/Te
     </p>
     <ul>
       <li>
-        Whenever possible, try to use SAX to couple the individual components involved 
+        Whenever possible, try to use SAX to couple the individual components involved
         (parser, XSL transformer, SQL datasource etc.).
       </li>
       <li>
-        Depending on the target OutputStream (in case of a FileOutputStream, but not 
-        for a ByteArrayOutputStream, for example) it may improve performance considerably 
-        if you buffer the OutputStream using a BufferedOutputStream: 
+        Depending on the target OutputStream (in case of a FileOutputStream, but not
+        for a ByteArrayOutputStream, for example) it may improve performance considerably
+        if you buffer the OutputStream using a BufferedOutputStream:
         <code>out = new java.io.BufferedOutputStream(out);</code>
         <br/>
         Make sure you properly close the OutputStream when FOP is finished.
       </li>
       <li>
-        Cache the stylesheet. If you use the same stylesheet multiple times 
+        Cache the stylesheet. If you use the same stylesheet multiple times
         you can set up a JAXP <code>Templates</code> object and reuse it each time you do
         the XSL transformation.  (More information can be found
         <a class="fork" href="http://www.javaworld.com/javaworld/jw-05-2003/jw-0502-xsl.html">here</a>.)
@@ -570,7 +570,7 @@ fopFactory.setUserConfig(new File("C:/Te
       If you encounter any suspicious behaviour, please notify us.
     </p>
     <p>
-      There is also a known issue with fonts being jumbled between threads when using 
+      There is also a known issue with fonts being jumbled between threads when using
       the Java2D/AWT renderer (which is used by the -awt and -print output options).
       In general, you cannot safely run multiple threads through the AWT renderer.
     </p>
@@ -578,7 +578,7 @@ fopFactory.setUserConfig(new File("C:/Te
 <section id="examples">
   <title>Examples</title>
   <p>
-   The directory "{fop-dir}/examples/embedding" contains several working examples. 
+   The directory "{fop-dir}/examples/embedding" contains several working examples.
   </p>
   <section id="ExampleFO2PDF">
     <title>ExampleFO2PDF.java</title>
@@ -592,104 +592,104 @@ file to PDF using FOP.
   </section>
   <section id="ExampleXML2FO">
     <title>ExampleXML2FO.java</title>
-    <p>This 
+    <p>This
         <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2FO.java?view=markup">
             example</a>
-has nothing to do with FOP. It is there to show you how an XML 
+has nothing to do with FOP. It is there to show you how an XML
 file can be converted to XSL-FO using XSLT. The JAXP API is used to do the
-transformation. Make sure you've got a JAXP-compliant XSLT processor in your 
+transformation. Make sure you've got a JAXP-compliant XSLT processor in your
 classpath (ex. <a href="http://xml.apache.org/xalan-j">Xalan</a>).
     </p>
     <figure src="images/EmbeddingExampleXML2FO.png" alt="Example XML to XSL-FO"/>
   </section>
   <section id="ExampleXML2PDF">
     <title>ExampleXML2PDF.java</title>
-    <p>This 
+    <p>This
         <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup">
         example</a>
-demonstrates how you can convert an arbitrary XML file to PDF 
-using XSLT and XSL-FO/FOP. It is a combination of the first two examples 
-above. The example uses JAXP to transform the XML file to XSL-FO and FOP to 
+demonstrates how you can convert an arbitrary XML file to PDF
+using XSLT and XSL-FO/FOP. It is a combination of the first two examples
+above. The example uses JAXP to transform the XML file to XSL-FO and FOP to
 transform the XSL-FO to PDF.
     </p>
     <figure src="images/EmbeddingExampleXML2PDF.png" alt="Example XML to PDF (via XSL-FO)"/>
     <p>
-The output (XSL-FO) from the XSL transformation is piped through to FOP using 
-SAX events. This is the most efficient way to do this because the 
-intermediate result doesn't have to be saved somewhere. Often, novice users 
-save the intermediate result in a file, a byte array or a DOM tree. We 
-strongly discourage you to do this if it isn't absolutely necessary. The 
+The output (XSL-FO) from the XSL transformation is piped through to FOP using
+SAX events. This is the most efficient way to do this because the
+intermediate result doesn't have to be saved somewhere. Often, novice users
+save the intermediate result in a file, a byte array or a DOM tree. We
+strongly discourage you to do this if it isn't absolutely necessary. The
 performance is significantly higher with SAX.
     </p>
   </section>
   <section id="ExampleObj2XML">
     <title>ExampleObj2XML.java</title>
-    <p>This 
+    <p>This
     <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2XML.java?view=markup">
         example</a>
-is a preparatory example for the next one. It's an example that 
-shows how an arbitrary Java object can be converted to XML. It's an often 
-needed task to do this. Often people create a DOM tree from a Java object and 
+is a preparatory example for the next one. It's an example that
+shows how an arbitrary Java object can be converted to XML. It's an often
+needed task to do this. Often people create a DOM tree from a Java object and
 use that. This is pretty straightforward. The example here, however, shows how
-to do this using SAX, which will probably be faster and not even more 
+to do this using SAX, which will probably be faster and not even more
 complicated once you know how this works.
     </p>
     <figure src="images/EmbeddingExampleObj2XML.png" alt="Example Java object to XML"/>
     <p>
-For this example we've created two classes: ProjectTeam and ProjectMember 
-(found in xml-fop/examples/embedding/java/embedding/model). They represent 
-the same data structure found in 
-xml-fop/examples/embedding/xml/xml/projectteam.xml. We want to serialize to XML a 
-project team with several members which exist as Java objects. 
-Therefore we created the two classes: ProjectTeamInputSource and 
+For this example we've created two classes: ProjectTeam and ProjectMember
+(found in xml-fop/examples/embedding/java/embedding/model). They represent
+the same data structure found in
+xml-fop/examples/embedding/xml/xml/projectteam.xml. We want to serialize to XML a
+project team with several members which exist as Java objects.
+Therefore we created the two classes: ProjectTeamInputSource and
 ProjectTeamXMLReader (in the same place as ProjectTeam above).
     </p>
     <p>
-The XMLReader implementation (regard it as a special kind of XML parser) is 
-responsible for creating SAX events from the Java object. The InputSource 
+The XMLReader implementation (regard it as a special kind of XML parser) is
+responsible for creating SAX events from the Java object. The InputSource
 class is only used to hold the ProjectTeam object to be used.
     </p>
     <p>
-Have a look at the source of ExampleObj2XML.java to find out how this is 
-used. For more detailed information see other resources on JAXP (ex. 
+Have a look at the source of ExampleObj2XML.java to find out how this is
+used. For more detailed information see other resources on JAXP (ex.
 <a class="fork" href="http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/3_generate.html">An older JAXP tutorial</a>).
     </p>
   </section>
   <section id="ExampleObj2PDF">
     <title>ExampleObj2PDF.java</title>
-    <p>This 
+    <p>This
         <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java?view=markup">
             example</a>
-combines the previous and the third to demonstrate 
+combines the previous and the third to demonstrate
 how you can transform a Java object to a PDF directly in one smooth run
-by generating SAX events from the Java object that get fed to an XSL 
-transformation. The result of the transformation is then converted to PDF 
+by generating SAX events from the Java object that get fed to an XSL
+transformation. The result of the transformation is then converted to PDF
 using FOP as before.
     </p>
     <figure src="images/EmbeddingExampleObj2PDF.png" alt="Example Java object to PDF (via XML and XSL-FO)"/>
   </section>
   <section id="ExampleDOM2PDF">
     <title>ExampleDOM2PDF.java</title>
-    <p>This 
+    <p>This
         <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleDOM2PDF.java?view=markup">
             example</a>
-has FOP use a DOMSource instead of a StreamSource in order to 
+has FOP use a DOMSource instead of a StreamSource in order to
 use a DOM tree as input for an XSL transformation.
     </p>
   </section>
   <section id="ExampleSVG2PDF">
     <title>ExampleSVG2PDF.java (PDF Transcoder example)</title>
-    <p>This 
+    <p>This
         <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleSVG2PDF.java?view=markup">
             example</a>
-shows the usage of the PDF Transcoder, a sub-application within FOP.  
+shows the usage of the PDF Transcoder, a sub-application within FOP.
 It is used to generate a PDF document from an SVG file.
     </p>
   </section>
   <section id="example-notes">
     <title>Final notes</title>
     <p>
-These examples should give you an idea of what's possible. It should be easy 
+These examples should give you an idea of what's possible. It should be easy
 to adjust these examples to your needs. Also, if you have other examples that you
 think should be added here, please let us know via either the fop-users or fop-dev
 mailing lists.  Finally, for more help please send your questions to the fop-users

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/fonts.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/fonts.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/fonts.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/fonts.xml Wed Aug 25 16:49:26 2010
@@ -215,7 +215,7 @@
         in this case can be found on the page about <a href="output.html">output formats</a>.
       </p>
       <p>
-        Prior to FOP version 0.94, it was always necessary to create an XML font metrics file
+        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.

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/graphics.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/graphics.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/graphics.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/graphics.xml Wed Aug 25 16:49:26 2010
@@ -26,19 +26,15 @@
     <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:
+        Some noteworthy features of the image handling subsystem are:
       </p>
       <ul>
         <li>
-          The image libraries Jimi and JAI are no longer supported. Instead, Apache FOP uses the
+          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 no longer converted to a standardized 24 bit RGB image but are
+          Some bitmap images are not converted to a standardized 24 bit RGB image but are
           instead handled in their native format.
         </li>
         <li>
@@ -48,7 +44,7 @@
       </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
+        does not reside in Apache FOP, but in
         <a href="ext:xmlgraphics.apache.org/commons/">XML Graphics Commons</a>.
       </p>
     </section>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/output.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/output.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/output.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/output.xml Wed Aug 25 16:49:26 2010
@@ -113,9 +113,9 @@ out = proc.getOutputStream();]]></source
         compatible.
       </p>
       <p>
-        Note that FOP does not currently support "tagged PDF" or PDF/A-1a. 
-        Support for <a href="pdfa.html">PDF/A-1b</a> and <a
-          href="pdfx.html">PDF/X</a> has recently been added, however.
+        Note that FOP does not currently support PDF/A-1a. 
+        Support for <a href="accessibility.html">Tagged PDF</a>, <a href="pdfa.html">PDF/A-1b</a> 
+		and <a href="pdfx.html">PDF/X</a> has recently been added, however.
       </p>
       <section id="pdf-fonts">
         <title>Fonts</title>
@@ -194,32 +194,76 @@ out = proc.getOutputStream();]]></source
     e.printStackTrace();
   }
 }]]></source>
-    <p>
-      Check the iText tutorial and documentation for setting access flags, password, 
-      encryption strength and other parameters.
-    </p>
-  </section>
-  <section id="pdf-watermark">
-    <title>Watermarks</title>
-    <p>
-      In addition to the <a href="#pdf-postprocess">PDF Post-processing</a> options, consider the following workarounds:
-    </p>
-    <ul>
-      <li>
-        Use a background image for the body region.
-      </li>
-      <li>
-        (submitted by Trevor Campbell) Place an image in a
-        region that overlaps the flowing text. For example, make
-        region-before large enough to contain your image. Then include a
-        block (if necessary, use an absolutely positioned block-container)
-        containing the watermark image in the static-content for the
-        region-before. Note that the image will be drawn on top of the
-        normal content.
-      </li>
-    </ul>
+      <p>
+        Check the iText tutorial and documentation for setting access flags, password, 
+        encryption strength and other parameters.
+      </p>
+    </section>
+    <section id="pdf-watermark">
+      <title>Watermarks</title>
+      <p>
+        In addition to the <a href="#pdf-postprocess">PDF Post-processing</a> options, consider the following workarounds:
+      </p>
+      <ul>
+        <li>
+          Use a background image for the body region.
+        </li>
+        <li>
+          (submitted by Trevor Campbell) Place an image in a
+          region that overlaps the flowing text. For example, make
+          region-before large enough to contain your image. Then include a
+          block (if necessary, use an absolutely positioned block-container)
+          containing the watermark image in the static-content for the
+          region-before. Note that the image will be drawn on top of the
+          normal content.
+        </li>
+      </ul>
+    </section>
+    <section id="pdf-extensions">
+      <title>Extensions</title>
+      <p>The PDF Renderer supports some PDF specific extensions which can be embedded 
+        into the input FO document. To use the extensions the appropriate namespace must 
+        be declared in the fo:root element like this:</p>
+      <source><![CDATA[
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+         xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
+  ]]></source>
+      <section id="pdf-embedded-file">
+        <title>Embedded Files</title>
+        <p>
+          It is possible to attach/embed arbitrary files into a PDF file. You can give a name and
+          a description of the file. Example:
+        </p>
+        <source><![CDATA[
+  <fo:declarations>
+    <pdf:embedded-file filename="image.jpg" src="url(file:///C:/Temp/myimage.jpg)" description="My image"/>
+    <pdf:embedded-file src="url(file:///C:/Temp/MyTextDoc.odt)"/>
+  </fo:declarations>
+  ]]></source>
+        <p>
+          <code>pdf:embedded-file</code> must be a child of <code>fo:declarations</code>.
+          The "src" property is used to reference the file that is to be embedded. This property
+          uses the "uri-specification" datatype from the XSL-FO specification.
+          The "filename" property is optional. If it is missing the filename is automatically set
+          from the URI/IRI of the "src" property. An optional description can also be added to
+          further describe the file attachment.
+        </p>
+        <p>
+          It is also possible to reference an embedded file from an <code>fo:basic-link</code>.
+          Use the special "embedded-file:" URI scheme with the filename as single argument after
+          the URI scheme. Example:
+        </p>
+        <source><![CDATA[
+<fo:basic-link external-destination="url(embedded-file:image.jpg)">Attached Image</fo:basic-link>
+]]></source>
+        <p>
+          Note: Not all PDF Viewers (including some Acrobat Versions) will open the embedded file
+          when clicking on the link. In that case, the user will have to open he attachment via
+          the separate list of file attachments.
+        </p>
+      </section>
+    </section>
   </section>
-</section>
 <section id="ps">
   <title>PostScript</title>
   <p>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/running.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/running.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/running.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/content/xdocs/trunk/running.xml Wed Aug 25 16:49:26 2010
@@ -38,8 +38,8 @@
           </ul>
         </li>
         <li>
-          Apache FOP. The <a href="../download.html">FOP distribution</a> includes all libraries that you will 
-          need to run a basic FOP installation. These can be found in the [fop-root]/lib directory. These 
+          Apache FOP. The <a href="../download.html">FOP distribution</a> includes all libraries that you will
+          need to run a basic FOP installation. These can be found in the [fop-root]/lib directory. These
           libraries include the following:
           <ul>
             <li><a class="fork" href="ext:xmlgraphics.apache.org/commons">Apache XML Graphics Commons</a>, an shared library for Batik and FOP.</li>
@@ -54,7 +54,7 @@
       <ul>
         <li>
           Graphics libraries. Generally, FOP contains direct support for the most important
-          bitmap image formats (including PNG, JPEG and GIF). See 
+          bitmap image formats (including PNG, JPEG and GIF). See
           <a href="graphics.html">FOP: Graphics Formats</a> for details.
         </li>
         <li>
@@ -64,7 +64,7 @@
       <p>In addition, the following system requirements apply:</p>
       <ul>
         <li>
-          If you will be using FOP to process SVG, you must do so in a graphical environment. 
+          If you will be using FOP to process SVG, you must do so in a graphical environment.
           See <a href="graphics.html#batik">FOP: Graphics (Batik)</a> for details.
         </li>
       </ul>
@@ -74,19 +74,19 @@
       <section id="install-instruct">
         <title>Instructions</title>
         <p>
-          Basic FOP installation consists of first unzipping the <code>.gz</code> file that is the 
-          distribution medium, then unarchiving the resulting <code>.tar</code> file in a 
-          directory/folder that is convenient on your system. Please consult your operating system 
-          documentation or Zip application software documentation for instructions specific to your 
+          Basic FOP installation consists of first unzipping the <code>.gz</code> file that is the
+          distribution medium, then unarchiving the resulting <code>.tar</code> file in a
+          directory/folder that is convenient on your system. Please consult your operating system
+          documentation or Zip application software documentation for instructions specific to your
           site.
         </p>
       </section>
       <section id="install-problems">
         <title>Problems</title>
         <p>
-          Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip 
-          and unarchive their distribution media. This is a legacy of older Mac operating systems, 
-          which had a 31-character pathname limit. Several Mac OSX users have recommended that 
+          Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip
+          and unarchive their distribution media. This is a legacy of older Mac operating systems,
+          which had a 31-character pathname limit. Several Mac OSX users have recommended that
           Mac OSX users use the shell command <code>tar -xzf</code> instead.
         </p>
       </section>
@@ -96,30 +96,31 @@
       <section id="fop-script">
         <title>Using the fop script or batch file</title>
       <p>
-        The usual and recommended practice for starting FOP from the command line is to run the 
+        The usual and recommended practice for starting FOP from the command line is to run the
         batch file fop.bat (Windows) or the shell script fop (Unix/Linux).
-        These scripts require that the environment variable JAVA_HOME be 
-        set to a path pointing to the appropriate Java installation on your system. Macintosh OSX 
-        includes a Java environment as part of its distribution. We are told by Mac OSX users that 
+        These scripts require that the environment variable JAVA_HOME be
+        set to a path pointing to the appropriate Java installation on your system. Macintosh OSX
+        includes a Java environment as part of its distribution. We are told by Mac OSX users that
         the path to use in this case is <code>/Library/Java/Home</code>. <strong>Caveat:</strong>
-        We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum 
-        Java requirements, the two will inevitably not match on some systems. Please see 
-        <a href="http://developer.apple.com/java/faq">Java on Mac OSX FAQ</a> for information as 
+        We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum
+        Java requirements, the two will inevitably not match on some systems. Please see
+        <a href="http://developer.apple.com/java/faq">Java on Mac OSX FAQ</a> for information as
         it becomes available.
       </p>
       <source><![CDATA[
 USAGE
 Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>
- [OPTIONS]  
-  -d                debug mode   
-  -x                dump configuration settings  
-  -q                quiet mode  
+ [OPTIONS]
+  -version          print FOP version and exit
+  -d                debug mode
+  -x                dump configuration settings
+  -q                quiet mode
   -c cfg.xml        use additional configuration file cfg.xml
-  -l lang           the language to use for user information 
+  -l lang           the language to use for user information
   -r                relaxed/less strict validation (where available)
   -dpi xxx          target resolution in dots per inch (dpi) where xxx is a number
   -s                for area tree XML, down to block areas only
-  -v                to show FOP version being used
+  -v                run in verbose mode (currently simply print FOP version and continue)
 
   -o [password]     PDF file will be encrypted with option owner password
   -u [password]     PDF file will be encrypted with option user password
@@ -127,62 +128,76 @@ Fop [options] [-fo|-xml] infile [-xsl fi
   -nocopy           PDF file will be encrypted without copy content permission
   -noedit           PDF file will be encrypted without edit content permission
   -noannotations    PDF file will be encrypted without edit annotation permission
+  -a                enables accessibility features (Tagged PDF etc., default off)
   -pdfprofile prof  PDF file will be generated with the specified profile
                     (Examples for prof: PDF/A-1b or PDF/X-3:2003)
 
- [INPUT]  
-  infile            xsl:fo input file (the same as the next) 
-  -fo  infile       xsl:fo input file  
-  -xml infile       xml input file, must be used together with -xsl 
-  -atin infile      area tree input file 
-  -xsl stylesheet   xslt stylesheet 
- 
+  -conserve         enable memory-conservation policy (trades memory-consumption for disk I/O)
+                    (Note: currently only influences whether the area tree is serialized.)
+
+  -cache            specifies a file/directory path location
+  -flush            flushes the current font cache file
+
+ [INPUT]
+  infile            xsl:fo input file (the same as the next)
+                    (use '-' for infile to pipe input from stdin)
+  -fo  infile       xsl:fo input file
+  -xml infile       xml input file, must be used together with -xsl
+  -atin infile      area tree input file
+  -ifin infile      intermediate format input file
+  -imagein infile   image input file (piping through stdin not supported)
+  -xsl stylesheet   xslt stylesheet
+
   -param name value <value> to use for parameter <name> in xslt stylesheet
                     (repeat '-param name value' for each parameter)
- 
- [OUTPUT] 
+
+  -catalog          use catalog resolver for input XML and XSLT files
+ [OUTPUT]
   outfile           input will be rendered as PDF into outfile
+                    (use '-' for outfile to pipe output to stdout)
   -pdf outfile      input will be rendered as PDF (outfile req'd)
   -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF
                     (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b")
-  -awt              input will be displayed on screen 
+  -awt              input will be displayed on screen
   -rtf outfile      input will be rendered as RTF (outfile req'd)
-  -pcl outfile      input will be rendered as PCL (outfile req'd) 
-  -ps outfile       input will be rendered as PostScript (outfile req'd) 
+  -pcl outfile      input will be rendered as PCL (outfile req'd)
+  -ps outfile       input will be rendered as PostScript (outfile req'd)
   -afp outfile      input will be rendered as AFP (outfile req'd)
   -tiff outfile     input will be rendered as TIFF (outfile req'd)
   -png outfile      input will be rendered as PNG (outfile req'd)
-  -txt outfile      input will be rendered as plain text (outfile req'd) 
-  -at [mime] out    representation of area tree as XML (outfile req'd) 
-                    specify optional mime output to allow AT to be converted
+  -txt outfile      input will be rendered as plain text (outfile req'd)
+  -at [mime] out    representation of area tree as XML (outfile req'd)
+                    specify optional mime output to allow the AT to be converted
+                    to final format later
+  -if [mime] out    representation of document in intermediate format XML (outfile req'd)
+                    specify optional mime output to allow the IF to be converted
                     to final format later
-  -print            input file will be rendered and sent to the printer 
-                    see options with "-print help" 
+  -print            input file will be rendered and sent to the printer
+                    see options with "-print help"
   -out mime outfile input will be rendered using the given MIME type
                     (outfile req'd) Example: "-out application/pdf D:\out.pdf"
                     (Tip: "-out list" prints the list of supported MIME types)
-  -mif outfile      input will be rendered as MIF (FrameMaker) (outfile req'd)
-                    Experimental feature - requires additional fop-sandbox.jar.
-  -svg outfile      input will be rendered as an SVG slides file (outfile req'd) 
+  -svg outfile      input will be rendered as an SVG slides file (outfile req'd)
                     Experimental feature - requires additional fop-sandbox.jar.
 
-  -foout outfile    input will only be XSL transformed. The intermediate 
-                    XSL-FO file is saved and no rendering is performed. 
+  -foout outfile    input will only be XSL transformed. The intermediate
+                    XSL-FO file is saved and no rendering is performed.
                     (Only available if you use -xml and -xsl parameters)
 
 
  [Examples]
-  Fop foo.fo foo.pdf 
-  Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
-  Fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
-  Fop -xml foo.xml -xsl foo.xsl -foout foo.fo
-  Fop foo.fo -mif foo.mif
-  Fop foo.fo -rtf foo.rtf
-  Fop foo.fo -print or Fop -print foo.fo 
-  Fop foo.fo -awt]]></source>
+  fop foo.fo foo.pdf
+  fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
+  fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
+  fop -xml foo.xml -xsl foo.xsl -foout foo.fo
+  fop -xml - -xsl foo.xsl -pdf -
+  fop foo.fo -mif foo.mif
+  fop foo.fo -rtf foo.rtf
+  fop foo.fo -print
+  fop foo.fo -awt]]></source>
       <p>
-        PDF encryption is only available if FOP was compiled with encryption support 
-        <strong>and</strong> if compatible encryption support is available at run time. 
+        PDF encryption is only available if FOP was compiled with encryption support
+        <strong>and</strong> if compatible encryption support is available at run time.
         Currently, only the JCE is supported. Check the <a href="pdfencryption.html">Details</a>.
       </p>
       </section>
@@ -194,8 +209,8 @@ Fop [options] [-fo|-xml] infile [-xsl fi
         org.apache.fop.cli.Main &lt;arguments></code>. The arguments
         consist of the options and infile and outfile specifications
         as shown above for the standard scripts. You may wish to review
-        the standard scripts to make sure that 
-        you get your environment properly configured. 
+        the standard scripts to make sure that
+        you get your environment properly configured.
         </p>
       </section>
       <section id="jar-option">
@@ -251,38 +266,38 @@ Fop [options] [-fo|-xml] infile [-xsl fi
     <section id="check-input">
       <title>Using Xalan to Check XSL-FO Input</title>
       <p>
-        FOP sessions that use -xml and -xsl input instead of -fo input are actually 
-        controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting 
+        FOP sessions that use -xml and -xsl input instead of -fo input are actually
+        controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting
         the XSL-FO to PDF (or another FOP output format).
-        Although FOP controls both of these processes, the first is included merely as 
+        Although FOP controls both of these processes, the first is included merely as
         a convenience and for performance reasons.
         Only the second is part of FOP's core processing.
-        If a user has a problem running FOP, it is important to determine which of these 
+        If a user has a problem running FOP, it is important to determine which of these
         two processes is causing the problem.
         If the problem is in the first process, the user's stylesheet is likely the cause.
-        The FOP development team does not have resources to help with stylesheet issues, 
-        although we have included links to some useful 
-        <a href="../resources.html#specs">Specifications</a> and 
+        The FOP development team does not have resources to help with stylesheet issues,
+        although we have included links to some useful
+        <a href="../resources.html#specs">Specifications</a> and
         <a href="../resources.html#articles">Books/Articles</a>.
-        If the problem is in the second process, FOP may have a bug or an unimplemented 
+        If the problem is in the second process, FOP may have a bug or an unimplemented
         feature that does require attention from the FOP development team.
       </p>
       <note>The user is always responsible to provide correct XSL-FO code to FOP.</note>
       <p>
-        In the case of using -xml and -xsl input, although the user is responsible for 
-        the XSL-FO code that is FOP's input, it is not visible to the user. To make the 
-        intermediate FO file visible, the FOP distribution includes the "-foout" option 
-        which causes FOP to run only the first (transformation) step, and write the 
+        In the case of using -xml and -xsl input, although the user is responsible for
+        the XSL-FO code that is FOP's input, it is not visible to the user. To make the
+        intermediate FO file visible, the FOP distribution includes the "-foout" option
+        which causes FOP to run only the first (transformation) step, and write the
         results to a file. (See also the Xalan command-line below)
       </p>
       <note>
-        When asking for help on the FOP mailing lists, <em>never</em> attach XML and 
-        XSL to illustrate the issue. Always run the XSLT step (-foout) and send the 
-        resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is 
+        When asking for help on the FOP mailing lists, <em>never</em> attach XML and
+        XSL to illustrate the issue. Always run the XSLT step (-foout) and send the
+        resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is
         correct before sending it.
       </note>
       <p>
-        The -foout option works the same way as if you would call the 
+        The -foout option works the same way as if you would call the
         <a href="http://xml.apache.org/xalan-j/commandline.html">Xalan command-line</a>:
       </p>
       <p>
@@ -304,39 +319,39 @@ Fop [options] [-fo|-xml] infile [-xsl fi
       </p>
       <ul>
         <li>
-          Increase memory available to the JVM. See 
-          <a href="http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/java.html">the -Xmx option</a> 
+          Increase memory available to the JVM. See
+          <a href="http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/java.html">the -Xmx option</a>
           for more information.
           <warning>
-            It is usually unwise to increase the memory allocated to the JVM beyond the amount of 
+            It is usually unwise to increase the memory allocated to the JVM beyond the amount of
             physical RAM, as this will generally cause significantly slower performance.
           </warning>
         </li>
         <li>
           Avoid forward references.
           Forward references are references to some later part of a document.
-          Examples include page number citations which refer to pages which follow the citation, 
-          tables of contents at the beginning of a document, and page numbering schemes that 
-          include the total number of pages in the document 
+          Examples include page number citations which refer to pages which follow the citation,
+          tables of contents at the beginning of a document, and page numbering schemes that
+          include the total number of pages in the document
           (<a href="../faq.html#pagenum">"page N of TOTAL"</a>).
-          Forward references cause all subsequent pages to be held in memory until the reference 
+          Forward references cause all subsequent pages to be held in memory until the reference
           can be resolved, i.e. until the page with the referenced element is encountered.
-          Forward references may be required by the task, but if you are getting a memory 
+          Forward references may be required by the task, but if you are getting a memory
           overflow, at least consider the possibility of eliminating them.
-          A table of contents could be replaced by PDF bookmarks instead or moved to the end of 
+          A table of contents could be replaced by PDF bookmarks instead or moved to the end of
           the document (reshuffle the paper could after printing).
         </li>
         <li>
           Avoid large images, especially if they are scaled down.
           If they need to be scaled, scale them in another application upstream from FOP.
-          For many image formats, memory consumption is driven mainly by the size of the image 
-          file itself, not its dimensions (width*height), so increasing the compression rate 
+          For many image formats, memory consumption is driven mainly by the size of the image
+          file itself, not its dimensions (width*height), so increasing the compression rate
           may help.
         </li>
         <li>
           Use multiple page sequences.
           FOP starts rendering after the end of a page sequence is encountered.
-          While the actual rendering is done page-by-page, some additional memory is 
+          While the actual rendering is done page-by-page, some additional memory is
           freed after the page sequence has been rendered.
           This can be substantial if the page sequence contains lots of FO elements.
         </li>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/skinconf.xml?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/skinconf.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/documentation/skinconf.xml Wed Aug 25 16:49:26 2010
@@ -378,6 +378,7 @@ which will be used to configure the chos
       <height>125</height>
     </credit>
     -->
+    <!--
     <credit box-location="alt2">
       <name>ApacheCon US 2009</name>
       <url>http://us.apachecon.com/</url>
@@ -385,6 +386,7 @@ which will be used to configure the chos
       <width>125</width>
       <height>125</height>
     </credit>
+    -->
     
     <credit role="pdf">
       <name>PDF created by Apache FOP</name>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.fo.ElementMapping
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.fo.ElementMapping?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.fo.ElementMapping (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.fo.ElementMapping Wed Aug 25 16:49:26 2010
@@ -9,3 +9,4 @@ org.apache.fop.fo.extensions.xmp.RDFElem
 org.apache.fop.render.ps.extensions.PSExtensionElementMapping
 org.apache.fop.render.afp.extensions.AFPElementMapping
 org.apache.fop.render.pcl.extensions.PCLElementMapping
+org.apache.fop.render.pdf.extensions.PDFElementMapping

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.render.Renderer
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.render.Renderer?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.render.Renderer (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/META-INF/services/org.apache.fop.render.Renderer Wed Aug 25 16:49:26 2010
@@ -1,10 +1,6 @@
-org.apache.fop.render.pdf.PDFRendererMaker
-org.apache.fop.render.ps.PSRendererMaker
 org.apache.fop.render.txt.TXTRendererMaker
 org.apache.fop.render.bitmap.PNGRendererMaker
 org.apache.fop.render.bitmap.TIFFRendererMaker
 org.apache.fop.render.xml.XMLRendererMaker
 org.apache.fop.render.awt.AWTRendererMaker
 org.apache.fop.render.print.PrintRendererMaker
-org.apache.fop.render.afp.AFPRendererMaker
-org.apache.fop.render.pcl.PCLRendererMaker
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/ResourceEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/ResourceEventProducer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/ResourceEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/ResourceEventProducer.java Wed Aug 25 16:49:26 2010
@@ -39,7 +39,10 @@ public interface ResourceEventProducer e
     /**
      * Provider class for the event producer.
      */
-    class Provider {
+    final class Provider {
+
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPBorderPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPBorderPainter.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPBorderPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPBorderPainter.java Wed Aug 25 16:49:26 2010
@@ -40,7 +40,7 @@ public class AFPBorderPainter extends Ab
     }
 
     /** {@inheritDoc} */
-    public void paint(PaintingInfo paintInfo) {
+    public void paint(PaintingInfo paintInfo) { // CSOK: MethodLength
         BorderPaintingInfo borderPaintInfo = (BorderPaintingInfo)paintInfo;
         float w = borderPaintInfo.getX2() - borderPaintInfo.getX1();
         float h = borderPaintInfo.getY2() - borderPaintInfo.getY1();
@@ -60,6 +60,7 @@ public class AFPBorderPainter extends Ab
         float y2 = unitConv.pt2units(borderPaintInfo.getY2());
 
         switch (paintingState.getRotation()) {
+        default:
         case 0:
             x1 += at.getTranslateX();
             y1 += at.getTranslateY();
@@ -89,8 +90,8 @@ public class AFPBorderPainter extends Ab
         AFPLineDataInfo lineDataInfo = new AFPLineDataInfo();
         lineDataInfo.setColor(borderPaintInfo.getColor());
         lineDataInfo.setRotation(paintingState.getRotation());
-        lineDataInfo.x1 = Math.round(x1);
-        lineDataInfo.y1 = Math.round(y1);
+        lineDataInfo.setX1 ( Math.round(x1) );
+        lineDataInfo.setY1 ( Math.round(y1) );
         float thickness;
         if (borderPaintInfo.isHorizontal()) {
             thickness = y2 - y1;
@@ -105,83 +106,91 @@ public class AFPBorderPainter extends Ab
             int thickness3 = (int)Math.floor(thickness / 3f);
             lineDataInfo.setThickness(thickness3);
             if (borderPaintInfo.isHorizontal()) {
-                lineDataInfo.x2 = Math.round(x2);
-                lineDataInfo.y2 = lineDataInfo.y1;
+                lineDataInfo.setX2 ( Math.round(x2) );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() );
                 dataStream.createLine(lineDataInfo);
                 int distance = thickness3 * 2;
                 lineDataInfo = new AFPLineDataInfo(lineDataInfo);
-                lineDataInfo.y1 += distance;
-                lineDataInfo.y2 += distance;
+                lineDataInfo.setY1 ( lineDataInfo.getY1() + distance );
+                lineDataInfo.setY2 ( lineDataInfo.getY2() + distance );
                 dataStream.createLine(lineDataInfo);
             } else {
-                lineDataInfo.x2 = lineDataInfo.x1;
-                lineDataInfo.y2 = Math.round(y2);
+                lineDataInfo.setX2 ( lineDataInfo.getX1() );
+                lineDataInfo.setY2 ( Math.round(y2) );
                 dataStream.createLine(lineDataInfo);
                 int distance = thickness3 * 2;
                 lineDataInfo = new AFPLineDataInfo(lineDataInfo);
-                lineDataInfo.x1 += distance;
-                lineDataInfo.x2 += distance;
+                lineDataInfo.setX1 ( lineDataInfo.getX1() + distance );
+                lineDataInfo.setX2 ( lineDataInfo.getX2() + distance );
                 dataStream.createLine(lineDataInfo);
             }
             break;
         case Constants.EN_DASHED:
-            int thick = lineDataInfo.thickness * 3;
+            int thick = lineDataInfo.getThickness() * 3;
             if (borderPaintInfo.isHorizontal()) {
-                lineDataInfo.x2 = lineDataInfo.x1 + thick;
-                lineDataInfo.y2 = lineDataInfo.y1;
+                lineDataInfo.setX2 ( lineDataInfo.getX1() + thick );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() );
                 int ex2 = Math.round(x2);
-                while (lineDataInfo.x1 + thick < ex2) {
+                while (lineDataInfo.getX1() + thick < ex2) {
                     dataStream.createLine(lineDataInfo);
-                    lineDataInfo.x1 += 2 * thick;
-                    lineDataInfo.x2 = lineDataInfo.x1 + thick;
+                    lineDataInfo.setX1 ( lineDataInfo.getX1() + 2 * thick );
+                    lineDataInfo.setX2 ( lineDataInfo.getX1() + thick );
                 }
             } else {
-                lineDataInfo.x2 = lineDataInfo.x1;
-                lineDataInfo.y2 = lineDataInfo.y1 + thick;
+                lineDataInfo.setX2 ( lineDataInfo.getX1() );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() + thick );
                 int ey2 = Math.round(y2);
-                while (lineDataInfo.y1 + thick < ey2) {
+                while (lineDataInfo.getY1() + thick < ey2) {
                     dataStream.createLine(lineDataInfo);
-                    lineDataInfo.y1 += 2 * thick;
-                    lineDataInfo.y2 = lineDataInfo.y1 + thick;
+                    lineDataInfo.setY1 ( lineDataInfo.getY1() + 2 * thick );
+                    lineDataInfo.setY2 ( lineDataInfo.getY1() + thick );
                 }
             }
             break;
         case Constants.EN_DOTTED:
             if (borderPaintInfo.isHorizontal()) {
-                lineDataInfo.x2 = lineDataInfo.x1 + lineDataInfo.thickness;
-                lineDataInfo.y2 = lineDataInfo.y1;
+                lineDataInfo.setX2 ( lineDataInfo.getX1() + lineDataInfo.getThickness() );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() );
                 int ex2 = Math.round(x2);
-                while (lineDataInfo.x1 + lineDataInfo.thickness < ex2) {
+                while (lineDataInfo.getX1() + lineDataInfo.getThickness() < ex2) {
                     dataStream.createLine(lineDataInfo);
-                    lineDataInfo.x1 += 3 * lineDataInfo.thickness;
-                    lineDataInfo.x2 = lineDataInfo.x1 + lineDataInfo.thickness;
+                    lineDataInfo.setX1 ( lineDataInfo.getX1() + 3 * lineDataInfo.getThickness() );
+                    lineDataInfo.setX2 ( lineDataInfo.getX1() + lineDataInfo.getThickness() );
                 }
             } else {
-                lineDataInfo.x2 = lineDataInfo.x1;
-                lineDataInfo.y2 = lineDataInfo.y1 + lineDataInfo.thickness;
+                lineDataInfo.setX2 ( lineDataInfo.getX1() );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() + lineDataInfo.getThickness() );
                 int ey2 = Math.round(y2);
-                while (lineDataInfo.y1 + lineDataInfo.thickness < ey2) {
+                while (lineDataInfo.getY1() + lineDataInfo.getThickness() < ey2) {
                     dataStream.createLine(lineDataInfo);
-                    lineDataInfo.y1 += 3 * lineDataInfo.thickness;
-                    lineDataInfo.y2 = lineDataInfo.y1 + lineDataInfo.thickness;
+                    lineDataInfo.setY1 ( lineDataInfo.getY1() + 3 * lineDataInfo.getThickness() );
+                    lineDataInfo.setY2 ( lineDataInfo.getY1() + lineDataInfo.getThickness() );
                 }
             }
             break;
         case Constants.EN_GROOVE:
         case Constants.EN_RIDGE:
             //TODO
-            lineDataInfo.x2 = Math.round(x2);
+            int yNew;
+            lineDataInfo.setX2 ( Math.round(x2) );
             float colFactor = (borderPaintInfo.getStyle() == Constants.EN_GROOVE ? 0.4f : -0.4f);
             float h3 = (y2 - y1) / 3;
-            lineDataInfo.color = ColorUtil.lightenColor(borderPaintInfo.getColor(), -colFactor);
-            lineDataInfo.thickness = Math.round(h3);
-            lineDataInfo.y1 = lineDataInfo.y2 = Math.round(y1);
+            lineDataInfo.setColor
+                ( ColorUtil.lightenColor(borderPaintInfo.getColor(), -colFactor) );
+            lineDataInfo.setThickness ( Math.round(h3) );
+            yNew = Math.round(y1);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
             dataStream.createLine(lineDataInfo);
-            lineDataInfo.color = borderPaintInfo.getColor();
-            lineDataInfo.y1 = lineDataInfo.y2 = Math.round(y1 + h3);
+            lineDataInfo.setColor ( borderPaintInfo.getColor() );
+            yNew = Math.round(y1 + h3);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
             dataStream.createLine(lineDataInfo);
-            lineDataInfo.color = ColorUtil.lightenColor(borderPaintInfo.getColor(), colFactor);
-            lineDataInfo.y1 = lineDataInfo.y2 = Math.round(y1 + h3 + h3);
+            lineDataInfo.setColor ( ColorUtil.lightenColor(borderPaintInfo.getColor(), colFactor) );
+            yNew = Math.round(y1 + h3 + h3);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
             dataStream.createLine(lineDataInfo);
             break;
         case Constants.EN_HIDDEN:
@@ -191,11 +200,11 @@ public class AFPBorderPainter extends Ab
         case Constants.EN_SOLID:
         default:
             if (borderPaintInfo.isHorizontal()) {
-                lineDataInfo.x2 = Math.round(x2);
-                lineDataInfo.y2 = lineDataInfo.y1;
+                lineDataInfo.setX2 ( Math.round(x2) );
+                lineDataInfo.setY2 ( lineDataInfo.getY1() );
             } else {
-                lineDataInfo.x2 = lineDataInfo.x1;
-                lineDataInfo.y2 = Math.round(y2);
+                lineDataInfo.setX2 ( lineDataInfo.getX1() );
+                lineDataInfo.setY2 ( Math.round(y2) );
             }
             dataStream.createLine(lineDataInfo);
         }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPDataObjectInfo.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPDataObjectInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPDataObjectInfo.java Wed Aug 25 16:49:26 2010
@@ -19,9 +19,6 @@
 
 package org.apache.fop.afp;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.afp.modca.Registry;
 import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
 
@@ -29,7 +26,6 @@ import org.apache.fop.afp.modca.triplets
  * A list of parameters associated with an AFP data objects
  */
 public class AFPDataObjectInfo {
-    private static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
 
     /** the object area info */
     private AFPObjectAreaInfo objectAreaInfo;
@@ -197,9 +193,9 @@ public class AFPDataObjectInfo {
     }
 
     /**
-     * Sets the data width resolution
+     * Sets the data height resolution
      *
-     * @param dataWidthRes the data width resolution
+     * @param dataHeightRes the data height resolution
      */
     public void setDataHeightRes(int dataHeightRes) {
         this.dataHeightRes = dataHeightRes;

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPEventProducer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPEventProducer.java Wed Aug 25 16:49:26 2010
@@ -28,7 +28,10 @@ import org.apache.fop.events.EventProduc
 public interface AFPEventProducer extends EventProducer {
 
     /** Provider class for the event producer. */
-    class Provider {
+    static final class Provider {
+
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPGraphics2D.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPGraphics2D.java Wed Aug 25 16:49:26 2010
@@ -75,7 +75,7 @@ import org.apache.fop.svg.NativeImageHan
  */
 public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHandler {
 
-    private static final Log log = LogFactory.getLog(AFPGraphics2D.class);
+    private static final Log LOG = LogFactory.getLog(AFPGraphics2D.class);
 
     private static final int X = 0;
 
@@ -321,7 +321,7 @@ public class AFPGraphics2D extends Abstr
                 graphicsObj.setLineType(type);
             }
         } else {
-            log.warn("Unsupported Stroke: " + stroke.getClass().getName());
+            LOG.warn("Unsupported Stroke: " + stroke.getClass().getName());
         }
     }
 
@@ -339,7 +339,7 @@ public class AFPGraphics2D extends Abstr
         if (paint instanceof Color) {
             return true;
         }
-        log.debug("NYI: applyPaint() " + paint + " fill=" + fill);
+        LOG.debug("NYI: applyPaint() " + paint + " fill=" + fill);
         if (paint instanceof TexturePaint) {
 //            TexturePaint texturePaint = (TexturePaint)paint;
 //            BufferedImage bufferedImage = texturePaint.getImage();
@@ -490,7 +490,7 @@ public class AFPGraphics2D extends Abstr
                 currentPosition = new double[]{openingCoords[0], openingCoords[1]};
                 break;
             default:
-                log.debug("Unrecognised path iterator type");
+                LOG.debug("Unrecognised path iterator type");
                 break;
             }
         }
@@ -498,13 +498,13 @@ public class AFPGraphics2D extends Abstr
 
     /** {@inheritDoc} */
     public void draw(Shape shape) {
-        log.debug("draw() shape=" + shape);
+        LOG.debug("draw() shape=" + shape);
         doDrawing(shape, false);
     }
 
     /** {@inheritDoc} */
     public void fill(Shape shape) {
-        log.debug("fill() shape=" + shape);
+        LOG.debug("fill() shape=" + shape);
         doDrawing(shape, true);
     }
 
@@ -516,7 +516,7 @@ public class AFPGraphics2D extends Abstr
      */
     public void handleIOException(IOException ioe) {
         // TODO Surely, there's a better way to do this.
-        log.error(ioe.getMessage());
+        LOG.error(ioe.getMessage());
         ioe.printStackTrace();
     }
 
@@ -659,29 +659,29 @@ public class AFPGraphics2D extends Abstr
 
     /** {@inheritDoc} */
     public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
-        log.debug("drawRenderableImage() NYI: img=" + img + ", xform=" + xform);
+        LOG.debug("drawRenderableImage() NYI: img=" + img + ", xform=" + xform);
     }
 
     /** {@inheritDoc} */
     public FontMetrics getFontMetrics(Font f) {
-        log.debug("getFontMetrics() NYI: f=" + f);
+        LOG.debug("getFontMetrics() NYI: f=" + f);
         return null;
     }
 
     /** {@inheritDoc} */
     public void setXORMode(Color col) {
-        log.debug("setXORMode() NYI: col=" + col);
+        LOG.debug("setXORMode() NYI: col=" + col);
     }
 
     /** {@inheritDoc} */
     public void addNativeImage(org.apache.xmlgraphics.image.loader.Image image,
             float x, float y, float width, float height) {
-        log.debug("NYI: addNativeImage() " + "image=" + image
+        LOG.debug("NYI: addNativeImage() " + "image=" + image
                 + ",x=" + x + ",y=" + y + ",width=" + width + ",height=" + height);
     }
 
     /** {@inheritDoc} */
     public void copyArea(int x, int y, int width, int height, int dx, int dy) {
-        log.debug("copyArea() NYI: ");
+        LOG.debug("copyArea() NYI: ");
     }
 }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPLineDataInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPLineDataInfo.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPLineDataInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPLineDataInfo.java Wed Aug 25 16:49:26 2010
@@ -25,25 +25,25 @@ import java.awt.Color;
 public class AFPLineDataInfo {
 
     /** the x1 coordinate */
-    int x1;
+    private int x1;
 
     /** the y1 coordinate */
-    int y1;
+    private int y1;
 
     /** the x2 coordinate */
-    int x2;
+    private int x2;
 
     /** the y2 coordinate */
-    int y2;
+    private int y2;
 
     /** the thickness */
-    int thickness;
+    private int thickness;
 
     /** the painting color */
-    Color color;
+    private Color color;
 
     /** the rotation */
-    int rotation = 0;
+    private int rotation = 0;
 
     /**
      * Default constructor

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPPaintingState.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPPaintingState.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPPaintingState.java Wed Aug 25 16:49:26 2010
@@ -26,7 +26,6 @@ import org.apache.commons.logging.LogFac
 
 import org.apache.xmlgraphics.java2d.color.ColorConverter;
 import org.apache.xmlgraphics.java2d.color.DefaultColorConverter;
-import org.apache.xmlgraphics.java2d.color.GrayScaleColorConverter;
 
 import org.apache.fop.afp.fonts.AFPPageFonts;
 import org.apache.fop.util.AbstractPaintingState;

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPRectanglePainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPRectanglePainter.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPRectanglePainter.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPRectanglePainter.java Wed Aug 25 16:49:26 2010
@@ -42,6 +42,7 @@ public class AFPRectanglePainter extends
         RectanglePaintingInfo rectanglePaintInfo = (RectanglePaintingInfo)paintInfo;
         int pageWidth = dataStream.getCurrentPage().getWidth();
         int pageHeight = dataStream.getCurrentPage().getHeight();
+        int yNew;
 
         AFPUnitConverter unitConv = paintingState.getUnitConverter();
         float width = unitConv.pt2units(rectanglePaintInfo.getWidth());
@@ -52,31 +53,39 @@ public class AFPRectanglePainter extends
         AffineTransform at = paintingState.getData().getTransform();
 
         AFPLineDataInfo lineDataInfo = new AFPLineDataInfo();
-        lineDataInfo.color = paintingState.getColor();
-        lineDataInfo.rotation = paintingState.getRotation();
-        lineDataInfo.thickness = Math.round(height);
+        lineDataInfo.setColor ( paintingState.getColor() );
+        lineDataInfo.setRotation ( paintingState.getRotation() );
+        lineDataInfo.setThickness ( Math.round(height) );
 
-        switch (lineDataInfo.rotation) {
+        switch (lineDataInfo.getRotation()) {
+        default:
         case 0:
-            lineDataInfo.x1 = Math.round((float)at.getTranslateX() + x);
-            lineDataInfo.y1 = lineDataInfo.y2 = Math.round((float)at.getTranslateY() + y);
-            lineDataInfo.x2 = Math.round((float)at.getTranslateX() + x + width);
+            lineDataInfo.setX1 ( Math.round((float)at.getTranslateX() + x) );
+            yNew = Math.round((float)at.getTranslateY() + y);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
+            lineDataInfo.setX2 ( Math.round((float)at.getTranslateX() + x + width) );
             break;
         case 90:
-            lineDataInfo.x1 = Math.round((float)at.getTranslateY() + x);
-            lineDataInfo.y1 = lineDataInfo.y2
-                = pageWidth - Math.round((float)at.getTranslateX()) + Math.round(y);
-            lineDataInfo.x2 = Math.round(width + (float)at.getTranslateY() + x);
+            lineDataInfo.setX1 ( Math.round((float)at.getTranslateY() + x) );
+            yNew = pageWidth - Math.round((float)at.getTranslateX()) + Math.round(y);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
+            lineDataInfo.setX2 ( Math.round(width + (float)at.getTranslateY() + x) );
             break;
         case 180:
-            lineDataInfo.x1 = pageWidth - Math.round((float)at.getTranslateX() - x);
-            lineDataInfo.y1 = lineDataInfo.y2 = pageHeight - Math.round((float)at.getTranslateY() - y);
-            lineDataInfo.x2 = pageWidth - Math.round((float)at.getTranslateX() - x - width);
+            lineDataInfo.setX1 ( pageWidth - Math.round((float)at.getTranslateX() - x) );
+            yNew = pageHeight - Math.round((float)at.getTranslateY() - y);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
+            lineDataInfo.setX2 ( pageWidth - Math.round((float)at.getTranslateX() - x - width) );
             break;
         case 270:
-            lineDataInfo.x1 = pageHeight - Math.round((float)at.getTranslateY() - x);
-            lineDataInfo.y1 = lineDataInfo.y2 = Math.round((float)at.getTranslateX() + y);
-            lineDataInfo.x2 = pageHeight - Math.round((float)at.getTranslateY() - x - width);
+            lineDataInfo.setX1 ( pageHeight - Math.round((float)at.getTranslateY() - x) );
+            yNew = Math.round((float)at.getTranslateX() + y);
+            lineDataInfo.setY1 ( yNew );
+            lineDataInfo.setY2 ( yNew );
+            lineDataInfo.setX2 ( pageHeight - Math.round((float)at.getTranslateY() - x - width) );
             break;
         }
         dataStream.createLine(lineDataInfo);

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPStreamer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPStreamer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPStreamer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/afp/AFPStreamer.java Wed Aug 25 16:49:26 2010
@@ -31,6 +31,7 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.afp.modca.ResourceGroup;
 import org.apache.fop.afp.modca.StreamedResourceGroup;
 
@@ -39,7 +40,7 @@ import org.apache.fop.afp.modca.Streamed
  */
 public class AFPStreamer implements Streamable {
     /** Static logging instance */
-    private static final Log log = LogFactory.getLog(AFPStreamer.class);
+    private static final Log LOG = LogFactory.getLog(AFPStreamer.class);
 
     private static final String AFPDATASTREAM_TEMP_FILE_PREFIX = "AFPDataStream_";
 
@@ -119,7 +120,7 @@ public class AFPStreamer implements Stre
         if (level.isExternal()) {
             String filePath = level.getExternalFilePath();
             if (filePath == null) {
-                log.warn("No file path provided for external resource, using default.");
+                LOG.warn("No file path provided for external resource, using default.");
                 filePath = defaultResourceGroupFilePath;
             }
             resourceGroup = (ResourceGroup)pathResourceGroupMap.get(filePath);
@@ -128,7 +129,7 @@ public class AFPStreamer implements Stre
                 try {
                     os = new BufferedOutputStream(new FileOutputStream(filePath));
                 } catch (FileNotFoundException fnfe) {
-                    log.error("Failed to create/open external resource group file '"
+                    LOG.error("Failed to create/open external resource group file '"
                             + filePath + "'");
                 } finally {
                     if (os != null) {



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