I'm trying to port my application from using FOP .18 to FOP .20.  My
application used to get the handler (FOTreeBuilder) from the Driver, then
fire SAX events on it.  In .20 I get a null pointer exception, I believe
this is because the InputStream never gets initialized.  Is there a way to
make this work in .20.2?

What the .18 code looks like
     Driver driver = new Driver();
     driver.setRenderer(Driver.RENDER_PDF);
     DefaultHandler handler = (DefaultHandler) driver.getContentHandler();
     ...
     driver.setOutputStream(out);
     driver.format();
     driver.render();

What I thought the .20 code should look like
     Driver driver = new Driver();
     driver.setRenderer(Driver.RENDER_PDF);
     driver.setOutputStream(out);
     DefaultHandler handler = (DefaultHandler) driver.getContentHandler();
     ...
     driver.run();

Thanks,

JohnPT





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

Reply via email to