Hi!
How do I direct FOP output to a string that can be written to a file?
When I use the code shown below, and write it to a file, it cannot be read
by Acrobat reader...
Here is a snippet of what I am using:

        public String convertToPDF(String inputToBeConverted) {
                StringReader inputStringReader  = new
StringReader(inputToBeConverted);
                ByteArrayOutputStream out               = new
ByteArrayOutputStream(); 
                try {
                        Driver driver = new Driver();
                        driver.setLogger(logger);
                        driver.setRenderer(Driver.RENDER_PDF);
                        driver.setInputSource(new
InputSource(inputStringReader));
                        driver.setOutputStream(out);
                        driver.run();
                        out.flush();
                        out.close();
                        driver = null;
                 } catch (Exception e) {
                        System.out.println(e.getMessage());
                        e.printStackTrace();
                }
                return out.toString();
        }

thanks!
gary...

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

Reply via email to