aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/apps/Driver.java
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-22 17:21:48 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-22 17:21:48 +0000
commit3d3636f66834679a1a71dd3a1db96bfcc51e8af7 (patch)
tree0084b34ce978a2eee8d90c1bb0d5a08e616abd2c /src/java/org/apache/fop/apps/Driver.java
parent325d7e5440da01011621b5e8aa8c86e9d59a166a (diff)
downloadxmlgraphics-fop-3d3636f66834679a1a71dd3a1db96bfcc51e8af7.tar.gz
xmlgraphics-fop-3d3636f66834679a1a71dd3a1db96bfcc51e8af7.zip
1. move renderer initialization work from FOTreeHandler to Driver
2. clean up related FOTreeHandler constructor git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196826 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/apps/Driver.java')
-rw-r--r--src/java/org/apache/fop/apps/Driver.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java
index 560956a50..39bff6799 100644
--- a/src/java/org/apache/fop/apps/Driver.java
+++ b/src/java/org/apache/fop/apps/Driver.java
@@ -534,7 +534,7 @@ public class Driver implements LogEnabled {
throw new IllegalStateException(
"Renderer not set when using standard foInputHandler");
}
- foInputHandler = new FOTreeHandler(currentDocument, stream, renderer, true);
+ foInputHandler = new FOTreeHandler(currentDocument, true);
}
foInputHandler.enableLogging(getLogger());
@@ -590,6 +590,17 @@ public class Driver implements LogEnabled {
currentDocument.atModel = AreaTree.createRenderPagesModel(renderer);
//this.atModel = new CachedRenderPagesModel(renderer);
currentDocument.areaTree.setTreeModel(currentDocument.atModel);
+ try {
+ renderer.setupFontInfo(currentDocument);
+ // check that the "any,normal,400" font exists
+ if (!currentDocument.isSetupValid()) {
+ throw new SAXException(new FOPException(
+ "No default font defined by OutputConverter"));
+ }
+ renderer.startRenderer(stream);
+ } catch (IOException e) {
+ throw new SAXException(e);
+ }
}
/**
The following statement triggers virtually all of the processing