> I have the servlet working to create a PDF from an object list created from > our database. I am writing the .xml to a file and them reading it back in > which seems counterproductive. > Is there a way to create the PDF on the fly without writing the xml to a > file first. > Thanks > Calvn
Write the results into an output stream. Then convert the output stream into an input stream and convert that into PDF. I wrote a servlet to take the output from Saxon and turn it into input for FOP. Here's the relevant chunk: // Here's where the output from Saxon becomes the input for FOP. ByteArrayOutputStream transformResult = transformXML(transform, source, req, res); if (transformResult.size() == 0) { res.getOutputStream().println("Transform produced no output"); } else { ByteArrayInputStream transformStream = new ByteArrayInputStream(transformResult.toByteArray()); makePDF(transformStream, res); } HTH Jay Bryant Bryant Communication Services --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]