From aca1e4f9afd5d27a9ad6cea9871c4ae4632653e7 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Tue, 8 Jan 2002 09:52:18 +0000 Subject: does some basic text into pdf and svg output just for a start git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194617 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/apps/Driver.java | 9 +++++++++ src/org/apache/fop/apps/Fop.java | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src/org/apache/fop/apps') diff --git a/src/org/apache/fop/apps/Driver.java b/src/org/apache/fop/apps/Driver.java index d9144270a..5a49d02e2 100644 --- a/src/org/apache/fop/apps/Driver.java +++ b/src/org/apache/fop/apps/Driver.java @@ -8,6 +8,7 @@ package org.apache.fop.apps; // FOP +import org.apache.fop.fo.FOUserAgent; import org.apache.fop.fo.FOTreeBuilder; import org.apache.fop.fo.ElementMapping; import org.apache.fop.layout.AreaTree; @@ -200,6 +201,13 @@ public class Driver { _stream = stream; } + public void setUserAgent(FOUserAgent agent) { + } + + private FOUserAgent getUserAgent() { + return new FOUserAgent(); + } + public void setLogger(Logger logger) { log = logger; } @@ -349,6 +357,7 @@ public class Driver { */ public void setRenderer(Renderer renderer) { renderer.setLogger(getLogger()); + renderer.setUserAgent(getUserAgent()); _renderer = renderer; } diff --git a/src/org/apache/fop/apps/Fop.java b/src/org/apache/fop/apps/Fop.java index 3b82f8910..4dc42dcfb 100644 --- a/src/org/apache/fop/apps/Fop.java +++ b/src/org/apache/fop/apps/Fop.java @@ -17,14 +17,22 @@ public class Fop { Starter starter = options.getStarter(); starter.run(); } catch (FOPException e) { - System.err.println("" + e.getMessage()); + if("null".equals(e.getMessage())) { + System.err.println("NullPointerException"); + } else { + System.err.println("" + e.getMessage()); + } if (options != null && options.isDebugMode().booleanValue()) { e.printStackTrace(); + } else { + System.err.println("Turn on debugging for more information"); } } catch (java.io.FileNotFoundException e) { System.err.println("" + e.getMessage()); if (options != null && options.isDebugMode().booleanValue()) { e.printStackTrace(); + } else { + System.err.println("Turn on debugging for more information"); } } } -- cgit v1.2.3