Loading ...
Sorry, an error occurred while loading the content.

2181Re: [XSL-FO] PDFs direct to browser?

Expand Messages
  • ed nixon
    Sep 1, 2002
      Have you looked at the Cocoon processing framework from the Apache
      project? There are examples in the distribution of serving PDF in
      real-time via servelet. You might get some insight from that code.

      ...edN

      Steve Murphy wrote:
      > Hi,
      >
      > We are trying to modify the FopServlet example to run
      > from a JSP. We are not getting the PDF to display
      > correctly in browser. We are getting "Error 500:
      > no protocol:" followed by the FO source. Also, we
      > are calling the JSP directly 'print_response.jsp'.
      > Does anyone have any ideas?
      >
      > Here's our source code:
      >
      > ByteArrayOutputStream outStuff = new
      > ByteArrayOutputStream();
      > response.setContentType("application/pdf");
      >
      > Driver driver = new Driver(is, outStuff);
      >
      > Logger logger = null;
      > driver.setLogger(logger);
      >
      > driver.setRenderer(Driver.RENDER_PDF);
      > driver.run();
      >
      > byte[] content = outStuff.toByteArray();
      > response.setContentLength(content.length);
      > response.getOutputStream().write(content);
      > response.getOutputStream().flush();
      >
      > Thanks
      >
      > Steve
      >
      >
      >
      > __________________________________________________
      > Do You Yahoo!?
      > Yahoo! Finance - Get real-time stock quotes
      > http://finance.yahoo.com
      >
      >
      > To unsubscribe from this group, send an email to:
      > XSL-FO-unsubscribe@egroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    • Show all 2 messages in this topic