Hi,
when I stream a PDF (which is packaged in a ByteArrayOutputStream) to the Browser, the Acrobat Reader plugin opened not until the whole document
is loaded. Is there a header, or anything else I have to set in my
servlet to make sure that first the Acrobat plugin open and then the streaming starts. I need this behaviour, because if my user have a slow internet connection, he should have the chance to see the first page of the document during the rest of the document is still loaded in the backround.
code:
//document = PDF as ByteArrayOutputStream
ServletOutputStream servletOut = response.getOutputStream();
response.setContentType("application/pdf");
response.setContentLength(document.size());
document.writeTo(servletOut);
response.flushBuffer();
servletOut.flush();