xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "benjamin rasmussen" <ben...@hotmail.com>
Subject RE: Newbie - render problem
Date Wed, 15 May 2002 17:34:43 GMT
Hi Jack

I came a little further in the process. But... I am still getting an 
exception.

Output from the screen:

[ERROR]: Logger not set
[INFO]: building formatting object tree
[ERROR]: Unknown formatting object null^null
java.lang.NullPointerException

I think it is: "driver.render(doc);" that generates the errormessages.

/Benjamin



>From: Jack Donohue <donohuej@synovation.com>
>Reply-To: fop-user@xml.apache.org
>To: "'fop-user@xml.apache.org'" <fop-user@xml.apache.org>
>Subject: RE: Newbie - render problem
>Date: Wed, 15 May 2002 08:43:05 -0700
>
>Hi Benjamin.
>
>Try this instead:
>
>	Driver driver = new Driver();
>  	driver.setOutputStream(new FileOutputStream("simple.pdf"));
>	driver.setRenderer(Driver.RENDER_PDF);
>	driver.render(doc);
>// 	driver.run();
>
>Jack.
>
>-----Original Message-----
>From: benjamin rasmussen [mailto:benras@hotmail.com]
>Sent: Wednesday, May 15, 2002 6:17 AM
>To: fop-user@xml.apache.org
>Subject: 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




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


Mime
View raw message