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 je...@apache.org on 2009/02/06 15:39:08 UTC

svn commit: r741576 - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: examples/embedding/java/embedding/atxml/ examples/embedding/java/embedding/intermediate/ src/java/META-INF/services/ src/java/org/apache/fop/render/ src/java/org/apache/fop/rend...

Author: jeremias
Date: Fri Feb  6 14:39:07 2009
New Revision: 741576

URL: http://svn.apache.org/viewvc?rev=741576&view=rev
Log:
Moved area tree example to package embedding/atxml.
Created a new concatenation example for the new IF in package embedding/intermediate.
Exchanged IFRendererMaker with IFSerializerMaker.
Removed unused method getConfigurator() from document handler makers.
Extracting original nested IFException in IFParser's parse() method.
Removed obsolete IFSerializerConfiguration. Now covered by PrintRendererConfigurator.
Delegating FontInfo setter calls to mimic handlers in IFSerializer.
Fixed a bug in RendererFactory for the case when FOUserAgent.setDocumentHandlerOverride() is used.
Added a generic IFDocumentHandler proxy class (IFDocumentHandlerProxy).
Added a simple IFConcatenator helper class for simple IF concatenations (experimental).

Added:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java   (contents, props changed)
      - copied, changed from r741121, xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java   (contents, props changed)
      - copied, changed from r741121, xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleStamp.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java   (with props)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java   (with props)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java   (with props)
Removed:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRendererMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerConfiguration.java
Modified:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.Renderer
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/RendererFactory.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFParser.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFUtil.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java

Copied: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java (from r741121, xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java?p2=xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java&p1=xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java&r1=741121&r2=741576&rev=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java Fri Feb  6 14:39:07 2009
@@ -17,7 +17,7 @@
 
 /* $Id$ */
 
-package embedding.intermediate;
+package embedding.atxml;
 
 import java.io.File;
 import java.io.IOException;
@@ -31,6 +31,8 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.xml.sax.SAXException;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
@@ -42,15 +44,14 @@
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.render.Renderer;
 import org.apache.fop.render.xml.XMLRenderer;
-import org.xml.sax.SAXException;
 
 import embedding.ExampleObj2XML;
 import embedding.model.ProjectMember;
 import embedding.model.ProjectTeam;
 
 /**
- * Example for the intermediate format that demonstrates the concatenation of two documents
- * renderered to the intermediate format. A single PDF file is generated from the two intermediate
+ * Example for the area tree XML format that demonstrates the concatenation of two documents
+ * rendered to the area tree XML format. A single PDF file is generated from the two area tree
  * files.
  */
 public class ExampleConcat {
@@ -73,15 +74,15 @@
     }
 
     /**
-     * Converts an XSL-FO document to an intermediate file.
+     * Converts an XSL-FO document to an area tree XML file.
      * @param src the source file
      * @param xslt the stylesheet file
-     * @param intermediate the target intermediate file (area tree XML)
+     * @param areaTreeFile the target area tree XML file
      * @throws IOException In case of an I/O problem
      * @throws FOPException In case of a FOP problem
      * @throws TransformerException In case of a XSL transformation problem
      */
-    public void convertToIntermediate(Source src, Source xslt, File intermediate)
+    public void convertToAreaTreeXML(Source src, Source xslt, File areaTreeFile)
                 throws IOException, FOPException, TransformerException {
 
         //Create a user agent
@@ -91,7 +92,7 @@
         Renderer targetRenderer = userAgent.getRendererFactory().createRenderer(
                 userAgent, MimeConstants.MIME_PDF);
 
-        //Create the XMLRenderer to create the intermediate format (area tree XML)
+        //Create the XMLRenderer to create the area tree XML
         XMLRenderer xmlRenderer = new XMLRenderer();
         xmlRenderer.setUserAgent(userAgent);
 
@@ -102,7 +103,7 @@
         userAgent.setRendererOverride(xmlRenderer);
 
         // Setup output
-        OutputStream out = new java.io.FileOutputStream(intermediate);
+        OutputStream out = new java.io.FileOutputStream(areaTreeFile);
         out = new java.io.BufferedOutputStream(out);
         try {
             // Construct fop (the MIME type here is unimportant due to the override
@@ -129,8 +130,8 @@
     }
 
     /**
-     * Concatenates an array of intermediate files to a single PDF file.
-     * @param files the array of intermediate files (area tree XML)
+     * Concatenates an array of area tree XML files to a single PDF file.
+     * @param files the array of area tree XML files
      * @param pdffile the target PDF file
      * @throws IOException In case of an I/O problem
      * @throws TransformerException In case of a XSL transformation problem
@@ -150,7 +151,7 @@
             AreaTreeModel treeModel = new RenderPagesModel(userAgent,
                     MimeConstants.MIME_PDF, fontInfo, out);
 
-            //Iterate over all intermediate files
+            //Iterate over all area tree files
             AreaTreeParser parser = new AreaTreeParser();
             for (int i = 0; i < files.length; i++) {
                 Source src = new StreamSource(files[i]);
@@ -184,7 +185,7 @@
                     new File(outDir, "team2.at.xml")};
             File pdffile = new File(outDir, "ResultConcat.pdf");
             for (int i = 0; i < files.length; i++) {
-                System.out.println("Intermediate file " + (i + 1) + ": "
+                System.out.println("Area Tree XML file " + (i + 1) + ": "
                         + files[i].getCanonicalPath());
             }
             System.out.println("PDF Output File: " + pdffile.getCanonicalPath());
@@ -196,15 +197,15 @@
 
             ExampleConcat app = new ExampleConcat();
 
-            //Create intermediate files
-            app.convertToIntermediate(
+            //Create area tree XML files
+            app.convertToAreaTreeXML(
                     team1.getSourceForProjectTeam(),
                     new StreamSource(xsltfile), files[0]);
-            app.convertToIntermediate(
+            app.convertToAreaTreeXML(
                     team2.getSourceForProjectTeam(),
                     new StreamSource(xsltfile), files[1]);
 
-            //Concatenate the individual intermediate files to one document
+            //Concatenate the individual area tree files to one document
             app.concatToPDF(files, pdffile);
 
             System.out.println("Success!");

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleConcat.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Feb  6 14:39:07 2009
@@ -0,0 +1,3 @@
+/xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/embedding/java/embedding/intermediate/ExampleConcat.java:630874-721418
+/xmlgraphics/fop/branches/fop-0_95/examples/embedding/java/embedding/intermediate/ExampleConcat.java:684572,688085,688696
+/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/ExampleConcat.java:603620-741103

Copied: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java (from r741121, xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleStamp.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java?p2=xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java&p1=xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleStamp.java&r1=741121&r2=741576&rev=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleStamp.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java Fri Feb  6 14:39:07 2009
@@ -17,7 +17,7 @@
 
 /* $Id$ */
 
-package embedding.intermediate;
+package embedding.atxml;
 
 import java.io.File;
 import java.io.IOException;
@@ -30,6 +30,8 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.xml.sax.SAXException;
+
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
@@ -37,13 +39,12 @@
 import org.apache.fop.area.AreaTreeParser;
 import org.apache.fop.area.RenderPagesModel;
 import org.apache.fop.fonts.FontInfo;
-import org.xml.sax.SAXException;
 
 import embedding.ExampleObj2XML;
 import embedding.model.ProjectTeam;
 
 /**
- * Example for the intermediate format that demonstrates the stamping of a document with some
+ * Example for the area tree XML format that demonstrates the stamping of a document with some
  * kind of watermark. The resulting document is then rendered to a PDF file.
  */
 public class ExampleStamp {
@@ -52,8 +53,8 @@
     private FopFactory fopFactory = FopFactory.newInstance();
 
     /**
-     * Stamps an intermediate file and renders it to a PDF file.
-     * @param atfile the intermediate file (area tree XML)
+     * Stamps an area tree XML file and renders it to a PDF file.
+     * @param atfile the area tree XML file
      * @param stampSheet the stylesheet that does the stamping
      * @param pdffile the target PDF file
      * @throws IOException In case of an I/O problem
@@ -74,7 +75,7 @@
             AreaTreeModel treeModel = new RenderPagesModel(userAgent,
                     MimeConstants.MIME_PDF, fontInfo, out);
 
-            //Iterate over all intermediate files
+            //Iterate over all area tree files
             AreaTreeParser parser = new AreaTreeParser();
             Source src = new StreamSource(atfile);
             Source xslt = new StreamSource(stampSheet);
@@ -114,20 +115,20 @@
             File atfile = new File(outDir, "team.at.xml");
             File stampxsltfile = new File(baseDir, "xml/xslt/atstamp.xsl");
             File pdffile = new File(outDir, "ResultStamped.pdf");
-            System.out.println("Intermediate file : " + atfile.getCanonicalPath());
+            System.out.println("Area Tree XML file : " + atfile.getCanonicalPath());
             System.out.println("Stamp XSLT: " + stampxsltfile.getCanonicalPath());
             System.out.println("PDF Output File: " + pdffile.getCanonicalPath());
             System.out.println();
 
             ProjectTeam team1 = ExampleObj2XML.createSampleProjectTeam();
 
-            //Create intermediate file
+            //Create area tree XML file
             ExampleConcat concatapp = new ExampleConcat();
-            concatapp.convertToIntermediate(
+            concatapp.convertToAreaTreeXML(
                     team1.getSourceForProjectTeam(),
                     new StreamSource(xsltfile), atfile);
 
-            //Stamp document and produce a PDF from the intermediate format
+            //Stamp document and produce a PDF from the area tree XML format
             ExampleStamp app = new ExampleStamp();
             app.stampToPDF(atfile, stampxsltfile, pdffile);
 

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/atxml/ExampleStamp.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Feb  6 14:39:07 2009
@@ -0,0 +1,3 @@
+/xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/embedding/java/embedding/intermediate/ExampleStamp.java:630874-721418
+/xmlgraphics/fop/branches/fop-0_95/examples/embedding/java/embedding/intermediate/ExampleStamp.java:684572,688085,688696
+/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/ExampleStamp.java:603620-741103

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/embedding/java/embedding/intermediate/ExampleConcat.java Fri Feb  6 14:39:07 2009
@@ -29,20 +29,22 @@
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.xml.sax.SAXException;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.area.AreaTreeModel;
-import org.apache.fop.area.AreaTreeParser;
-import org.apache.fop.area.RenderPagesModel;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.render.Renderer;
-import org.apache.fop.render.xml.XMLRenderer;
-import org.xml.sax.SAXException;
+import org.apache.fop.render.intermediate.IFContext;
+import org.apache.fop.render.intermediate.IFDocumentHandler;
+import org.apache.fop.render.intermediate.IFException;
+import org.apache.fop.render.intermediate.IFSerializer;
+import org.apache.fop.render.intermediate.IFUtil;
+import org.apache.fop.render.intermediate.util.IFConcatenator;
 
 import embedding.ExampleObj2XML;
 import embedding.model.ProjectMember;
@@ -50,7 +52,7 @@
 
 /**
  * Example for the intermediate format that demonstrates the concatenation of two documents
- * renderered to the intermediate format. A single PDF file is generated from the two intermediate
+ * rendered to the intermediate format. A single PDF file is generated from the two intermediate
  * files.
  */
 public class ExampleConcat {
@@ -76,7 +78,7 @@
      * Converts an XSL-FO document to an intermediate file.
      * @param src the source file
      * @param xslt the stylesheet file
-     * @param intermediate the target intermediate file (area tree XML)
+     * @param intermediate the target intermediate file
      * @throws IOException In case of an I/O problem
      * @throws FOPException In case of a FOP problem
      * @throws TransformerException In case of a XSL transformation problem
@@ -87,25 +89,26 @@
         //Create a user agent
         FOUserAgent userAgent = fopFactory.newFOUserAgent();
 
-        //Create an instance of the target renderer so the XMLRenderer can use its font setup
-        Renderer targetRenderer = userAgent.getRendererFactory().createRenderer(
-                userAgent, MimeConstants.MIME_PDF);
-
-        //Create the XMLRenderer to create the intermediate format (area tree XML)
-        XMLRenderer xmlRenderer = new XMLRenderer();
-        xmlRenderer.setUserAgent(userAgent);
+        //Create an instance of the target document handler so the IFSerializer
+        //can use its font setup
+        IFDocumentHandler targetHandler = userAgent.getRendererFactory().createDocumentHandler(
+                userAgent, MimeConstants.MIME_PDF + ";mode=painter");
+
+        //Create the IFSerializer to write the intermediate format
+        IFSerializer ifSerializer = new IFSerializer();
+        ifSerializer.setContext(new IFContext(userAgent));
 
-        //Tell the XMLRenderer to mimic the target renderer
-        xmlRenderer.mimicRenderer(targetRenderer);
+        //Tell the IFSerializer to mimic the target format
+        ifSerializer.mimicDocumentHandler(targetHandler);
 
-        //Make sure the prepared XMLRenderer is used
-        userAgent.setRendererOverride(xmlRenderer);
+        //Make sure the prepared document handler is used
+        userAgent.setDocumentHandlerOverride(ifSerializer);
 
         // Setup output
         OutputStream out = new java.io.FileOutputStream(intermediate);
         out = new java.io.BufferedOutputStream(out);
         try {
-            // Construct fop (the MIME type here is unimportant due to the override
+            // Construct FOP (the MIME type here is unimportant due to the override
             // on the user agent)
             Fop fop = fopFactory.newFop(null, userAgent, out);
 
@@ -130,35 +133,41 @@
 
     /**
      * Concatenates an array of intermediate files to a single PDF file.
-     * @param files the array of intermediate files (area tree XML)
+     * @param files the array of intermediate files
      * @param pdffile the target PDF file
      * @throws IOException In case of an I/O problem
      * @throws TransformerException In case of a XSL transformation problem
      * @throws SAXException In case of an XML-related problem
+     * @throws IFException if there was an IF-related error while creating the output file
      */
     public void concatToPDF(File[] files, File pdffile)
-            throws IOException, TransformerException, SAXException {
+            throws IOException, TransformerException, SAXException, IFException {
         // Setup output
         OutputStream out = new java.io.FileOutputStream(pdffile);
         out = new java.io.BufferedOutputStream(out);
         try {
-            //Setup fonts and user agent
-            FontInfo fontInfo = new FontInfo();
+            //Setup user agent
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
 
-            //Construct the AreaTreeModel that will received the individual pages
-            AreaTreeModel treeModel = new RenderPagesModel(userAgent,
-                    MimeConstants.MIME_PDF, fontInfo, out);
+            //Setup target handler
+            String mime = MimeConstants.MIME_PDF + ";mode=painter";
+            IFDocumentHandler targetHandler = fopFactory.getRendererFactory().createDocumentHandler(
+                    userAgent, mime);
+
+            //Setup fonts
+            IFUtil.setupFonts(targetHandler);
+            targetHandler.setResult(new StreamResult(pdffile));
+
+            IFConcatenator concatenator = new IFConcatenator(targetHandler, null);
 
             //Iterate over all intermediate files
-            AreaTreeParser parser = new AreaTreeParser();
             for (int i = 0; i < files.length; i++) {
                 Source src = new StreamSource(files[i]);
-                parser.parse(src, treeModel, userAgent);
+                concatenator.appendDocument(src);
             }
 
-            //Signal the end of the processing. The renderer can finalize the target document.
-            treeModel.endDocument();
+            //Signal the end of the processing so the target file can be finalized properly.
+            concatenator.finish();
         } finally {
             out.close();
         }
@@ -170,7 +179,7 @@
      */
     public static void main(String[] args) {
         try {
-            System.out.println("FOP ExampleConcat\n");
+            System.out.println("FOP ExampleConcat (for the Intermediate Format)\n");
 
             //Setup directories
             File baseDir = new File(".");
@@ -180,9 +189,9 @@
             //Setup output file
             File xsltfile = new File(baseDir, "xml/xslt/projectteam2fo.xsl");
             File[] files = new File[] {
-                    new File(outDir, "team1.at.xml"),
-                    new File(outDir, "team2.at.xml")};
-            File pdffile = new File(outDir, "ResultConcat.pdf");
+                    new File(outDir, "team1.if.xml"),
+                    new File(outDir, "team2.if.xml")};
+            File pdffile = new File(outDir, "ResultIFConcat.pdf");
             for (int i = 0; i < files.length; i++) {
                 System.out.println("Intermediate file " + (i + 1) + ": "
                         + files[i].getCanonicalPath());

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.Renderer
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.Renderer?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.Renderer (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.Renderer Fri Feb  6 14:39:07 2009
@@ -7,5 +7,4 @@
 org.apache.fop.render.awt.AWTRendererMaker
 org.apache.fop.render.print.PrintRendererMaker
 org.apache.fop.render.afp.AFPRendererMaker
-org.apache.fop.render.pcl.PCLRendererMaker
-org.apache.fop.render.intermediate.IFRendererMaker
+org.apache.fop.render.pcl.PCLRendererMaker
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler Fri Feb  6 14:39:07 2009
@@ -2,4 +2,5 @@
 org.apache.fop.render.pcl.PCLDocumentHandlerMaker
 org.apache.fop.render.bitmap.TIFFDocumentHandlerMaker
 org.apache.fop.render.ps.PSDocumentHandlerMaker
-org.apache.fop.render.afp.AFPDocumentHandlerMaker
\ No newline at end of file
+org.apache.fop.render.afp.AFPDocumentHandlerMaker
+org.apache.fop.render.intermediate.IFSerializerMaker
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java Fri Feb  6 14:39:07 2009
@@ -41,9 +41,11 @@
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
+import org.apache.fop.fonts.CustomFontCollection;
 import org.apache.fop.fonts.EmbedFontInfo;
 import org.apache.fop.fonts.EncodingMode;
 import org.apache.fop.fonts.FontCache;
+import org.apache.fop.fonts.FontCollection;
 import org.apache.fop.fonts.FontEventAdapter;
 import org.apache.fop.fonts.FontEventListener;
 import org.apache.fop.fonts.FontInfo;
@@ -53,13 +55,16 @@
 import org.apache.fop.fonts.FontUtil;
 import org.apache.fop.fonts.autodetect.FontFileFinder;
 import org.apache.fop.fonts.autodetect.FontInfoFinder;
+import org.apache.fop.fonts.base14.Base14FontCollection;
+import org.apache.fop.render.intermediate.IFDocumentHandler;
+import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 import org.apache.fop.util.LogUtil;
 
 /**
  * Base Print renderer configurator (mostly handles font configuration)
  */
 public class PrintRendererConfigurator extends AbstractRendererConfigurator
-            implements RendererConfigurator {
+            implements RendererConfigurator, IFDocumentHandlerConfigurator {
 
     /** logger instance */
     protected static Log log = LogFactory.getLog(PrintRendererConfigurator.class);
@@ -452,4 +457,33 @@
         return embedFontInfo;
     }
 
+    // ---=== IFDocumentHandler configuration ===---
+
+    /** {@inheritDoc} */
+    public void configure(IFDocumentHandler documentHandler) throws FOPException {
+        //nop
+    }
+
+    /** {@inheritDoc} */
+    public void setupFontInfo(IFDocumentHandler documentHandler, FontInfo fontInfo)
+                throws FOPException {
+        FontManager fontManager = userAgent.getFactory().getFontManager();
+        List fontCollections = new java.util.ArrayList();
+        fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled()));
+
+        Configuration cfg = super.getRendererConfig(documentHandler.getMimeType());
+        if (cfg != null) {
+            FontResolver fontResolver = new DefaultFontResolver(userAgent);
+            FontEventListener listener = new FontEventAdapter(
+                    userAgent.getEventBroadcaster());
+            List fontList = buildFontList(cfg, fontResolver, listener);
+            fontCollections.add(new CustomFontCollection(fontResolver, fontList));
+        }
+
+        fontManager.setup(fontInfo,
+                (FontCollection[])fontCollections.toArray(
+                        new FontCollection[fontCollections.size()]));
+        documentHandler.setFontInfo(fontInfo);
+    }
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/RendererFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/RendererFactory.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/RendererFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/RendererFactory.java Fri Feb  6 14:39:07 2009
@@ -287,7 +287,8 @@
             } else {
                 AbstractRendererMaker rendMaker = getRendererMaker(outputFormat);
                 AbstractIFDocumentHandlerMaker documentHandlerMaker = null;
-                boolean outputStreamMissing = (userAgent.getRendererOverride() == null);
+                boolean outputStreamMissing = (userAgent.getRendererOverride() == null)
+                    && (userAgent.getDocumentHandlerOverride() == null);
                 if (rendMaker == null) {
                     documentHandlerMaker = getDocumentHandlerMaker(outputFormat);
                     if (documentHandlerMaker != null) {
@@ -299,6 +300,7 @@
                 }
                 if (userAgent.getRendererOverride() != null
                         || rendMaker != null
+                        || userAgent.getDocumentHandlerOverride() != null
                         || documentHandlerMaker != null) {
                     if (outputStreamMissing) {
                         throw new FOPException(
@@ -418,7 +420,8 @@
         Iterator providers = Service.providers(IFDocumentHandler.class);
         if (providers != null) {
             while (providers.hasNext()) {
-                AbstractIFDocumentHandlerMaker maker = (AbstractIFDocumentHandlerMaker)providers.next();
+                AbstractIFDocumentHandlerMaker maker
+                    = (AbstractIFDocumentHandlerMaker)providers.next();
                 try {
                     if (log.isDebugEnabled()) {
                         log.debug("Dynamically adding maker for IFDocumentHandler: "

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -24,7 +24,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Intermediate format document handler factory for AFP output.
@@ -52,9 +51,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new AFPRendererConfigurator(userAgent);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -24,7 +24,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Document handler factory for TIFF output.
@@ -51,9 +50,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new TIFFRendererConfigurator(userAgent);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -45,14 +45,6 @@
     public abstract String[] getSupportedMimeTypes();
 
     /**
-     * Returns a configurator object that can be used to
-     * configure the document handler.
-     * @param userAgent the user agent
-     * @return a configurator object that can be used to configure the document handler
-     */
-    public abstract IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent);
-
-    /**
      * Indicates whether a specific MIME type is supported by this document handler.
      * @param mimeType the MIME type (ex. "application/pdf")
      * @return true if the MIME type is supported

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFParser.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFParser.java Fri Feb  6 14:39:07 2009
@@ -79,15 +79,29 @@
      * @param documentHandler the intermediate format document handler used to process the IF events
      * @param userAgent the user agent
      * @throws TransformerException if an error occurs while parsing the area tree XML
+     * @throws IFException if an IF-related error occurs inside the target document handler
      */
     public void parse(Source src, IFDocumentHandler documentHandler, FOUserAgent userAgent)
-            throws TransformerException {
-        Transformer transformer = tFactory.newTransformer();
-        transformer.setErrorListener(new DefaultErrorListener(log));
-
-        SAXResult res = new SAXResult(getContentHandler(documentHandler, userAgent));
-
-        transformer.transform(src, res);
+            throws TransformerException, IFException {
+        try {
+            Transformer transformer = tFactory.newTransformer();
+            transformer.setErrorListener(new DefaultErrorListener(log));
+
+            SAXResult res = new SAXResult(getContentHandler(documentHandler, userAgent));
+
+            transformer.transform(src, res);
+        } catch (TransformerException te) {
+            //Unpack original IFException if applicable
+            if (te.getCause() instanceof SAXException) {
+                SAXException se = (SAXException)te.getCause();
+                if (se.getCause() instanceof IFException) {
+                    throw (IFException)se.getCause();
+                }
+            } else if (te.getCause() instanceof IFException) {
+                throw (IFException)te.getCause();
+            }
+            throw te;
+        }
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java Fri Feb  6 14:39:07 2009
@@ -176,12 +176,7 @@
         if (this.documentHandler == null) {
             this.documentHandler = createDefaultDocumentHandler();
         }
-        IFDocumentHandlerConfigurator configurator = this.documentHandler.getConfigurator();
-        if (configurator != null) {
-            configurator.setupFontInfo(documentHandler, inFontInfo);
-        } else {
-            this.documentHandler.setDefaultFontInfo(inFontInfo);
-        }
+        IFUtil.setupFonts(this.documentHandler, inFontInfo);
         this.fontInfo = inFontInfo;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializer.java Fri Feb  6 14:39:07 2009
@@ -38,6 +38,7 @@
 import org.apache.xmlgraphics.util.XMLizable;
 
 import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.RenderingContext;
 import org.apache.fop.render.intermediate.extensions.AbstractAction;
 import org.apache.fop.render.intermediate.extensions.Bookmark;
@@ -91,7 +92,7 @@
         if (this.mimicHandler != null) {
             return getMimickedDocumentHandler().getConfigurator();
         } else {
-            return new IFSerializerConfiguration(getUserAgent());
+            return new PrintRendererConfigurator(getUserAgent());
         }
     }
 
@@ -128,12 +129,16 @@
 
     /** {@inheritDoc} */
     public void setFontInfo(FontInfo fontInfo) {
-        //nop, not used
+        if (this.mimicHandler != null) {
+            this.mimicHandler.setFontInfo(fontInfo);
+        }
     }
 
     /** {@inheritDoc} */
     public void setDefaultFontInfo(FontInfo fontInfo) {
-        //nop, not used
+        if (this.mimicHandler != null) {
+            this.mimicHandler.setDefaultFontInfo(fontInfo);
+        }
     }
 
     /** {@inheritDoc} */

Added: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java?rev=741576&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java (added)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java Fri Feb  6 14:39:07 2009
@@ -0,0 +1,47 @@
+/*
+ * 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$ */
+
+package org.apache.fop.render.intermediate;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+
+/**
+ * Intermediate format document handler factory for intermediate format XML output.
+ */
+public class IFSerializerMaker extends AbstractIFDocumentHandlerMaker {
+
+    /** {@inheritDoc} */
+    public IFDocumentHandler makeIFDocumentHandler(FOUserAgent ua) {
+        IFSerializer handler = new IFSerializer();
+        handler.setContext(new IFContext(ua));
+        return handler;
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsOutputStream() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getSupportedMimeTypes() {
+        return new String[] {MimeConstants.MIME_FOP_IF};
+    }
+
+}

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFSerializerMaker.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFUtil.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFUtil.java Fri Feb  6 14:39:07 2009
@@ -22,6 +22,9 @@
 import java.awt.Rectangle;
 import java.awt.geom.AffineTransform;
 
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.util.DecimalFormatCache;
 
 /**
@@ -137,4 +140,36 @@
         return sb.toString();
     }
 
+    /**
+     * Sets up the fonts on a document handler. If the document handler provides a configurator
+     * object the configuration from the {@link FopFactory} will be used. Otherwise,
+     * a default font configuration will be set up.
+     * @param documentHandler the document handler
+     * @param fontInfo the font info object (may be null)
+     * @throws FOPException if an error occurs while setting up the fonts
+     */
+    public static void setupFonts(IFDocumentHandler documentHandler, FontInfo fontInfo)
+                throws FOPException {
+        if (fontInfo == null) {
+            fontInfo = new FontInfo();
+        }
+        IFDocumentHandlerConfigurator configurator = documentHandler.getConfigurator();
+        if (configurator != null) {
+            configurator.setupFontInfo(documentHandler, fontInfo);
+        } else {
+            documentHandler.setDefaultFontInfo(fontInfo);
+        }
+    }
+
+    /**
+     * Sets up the fonts on a document handler. If the document handler provides a configurator
+     * object the configuration from the {@link FopFactory} will be used. Otherwise,
+     * a default font configuration will be set up.
+     * @param documentHandler the document handler
+     * @throws FOPException if an error occurs while setting up the fonts
+     */
+    public static void setupFonts(IFDocumentHandler documentHandler) throws FOPException {
+        setupFonts(documentHandler, null);
+    }
+
 }

Added: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java?rev=741576&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java (added)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java Fri Feb  6 14:39:07 2009
@@ -0,0 +1,182 @@
+/*
+ * 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$ */
+
+package org.apache.fop.render.intermediate.util;
+
+
+import java.awt.Dimension;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+
+import org.apache.fop.render.intermediate.IFDocumentHandler;
+import org.apache.fop.render.intermediate.IFDocumentNavigationHandler;
+import org.apache.fop.render.intermediate.IFException;
+import org.apache.fop.render.intermediate.IFParser;
+
+/**
+ * This class allows to concatenate multiple intermediate format files to a single output file
+ * in the final format. It is based on the SAX API and is therefore very fast and does not
+ * require to load the individual documents into memory as DOM documents, for example.
+ * <p>
+ * Note: This class will filter/ignore any document navigation events. Support for this may be
+ * added later.
+ */
+public class IFConcatenator {
+
+    private IFDocumentHandler targetHandler;
+
+    private int nextPageIndex = 0;
+
+    /**
+     * Creates a new IF concatenator.
+     * @param targetHandler the target document handler
+     * @param metadata the metadata object for the generated file (may be null)
+     * @throws IFException if an IF-related error occurs
+     */
+    public IFConcatenator(IFDocumentHandler targetHandler, Metadata metadata) throws IFException {
+        this.targetHandler = targetHandler;
+        startDocument(metadata);
+    }
+
+    private void startDocument(Metadata metadata) throws IFException {
+        this.targetHandler.startDocument();
+        this.targetHandler.startDocumentHeader();
+        if (metadata != null) {
+            this.targetHandler.handleExtensionObject(metadata);
+        }
+        this.targetHandler.endDocumentHeader();
+    }
+
+    private void endDocument() throws IFException {
+        this.targetHandler.startPageTrailer();
+        this.targetHandler.endPageTrailer();
+        this.targetHandler.endDocument();
+    }
+
+    /**
+     * Returns the target document handler.
+     * @return the target document handler
+     */
+    protected IFDocumentHandler getTargetHandler() {
+        return this.targetHandler;
+    }
+
+    /**
+     * Properly finishes the current output file by creating an empty document trailer and calling
+     * {@link IFDocumentHandler#endDocument()}.
+     * @throws IFException if an IF-related error occurs
+     */
+    public void finish() throws IFException {
+        endDocument();
+    }
+
+    /**
+     * Appends another intermediate format document to the current output file. All document-level
+     * content (i.e. the document header and trailer) is ignored. This method shall not be called
+     * after {@link #finish()} has been called.
+     * @param src the JAXP Source identifying the input document
+     * @throws TransformerException if an XML-related exception occurs during
+     * @throws IFException if an IF-related error occurs
+     */
+    public void appendDocument(Source src) throws TransformerException, IFException {
+        IFParser parser = new IFParser();
+        parser.parse(src, new IFPageSequenceFilter(getTargetHandler()),
+                getTargetHandler().getContext().getUserAgent());
+    }
+
+    private class IFPageSequenceFilter extends IFDocumentHandlerProxy {
+
+        private boolean inPageSequence = false;
+
+        public IFPageSequenceFilter(IFDocumentHandler delegate) {
+            super(delegate);
+        }
+
+        /** {@inheritDoc} */
+        public void startDocument() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void startDocumentHeader() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void endDocumentHeader() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void startPageSequence(String id) throws IFException {
+            assert !this.inPageSequence;
+            this.inPageSequence = true;
+
+            super.startPageSequence(id);
+        }
+
+        /** {@inheritDoc} */
+        public void startPage(int index, String name, String pageMasterName, Dimension size)
+                throws IFException {
+            //Adjust page indices
+            super.startPage(nextPageIndex, name, pageMasterName, size);
+            nextPageIndex++;
+        }
+
+        /** {@inheritDoc} */
+        public void endPageSequence() throws IFException {
+            super.endPageSequence();
+
+            assert this.inPageSequence;
+            this.inPageSequence = false;
+        }
+
+        /** {@inheritDoc} */
+        public void startDocumentTrailer() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void endDocumentTrailer() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void endDocument() throws IFException {
+            //ignore
+        }
+
+        /** {@inheritDoc} */
+        public void handleExtensionObject(Object extension) throws IFException {
+            if (inPageSequence) {
+                //Only pass through when inside page-sequence
+                super.handleExtensionObject(extension);
+            }
+        }
+
+        /** {@inheritDoc} */
+        public IFDocumentNavigationHandler getDocumentNavigationHandler() {
+            return null; //Document Navigation is filtered!!!
+        }
+
+    }
+}

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java?rev=741576&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java (added)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java Fri Feb  6 14:39:07 2009
@@ -0,0 +1,187 @@
+/*
+ * 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$ */
+
+package org.apache.fop.render.intermediate.util;
+
+import java.awt.Dimension;
+
+import javax.xml.transform.Result;
+
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.render.intermediate.IFContext;
+import org.apache.fop.render.intermediate.IFDocumentHandler;
+import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
+import org.apache.fop.render.intermediate.IFDocumentNavigationHandler;
+import org.apache.fop.render.intermediate.IFException;
+import org.apache.fop.render.intermediate.IFPainter;
+
+/**
+ * This class is a simple proxy that delegates all method calls to another {@link IFDocumentHandler}
+ * instance.
+ */
+public class IFDocumentHandlerProxy implements IFDocumentHandler {
+
+    /** the delegate IFDocumentHandler */
+    protected IFDocumentHandler delegate;
+
+    /**
+     * Creates a new proxy instance.
+     * @param delegate the delegate instance
+     */
+    public IFDocumentHandlerProxy(IFDocumentHandler delegate) {
+        this.delegate = delegate;
+    }
+
+    /** {@inheritDoc} */
+    public boolean supportsPagesOutOfOrder() {
+        return this.delegate.supportsPagesOutOfOrder();
+    }
+
+    /** {@inheritDoc} */
+    public String getMimeType() {
+        return this.delegate.getMimeType();
+    }
+
+    /** {@inheritDoc} */
+    public void setContext(IFContext context) {
+        this.delegate.setContext(context);
+    }
+
+    /** {@inheritDoc} */
+    public IFContext getContext() {
+        return this.delegate.getContext();
+    }
+
+    /** {@inheritDoc} */
+    public FontInfo getFontInfo() {
+        return this.delegate.getFontInfo();
+    }
+
+    /** {@inheritDoc} */
+    public void setFontInfo(FontInfo fontInfo) {
+        this.delegate.setFontInfo(fontInfo);
+    }
+
+    /** {@inheritDoc} */
+    public void setDefaultFontInfo(FontInfo fontInfo) {
+        this.delegate.setDefaultFontInfo(fontInfo);
+    }
+
+    /** {@inheritDoc} */
+    public IFDocumentHandlerConfigurator getConfigurator() {
+        return this.delegate.getConfigurator();
+    }
+
+    /** {@inheritDoc} */
+    public IFDocumentNavigationHandler getDocumentNavigationHandler() {
+        return this.delegate.getDocumentNavigationHandler();
+    }
+
+    /** {@inheritDoc} */
+    public void setResult(Result result) throws IFException {
+        this.delegate.setResult(result);
+    }
+
+    /** {@inheritDoc} */
+    public void startDocument() throws IFException {
+        this.delegate.startDocument();
+    }
+
+    /** {@inheritDoc} */
+    public void startDocumentHeader() throws IFException {
+        this.delegate.startDocumentHeader();
+    }
+
+    /** {@inheritDoc} */
+    public void endDocumentHeader() throws IFException {
+        this.delegate.endDocumentHeader();
+    }
+
+    /** {@inheritDoc} */
+    public void startPageSequence(String id) throws IFException {
+        this.delegate.startPageSequence(id);
+    }
+
+    /** {@inheritDoc} */
+    public void startPage(int index, String name, String pageMasterName, Dimension size)
+            throws IFException {
+        this.delegate.startPage(index, name, pageMasterName, size);
+    }
+
+    /** {@inheritDoc} */
+    public void startPageHeader() throws IFException {
+        this.delegate.startPageHeader();
+    }
+
+    /** {@inheritDoc} */
+    public void endPageHeader() throws IFException {
+        this.delegate.endPageHeader();
+    }
+
+    /** {@inheritDoc} */
+    public IFPainter startPageContent() throws IFException {
+        return this.delegate.startPageContent();
+    }
+
+    /** {@inheritDoc} */
+    public void endPageContent() throws IFException {
+        this.delegate.endPageContent();
+    }
+
+    /** {@inheritDoc} */
+    public void startPageTrailer() throws IFException {
+        this.delegate.startPageTrailer();
+    }
+
+    /** {@inheritDoc} */
+    public void endPageTrailer() throws IFException {
+        this.delegate.endPageTrailer();
+    }
+
+    /** {@inheritDoc} */
+    public void endPage() throws IFException {
+        this.delegate.endPage();
+    }
+
+    /** {@inheritDoc} */
+    public void endPageSequence() throws IFException {
+        this.delegate.endPageSequence();
+    }
+
+    /** {@inheritDoc} */
+    public void startDocumentTrailer() throws IFException {
+        this.delegate.startDocumentTrailer();
+    }
+
+    /** {@inheritDoc} */
+    public void endDocumentTrailer() throws IFException {
+        this.delegate.endDocumentTrailer();
+    }
+
+    /** {@inheritDoc} */
+    public void endDocument() throws IFException {
+        this.delegate.endDocument();
+    }
+
+    /** {@inheritDoc} */
+    public void handleExtensionObject(Object extension) throws IFException {
+        this.delegate.handleExtensionObject(extension);
+    }
+
+}
\ No newline at end of file

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/util/IFDocumentHandlerProxy.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -24,7 +24,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Document handler factory for PCL output.
@@ -51,9 +50,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new PCLRendererConfigurator(userAgent);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -24,7 +24,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Intermediate format document handler factory for PDF output.
@@ -51,9 +50,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new PDFRendererConfigurator(userAgent);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java Fri Feb  6 14:39:07 2009
@@ -27,34 +27,23 @@
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.fonts.CustomFontCollection;
-import org.apache.fop.fonts.FontCollection;
-import org.apache.fop.fonts.FontEventAdapter;
-import org.apache.fop.fonts.FontEventListener;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontManager;
-import org.apache.fop.fonts.FontResolver;
-import org.apache.fop.fonts.base14.Base14FontCollection;
 import org.apache.fop.pdf.PDFAMode;
 import org.apache.fop.pdf.PDFEncryptionParams;
 import org.apache.fop.pdf.PDFFilterList;
 import org.apache.fop.pdf.PDFXMode;
-import org.apache.fop.render.DefaultFontResolver;
 import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.Renderer;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 import org.apache.fop.util.LogUtil;
 
 /**
  * PDF renderer configurator.
  */
-public class PDFRendererConfigurator extends PrintRendererConfigurator
-            implements IFDocumentHandlerConfigurator {
+public class PDFRendererConfigurator extends PrintRendererConfigurator {
 
     /**
      * Default constructor
-     * 
+     *
      * @param userAgent user agent
      */
     public PDFRendererConfigurator(FOUserAgent userAgent) {
@@ -65,7 +54,7 @@
      * Configure the PDF renderer.
      * Get the configuration to be used for pdf stream filters,
      * fonts etc.
-     * 
+     *
      * @param renderer pdf renderer
      * @throws FOPException fop exception
      */
@@ -155,7 +144,7 @@
 
     /**
      * Builds a filter map from an Avalon Configuration object.
-     * 
+     *
      * @param cfg the Configuration object
      * @return Map the newly built filter map
      * @throws ConfigurationException if a filter list is defined twice
@@ -214,26 +203,4 @@
         }
     }
 
-    /** {@inheritDoc} */
-    public void setupFontInfo(IFDocumentHandler documentHandler, FontInfo fontInfo)
-                throws FOPException {
-        FontManager fontManager = userAgent.getFactory().getFontManager();
-        List fontCollections = new java.util.ArrayList();
-        fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled()));
-
-        Configuration cfg = super.getRendererConfig(documentHandler.getMimeType());
-        if (cfg != null) {
-            FontResolver fontResolver = new DefaultFontResolver(userAgent);
-            FontEventListener listener = new FontEventAdapter(
-                    userAgent.getEventBroadcaster());
-            List fontList = buildFontList(cfg, fontResolver, listener);
-            fontCollections.add(new CustomFontCollection(fontResolver, fontList));
-        }
-
-        fontManager.setup(fontInfo,
-                (FontCollection[])fontCollections.toArray(
-                        new FontCollection[fontCollections.size()]));
-        documentHandler.setFontInfo(fontInfo);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -24,7 +24,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Intermediate format document handler factory for PostScript output.
@@ -52,9 +51,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new PSRendererConfigurator(userAgent);
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java Fri Feb  6 14:39:07 2009
@@ -19,23 +19,12 @@
 
 package org.apache.fop.render.ps;
 
-import java.util.List;
-
 import org.apache.avalon.framework.configuration.Configuration;
 
 import org.apache.xmlgraphics.ps.PSGenerator;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.fonts.CustomFontCollection;
-import org.apache.fop.fonts.FontCollection;
-import org.apache.fop.fonts.FontEventAdapter;
-import org.apache.fop.fonts.FontEventListener;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontManager;
-import org.apache.fop.fonts.FontResolver;
-import org.apache.fop.fonts.base14.Base14FontCollection;
-import org.apache.fop.render.DefaultFontResolver;
 import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.Renderer;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
@@ -99,25 +88,4 @@
 
     }
 
-    /** {@inheritDoc} */
-    public void setupFontInfo(IFDocumentHandler documentHandler, FontInfo fontInfo)
-            throws FOPException {
-        FontManager fontManager = userAgent.getFactory().getFontManager();
-        List fontCollections = new java.util.ArrayList();
-        fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled()));
-
-        Configuration cfg = super.getRendererConfig(documentHandler.getMimeType());
-        if (cfg != null) {
-            FontResolver fontResolver = new DefaultFontResolver(userAgent);
-            FontEventListener listener = new FontEventAdapter(
-                    userAgent.getEventBroadcaster());
-            List fontList = buildFontList(cfg, fontResolver, listener);
-            fontCollections.add(new CustomFontCollection(fontResolver, fontList));
-        }
-
-        fontManager.setup(fontInfo,
-                (FontCollection[])fontCollections.toArray(
-                        new FontCollection[fontCollections.size()]));
-        documentHandler.setFontInfo(fontInfo);
-    }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -23,7 +23,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Document handler factory for SVG output.
@@ -49,9 +48,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return null;
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java?rev=741576&r1=741575&r2=741576&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java Fri Feb  6 14:39:07 2009
@@ -23,7 +23,6 @@
 import org.apache.fop.render.intermediate.AbstractIFDocumentHandlerMaker;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 
 /**
  * Document handler factory for SVG Print output.
@@ -49,9 +48,4 @@
         return MIMES;
     }
 
-    /** {@inheritDoc} */
-    public IFDocumentHandlerConfigurator getConfigurator(FOUserAgent userAgent) {
-        return null;
-    }
-
 }



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