Thanks Louis. I actually did this after a few hours of messing round with it.
Thanks anyway, Scott. > -----Original Message----- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 1:08 PM > To: [EMAIL PROTECTED] > Subject: Re: Write pdf file to disk > > > Scott: > > Try this: > > OutputStream stream = new BufferedOutputStream(new > FileOutputStream(filePathHere)); > driver.setOutputStream(stream); > > we use a simple random file name generated from: > > int rndNumber = Math.abs(new Random().nextInt()); > randFileName=String.valueOf(rndNumber); > > OK? Is this what you were asking? > > -Lou > Inexperienced Software Architect > > > > > > > "Mitchell, Scott(LIT)" <[EMAIL PROTECTED]> on 01/07/2002 > 07:06:21 > AM > > Please respond to [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > cc: > > Subject: Write pdf file to disk > > Hi, > > I have code that creates a pdf file using fop. The problem I am seeing is > that I do not know how to define where the pdf file is stored (or indeed, > what it should be called). > > The code I have is shown below... > > // Transform from fop to pdf > XMLReader xmlReader = new SAXParser(); > Driver driver = new Driver(); > driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer > ()); > > > driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); > > driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); > > > driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping"); > > driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping"); > driver.setOutputStream(new BufferedOutputStream(baos)); > > driver.buildFOTree(xmlReader, new InputSource(formReader)); > > driver.format(); > driver.render(); > > Any help would be appreciated. > > Scott Mitchell > Experienced Software Developer > > Liberty Information Technology Direct Line: ++44 (0) 28 9044 5582 > Clarendon House Fax: ++44 (0) 28 > 9044 > 5511 > 9-21 Adelaide Street Switchboard: ++44 (0) 28 9044 > 5500 > Belfast, Northern Ireland BT2 8DJ Email: > [EMAIL PROTECTED] > > Disclaimer: The contents of this e-mail and attached files in no way > reflect > any policies of Liberty Information Technology Ltd. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]