I have a for loop which calls the XSLTHandler and then renderer in loop
till the input criteria is exhausted.

What happens is the acrobat reader opens only the last pdf file rendered...

My code looks like..whats happening is that only the last (10th ) invoice
is opening up in acrobat. I am running it under WEBLOGIC 7.0

for ( i = 0 to 10 invoices )
{

      XSLTInputHandler input = new XSLTInputHandler(invoicexmlfile,new
File(xslParam));
      renderXML( input, response);
}

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);
    }

Thanks
Manoj



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to