Package org.apache.fop.apps

Examples of org.apache.fop.apps.Driver.run()


        try {
            Driver driver = new Driver(inputHandler.getInputSource(), pdfOut);
            driver.setRenderer(Driver.RENDER_PDF);
            driver.setXMLReader(parser);
            driver.run();
        } catch (Exception ex) {
            MessageHandler.logln("Error: " + ex.getMessage());
            throw new BuildException(ex);
        }
        logger.die();
View Full Code Here


        PrinterJob    pj       = PrinterJob.getPrinterJob();
        PrintRenderer renderer = new PrintRenderer(pj);
       
        driver.setLogger  (log);
        driver.setRenderer(renderer);
        driver.run();
         
        reportOK (response) ;                       
      }
    catch (Exception ex)
      {
View Full Code Here

            response.setContentType("application/pdf");

            Driver driver = new Driver(foFile, out);
            driver.setLogger(log);
            driver.setRenderer(Driver.RENDER_PDF);
            driver.run();

            byte[] content = out.toByteArray();
            response.setContentLength(content.length);
            response.getOutputStream().write(content);
            response.getOutputStream().flush();
View Full Code Here

            ByteArrayOutputStream out = new ByteArrayOutputStream();

            response.setContentType("application/pdf");

            Driver driver = new Driver(foFile, out);
            driver.run();

            byte[] content = out.toByteArray();
            response.setContentLength(content.length);
            response.getOutputStream().write(content);
            response.getOutputStream().flush();
View Full Code Here

        try {
            Driver driver = new Driver(inputHandler.getInputSource(), out);
            driver.setLogger(log);
            driver.setRenderer(renderer);
            driver.setXMLReader(parser);
            driver.run();
            out.close();
        } catch (Exception ex) {
            log.error("Couldn't render file: " + ex.getMessage());
            throw new BuildException(ex);
        }
View Full Code Here

                Map rendererOptions = new java.util.HashMap();
                rendererOptions.put("fineDetail", new Boolean(true));
                driver.getRenderer().setOptions(rendererOptions);
            }
            driver.setXMLReader(parser);
            driver.run();
            out.close();
        } catch (Exception ex) {
            throw new BuildException(ex);
        }
    }
View Full Code Here

  try {
      Driver driver = new Driver(inputHandler.getInputSource(), pdfOut);
      driver.setRenderer(Driver.RENDER_PDF);
      driver.setXMLReader(parser);
      driver.run();
  } catch (Exception ex) {
      MessageHandler.logln("Error: " + ex.getMessage());
      throw new BuildException(ex);
  }
  logger.die();
View Full Code Here

      ByteArrayOutputStream out = new ByteArrayOutputStream();
     
      response.setContentType("application/pdf");
     
      Driver driver = new Driver(foFile, out);
      driver.run();

      byte[] content = out.toByteArray();
      response.setContentLength(content.length);
      response.getOutputStream().write(content);
      response.getOutputStream().flush();
View Full Code Here

            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.");
        }
View Full Code Here

        PrinterJob    pj       = PrinterJob.getPrinterJob();
        PrintRenderer renderer = new PrintRenderer(pj);
       
        driver.setLogger  (log);
        driver.setRenderer(renderer);
        driver.run();
         
        reportOK (response) ;                       
      }
    catch (Exception ex)
      {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.