I dont want  them merged into 1 document. I want them separate but want the one instance of acrobat ( which opened the first invoice ) to take the other 9 documents created after the first one. Now what is happening is that the last document is opened in the acrobat reader where as the other 9 are lost.
 
I have a feeling it has something to do with the response object. I think trying to use the same response/request object is causing the first 9 docs to be flushed out with the last one only remaining...on right track ?
 
Thanks
-----Jebus <[EMAIL PROTECTED]> wrote: -----

To: [EMAIL PROTECTED]
From: Jebus <[EMAIL PROTECTED]>
Date: 09/15/2004 06:57PM
Subject: Re: FOP opening only 1 PDF when more than one is rendered?

what you are doing is writing 10 separate documents to the
outputstream.  If you need all these documents to show up as one. you
iText to merge them together.

On Wed, 15 Sep 2004 18:02:37 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 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]

>

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

Reply via email to