Problem Download PDF - Servlet
Reported by
dacostae...@gmail.com,
Nov 16 2017
|
|||||
Issue description
Chrome Version : 62.0.3202.94
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:
What steps will reproduce the problem?
1.The problem only occurs in chrome
2.Save for print environment works
3.Passing Attachment Command to It Works Also
What is the expected result?
What happens instead of that?
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
,
Nov 16 2017
I don't understand what the problem is here. Can you please provide the steps to repro the problem? Is it that you can not download a PDF from your servlet? Is the data being transfered? Is the encoding correct? Do you want the PDF to download or to open?
,
Nov 16 2017
I need the pdf to be downloaded when my client requests what is
downloaded, follows the coding of the servlet that retrieves the data,
remembering that in other browsers it works correctly, I believe there
must be some different parameter for the chrome
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();
2017-11-16 17:03 GMT-02:00 dsincl… via monorail <
monorail+v2.3985409167@chromium.org>:
,
Nov 16 2017
And what happens when you do the above in chrome? Does the PDF open, download, nothing? Are bits getting sent to the browser?
,
Nov 16 2017
Thank you for providing more feedback. Adding requester "dsinclair@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 16 2017
In the Browser the PDF appears normally, I can visualize it, but when I try to download it it does not take the file, causing it to download a file without extension and empty 2017-11-16 17:11 GMT-02:00 dsincl… via monorail < monorail+v2.3985409167@chromium.org>:
,
Nov 16 2017
Ah, the PDF save button will re-request the file from the server and not use the previously downloaded version. Are you serving the PDF from a POST request or with no-caching headers? Sending to hnakashima@ as this sounds like it's another version of the saving issue.
,
Nov 16 2017
I send the data via POST! 2017-11-16 17:16 GMT-02:00 dsincl… via monorail < monorail+v2.3985409167@chromium.org>:
,
Jun 13 2018
I'm having the same problem.......try to download PDF and get blank doc
,
Oct 12
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by manoranj...@chromium.org
, Nov 16 2017Labels: Needs-Triage-M62