I am parsing my XML file through FOP parser and then telling the driver to
render it as PDF. The process is initiated by clicking on a button on IE.
What happens is the current IE instance opens the acrobat and displays the
PDF it.

The users have to hit back button to get back to the application.

My question is how do i tell the Driver to open the PDF in a separate
instance of acrobat (within a new IE instance) or just by  acrobat
independently.

Thanks
Manoj

My sample code is below

 public void renderXML(XSLTInputHandler input,
                      HttpServletResponse response) throws ServletException
{
    try {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        response.setContentType(CONTENT_TYPE);
        Driver driver = new Driver();
        String OS = System.getProperty("os.name");
        driver.setLogger(log);
        driver.setErrorDump(true);
        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();
    } catch (Exception ex) {
        throw new ServletException(ex);
    }
 }


Reply via email to