Try looking into Cocoon...I use it to take data from a database, parse it into an xml file, transform it using XSLT into an FO file and render the resulting FO file as PDF on the fly...it handles pictures/text/forms just fine. You can find it at www.apache.org/Cocoon.
Hope this helps! Bob Hitchins Senior IT Business Analyst Cargill Crop Nutrition -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: RE: Generating PDF on the fly using on the fly XML one method of using dynamically create xml content would be to use the StringReader. here some sample code: StringReader input = new StringReader(xmlString); try { FileReader inputxslt = new FileReader(new File(xslfile)); Transformer transformer = TransformerFactory.newInstance().newTransformer( new StreamSource(inputxslt)); driver.setOutputStream(new FileOutputStream(pdffile)); transformer.transform(new SAXSource(new InputSource(input)), new SAXResult(driver.getContentHandler())); } catch(FileNotFoundException fnfe) { ... } catch (TransformerException te) { ... } -----Original Message----- From: joni santoso [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 7:01 AM To: [EMAIL PROTECTED] Subject: Generating PDF on the fly using on the fly XML Hi, I used to create a servlet that can produce PDF by setting its contentType. 1. Now, I wonder if I can use Apache FOP to take XML stream that I created using JDOM to produce a PDF? How? 2. Is it possible to produce a PDF that only contains JPEG using XML stream? I am thinking about storing an image stream in an XML document like this : <picture> the stream is here </picture> 3. What about producing mixed content (image and text) in a PDF? I know I can use the external link/external file fo element. But what if the image and text are all created on the fly? Thank you, ======================================================================== =================== Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com ======================================================================== =================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
