I am developing a java app (WebObjects specifically) that takes advantage of the FOP code to produce wonderful PDF's for my fellow employees. I am trying to track down something that I do not fully understand and I was hoping that some one on the list might have some OS X experience to tell me what might be happening.
After I start my WebObjects Application from the command line, things run fine except when I generate a PDF. It looks like another java process is being spawned as a Dock ( that darn dock) icon shows up. Running top does not seem to indicate another process being fired up when the PDF is being generated. Usually when a Dock Icon appears for java Apps it is indicative that a GUI based app is running, ie Swing or AWT. So I was wondering having tried to walk the FOP Code if during the generation of the PDF any classes that are subclassed from Swing or AWT are being called?


This is how I am generating the code

try {
Document document = response.contentAsDOMDocument();
DocumentInputSource diSource = new DocumentInputSource(response.contentAsDOMDocument() );
ByteArrayOutputStream out = new ByteArrayOutputStream();
// Driver driver = new Driver();
Driver driver = new Driver(diSource, out);
driver.setRenderer(Driver.RENDER_PDF);


                        driver.run();
                        // set the PDF data
                        response.setContent(new NSData(out.toByteArray()));

                        // set the header
                        response.setHeader("application/pdf", "Content-Type");
                } catch (Exception ex) {
                        //Going to need a better way of catching this exception
                        ex.printStackTrace();
                }


Thanks for any help or further understanding anyone could provide Mike Jackson



Reply via email to