Jason Johnston wrote:
Seems to me you could accomplish this fairly easily with Flowscript.
Something like: <snip>
I have never used flowscript but I have to say is very cool, but
unfortunately is not doing what I expect. The script looks like this:
function main() {
var count = 0;
var path=cocoon.parameters["report"];
var param=getRequestParameters();
var bytes=0;
var outputStream = new com.spectron.cocoon.SpectronOutputStream();
//
cocoon.processPipelineTo(path+'.pdf_pipe?'+param,'',outputStream);
for(
bytes=outputStream.size();
!outputStream.isClosed();
count++,bytes=outputStream.size()
) {
cocoon.sendPageAndWait("progress.jx", {"stream_size" :
bytes,"count":count } );
}
// PDF is finished, now display it:
cocoon.sendPage(
"pdf-display/"+path+'?'+getRequestParameters(),
{byteArray : new
java.io.ByteArrayInputStream(outputStream.toByteArray())}
);
}
It seems that when I do the "cocoon.sendPageAndWait" the
"cocoon.processPipeline" is aborted because the outputStream.size()
remains constant. If I remove the for loop it creates the PDF correctly.
Is there a way to create a thread in flowscript and have the
"cocoon.processPipeline" run in it?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]