You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by benjamin rasmussen <be...@hotmail.com> on 2002/05/15 15:16:58 UTC

Newbie - render problem

Can anyone explain why the following code does not work?!

Code:
FileInputStream file = new FileInputStream("simple.fo");
javax.xml.parsers.DocumentBuilderFactory docBuilderFac =
    javax.xml.parsers.DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFac.newDocumentBuilder();
Document doc = docBuilder.parse(file);

Driver driver = new Driver();
driver.render(doc);
driver.setOutputStream(new FileOutputStream("simple.pdf"));
driver.setRenderer(Driver.RENDER_PDF);
driver.run();

I get a NullPointerException. I think it has something to do with the
variable: doc (org.w3c.dom.Document).




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com