Rabih Yassine wrote:

            InputSource in = new InputSource(file);
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            Driver driver = new Driver(in, out);
            driver.setLogger(log);
            driver.setRenderer(Driver.RENDER_PDF);
            driver.run();
            byte[] content = out.toByteArray();

            FileWriter f = new FileWriter("D:/kokeet4.pdf");
            f.write(new String(content));
            f.flush();

Probably FileWriter spoils binary pdf content, use OutputStream instead, see FopServlet example in contrib/servlet/src directory.


--
Oleg Tkachenko
Multiconn Technologies, Israel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to