|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL:FO Make PDF savable
Lee, Insoo wrote:
More likely it's servlet/browser/pdf problem. Make sure you set content type and content length. Try the following pattern (snippet from docs/examples/embedding/FOPServlet.java): ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType("application/pdf"); Driver driver = new Driver();
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource()); byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();-- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








