Hi all,
Eric,
I am using FOP 0.20.1 to generate PDFs from xml and
xsl files. I can generate pdfs fine on command line
however when I try using a servlet
This is the error I get:
WARNING: Unknown formatting object ^root
---------
I first thought it might be a namespace issue but
since it works on command line that's ruled out(??)
Here is my code for the servlet:
ByteArrayOutputStream out = new
ByteArrayOutputStream();
response.setContentType("application/pdf");
InputHandler inputHandler = new
XSLTInputHandler(xmlFile, xslFile);
XMLReader parser = inputHandler.getParser();
Driver driver = new
Driver(inputHandler.getInputSource(), out);
driver.run();
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
Hopefully someone can help me out...before I pull all my hair out
Thanks
Amit
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]