Package org.apache.fop.cli

Examples of org.apache.fop.cli.InputHandler.render()


            FOUserAgent userAgent = new FOUserAgent();
            userAgent.setBaseURL(this.baseURL);
            org.apache.fop.apps.Fop fop = new org.apache.fop.apps.Fop(
                    outputFormat, userAgent);
            fop.setOutputStream(out);
            inputHandler.render(fop);
        } catch (Exception ex) {
            throw new BuildException(ex);
        } finally {
            try {
                out.close();
View Full Code Here


            outputFile.getParentFile().mkdirs();
            OutputStream outStream = new java.io.BufferedOutputStream(
                                 new java.io.FileOutputStream(outputFile));
            fop.setOutputStream(outStream);
            logger.debug("ddir:" + destdir + " on:" + outputFile.getName());
            inputHandler.render(fop);
            outStream.close();

            // check difference
            if (compare != null) {
                File f1 = new File(destdir, outname + ".at.xml");
View Full Code Here

        ByteArrayOutputStream baout = new ByteArrayOutputStream();
        Fop fop = new Fop(MimeConstants.MIME_PDF);
        fop.setOutputStream(baout);
       
        InputHandler handler = new InputHandler(xmlFile, xsltFile, null);
        handler.render(fop);
       
        assertTrue("Generated PDF has zero length", baout.size() > 0);
    }

}
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.