Package org.apache.fop.apps

Examples of org.apache.fop.apps.Driver


              if (monitor.isCanceled()) {
                Platform.getJobManager().cancel(ExporterBase.EXPORT_JOB_FAMILY);
                return Status.CANCEL_STATUS;
              }
                try {
                    Driver driver = new Driver();
                    driver.setRenderer(Driver.RENDER_PDF);
                    Options options = createOptions();
                    FopImageFactory.resetCache();
                    state.driver = driver;
                    monitor.worked(1);
                  //throw new RuntimeException("Moooo!!!!!");
View Full Code Here


     * Create the FOP driver
     * Set the <code>OutputStream</code> where the XML should be serialized.
     */
    public void setOutputStream(OutputStream out) {
        // load the fop driver
        this.driver = new Driver();
        this.driver.setLogger(this.logger);
        if (this.rendererName == null) {
            this.renderer = factory.createRenderer(mimetype);
        } else {
            try {
View Full Code Here

                 + Configuration.getValue("baseDir"), Project.MSG_DEBUG);
        task.log(task.getFofile().getName() + " -> "
                 + task.getPdffile().getName(), Project.MSG_INFO);

        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

  public void renderFO(InputSource foFile, HttpServletResponse response)
    throws ServletException
  {
    try
      {
        Driver        driver   = new Driver(foFile, null);
        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

  public void renderXML(XSLTInputHandler input, HttpServletResponse response)
    throws ServletException
  {
    try
      {
        Driver        driver   = new Driver();       
        PrinterJob    pj       = PrinterJob.getPrinterJob();
        PrintRenderer renderer = new PrintRenderer(pj);
       
        pj.setCopies(1);       
       
        driver.setLogger   (log);
        driver.setRenderer (renderer);
        driver.render      (input.getParser(), input.getInputSource());
       
        reportOK (response) ;
      }
    catch (Exception ex)
      {
View Full Code Here

        try {
            ByteArrayOutputStream out = new ByteArrayOutputStream();

            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

        try {
            ByteArrayOutputStream out = new ByteArrayOutputStream();

            response.setContentType("application/pdf");

            Driver driver = new Driver();
            driver.setLogger(log);
            driver.setRenderer(Driver.RENDER_PDF);
            driver.setOutputStream(out);
            driver.render(input.getParser(), input.getInputSource());

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

     * Create the FOP driver
     * Set the <code>OutputStream</code> where the XML should be serialized.
     */
    public void setOutputStream(OutputStream out) {
        // load the fop driver
        driver = new Driver();

        if(driver instanceof Loggable) {
            driver.setLogger(getLogger().getChildLogger("fop"));
        }
        if (this.rendererName == null) {
View Full Code Here

     * Create the FOP driver
     * Set the <code>OutputStream</code> where the XML should be serialized.
     */
    public void setOutputStream(OutputStream out) {
        // load the fop driver
        driver = new Driver();

        if(driver instanceof Loggable) {
            driver.setLogger(getLogger().getChildLogger("fop"));
        }
        if (this.rendererName == null) {
View Full Code Here

       
        // Give the source resolver to Batik which is used by FOP
        //SourceProtocolHandler.setup(this.resolver);

        // load the fop driver
        this.driver = new Driver();
        this.driver.setLogger(this.logger);
        if (this.rendererName == null) {
            this.renderer = factory.createRenderer(mimetype);
        } else {
            try {
View Full Code Here

TOP

Related Classes of org.apache.fop.apps.Driver

Copyright © 2018 www.massapicom. 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.