I have a Java webapp creating a pdf and streaming it back to the browser.
byte[] pdf = report.exportPdfToArray(user); response.setContentType(\"application/pdf
I have tried a solution in java and it worked.
response.setHeader("Content-Disposition","inline; filename=\"MyFile.pdf\""); response.setContentType("application/pdf; name=\"MyFile.pdf\""); response.getOutputStream().write(pdfAsBytesArray);