diff options
Diffstat (limited to 'examples')
4 files changed, 11 insertions, 38 deletions
diff --git a/examples/embedding/java/embedding/ExampleDOM2PDF.java b/examples/embedding/java/embedding/ExampleDOM2PDF.java index ab02e6607..5531cc252 100644 --- a/examples/embedding/java/embedding/ExampleDOM2PDF.java +++ b/examples/embedding/java/embedding/ExampleDOM2PDF.java @@ -18,12 +18,10 @@ package embedding; -//Java +// Java import java.io.File; import java.io.IOException; import java.io.OutputStream; - -//JAXP import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilder; @@ -33,10 +31,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; -// Commons-Logging -import org.apache.commons.logging.impl.SimpleLog; - -//FOP +// FOP import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; @@ -61,10 +56,7 @@ public class ExampleDOM2PDF { // Construct driver Driver driver = new Driver(); - // Setup logger - SimpleLog logger = new SimpleLog("log"); - logger.setLevel(SimpleLog.LOG_LEVEL_INFO); - driver.setLogger(logger); + // Setup driver driver.initialize(); // Setup Renderer (output format) diff --git a/examples/embedding/java/embedding/ExampleFO2PDF.java b/examples/embedding/java/embedding/ExampleFO2PDF.java index be8cd7822..6d7a7c564 100644 --- a/examples/embedding/java/embedding/ExampleFO2PDF.java +++ b/examples/embedding/java/embedding/ExampleFO2PDF.java @@ -18,19 +18,16 @@ package embedding; -//Java +// Java import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -//SAX +// SAX import org.xml.sax.InputSource; -// Commons-Logging -import org.apache.commons.logging.impl.SimpleLog; - -//FOP +// FOP import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; @@ -51,10 +48,7 @@ public class ExampleFO2PDF { // Construct driver Driver driver = new Driver(); - // Setup logger - SimpleLog logger = new SimpleLog("log"); - logger.setLevel(SimpleLog.LOG_LEVEL_INFO); - driver.setLogger(logger); + // Setup driver driver.initialize(); // Setup Renderer (output format) diff --git a/examples/embedding/java/embedding/ExampleObj2PDF.java b/examples/embedding/java/embedding/ExampleObj2PDF.java index 313faee43..ff2419ff3 100644 --- a/examples/embedding/java/embedding/ExampleObj2PDF.java +++ b/examples/embedding/java/embedding/ExampleObj2PDF.java @@ -18,12 +18,12 @@ package embedding; -//Java +// Java import java.io.File; import java.io.OutputStream; import java.io.IOException; -//JAXP +// JAXP import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerException; @@ -32,13 +32,9 @@ import javax.xml.transform.Result; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.sax.SAXResult; -// Commons-Logging -import org.apache.commons.logging.impl.SimpleLog; - -//FOP +// FOP import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; - import embedding.model.ProjectTeam; /** @@ -62,10 +58,7 @@ public class ExampleObj2PDF { // Construct driver Driver driver = new Driver(); - // Setup logger - SimpleLog logger = new SimpleLog("log"); - logger.setLevel(SimpleLog.LOG_LEVEL_INFO); - driver.setLogger(logger); + // Setup driver driver.initialize(); // Setup Renderer (output format) diff --git a/examples/embedding/java/embedding/ExampleXML2PDF.java b/examples/embedding/java/embedding/ExampleXML2PDF.java index 60cdd12ef..bb16b6528 100644 --- a/examples/embedding/java/embedding/ExampleXML2PDF.java +++ b/examples/embedding/java/embedding/ExampleXML2PDF.java @@ -32,9 +32,6 @@ import javax.xml.transform.Result; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.sax.SAXResult; -// Commons-Logging -import org.apache.commons.logging.impl.SimpleLog; - //FOP import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; @@ -74,9 +71,6 @@ public class ExampleXML2PDF { Driver driver = new Driver(); // Setup logger - SimpleLog logger = new SimpleLog("log"); - logger.setLevel(SimpleLog.LOG_LEVEL_INFO); - driver.setLogger(logger); driver.initialize(); // Setup Renderer (output format) |