I'm trying to generate PDF from a Servlet by giving providing XML and XSL files
as input. I used the following code with some modifications:
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.setContentType("application/pdf");
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
XMLReader parser = inputHandler.getParser();
driver.buildFOTree(parser, inputHandler);
driver.format();
driver.setOutputStream( out );
driver.render();
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();*/
PDF cannot be generated as I received an InvocationTargetException in the
getParser() method of 'XSLTInputHandler.java' in the org.apache.fop.apps
package.
Any help will be greatly appreciated. Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]