Problem Download PDF in Servlet - Google Chrome

248 views
Skip to first unread message

dacostae...@gmail.com

unread,
Nov 16, 2017, 5:13:08 AM11/16/17
to Chromium-dev
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();

Lei Zhang

unread,
Nov 16, 2017, 10:55:57 AM11/16/17
to dacostae...@gmail.com, Chromium-dev
Can you file a bug for this on https://new.crbug.com and provide a URL
to test against, if possible?

Please note chromium-dev is for discussion on Chromium browser
development, and not the best place to report issues with web
application development.
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "Chromium-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/0d565d75-c5c0-415e-98b1-3ed28a2f1d60%40chromium.org.
Reply all
Reply to author
Forward
0 new messages