Logger logger = new AvalonMavenBridgeLogger(getLog(), true, true);
MessageHandler.setScreenLogger(logger);
Driver driver = new Driver(new InputSource(in), out);
driver.setLogger(logger);
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
} catch (FOPException fope) {
throw new MojoExecutionException("Failed to convert to PDF", fope);
} catch (IOException ioe) {
throw new MojoExecutionException("Failed to write to output file.");
}