Hello, I'm a brazilian developer and I have a problem trying to download a PDF in Chrome, I can only select it to download automatically, if I try to download the file when I'm viewing it in the browser, I can not, any suggestions? I use a servlet for download this archive, The code responsible for to recover the archive and do download is this!
response.setContentType("application/"+type);
response.setContentLength(bytes.length);
response.setHeader("Content-disposition", "filename=arquivo."+type.toLowerCase());
ServletOutputStream outPutStream = response.getOutputStream();
outPutStream.write(bytes, 0, bytes.length);
outPutStream.flush();
outPutStream.close();