New issue
Advanced search Search tips

Issue 786029 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

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



 
Components: Internals>Plugins>PDF
Labels: Needs-Triage-M62
Labels: Needs-Feedback
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?
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>:
And what happens when you do the above in chrome? Does the PDF open, download, nothing? Are bits getting sent to the browser?
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 16 2017

Cc: dsinclair@chromium.org
Labels: -Needs-Feedback
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
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>:
Owner: hnakashima@chromium.org
Status: Assigned (was: Unconfirmed)
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.
I send the data via POST!


2017-11-16 17:16 GMT-02:00 dsincl… via monorail <
monorail+v2.3985409167@chromium.org>:

Comment 9 by joegma...@gmail.com, Jun 13 2018

I'm having the same problem.......try to download PDF and get blank doc
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment