function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amanda McKellar 4Amanda McKellar 4 

Get "Failed - Network Error" in Chrome when downloading a PDF

Hi All,

Hoping someone can give me some insight.  I have a simple PDF page returned via Apex
public PageReference ViewPDF()
{
   return Page.PackSlipPDF;
}
The first vf page gathers some info from the user, and after pressing a button, this function returns the PDF version of the Pack Slip for download / printing.

In every browser except Chrome you can download the resulting PDF without issue.  In Chrome, you can view the PDF no problem, but you get a "Failed - Network Error" message if you try to download it.  Searching through many fourms, it seems that after a certain Chrome update, you get this error if the "content-length" header is not set properly.  The Chrome help fourms say that it needs to be fixed on our end, but for us, I believe the content-length hearder is set behind the scenes and we don't have the power to over-ride it (I've tried, and have also read in other posts that you can't).  

Has anyone else had this problem and figured out a solution?
 
SandhyaSandhya (Salesforce Developers) 
Hi,

Did you try below steps which worked for me.

Check for malware
Make sure Google Chrome is allowed in your antivirus and firewall settings
Adjust your proxy settings
Clear your cookies:
a. Click the Chrome menu Chrome menu on the browser toolbar.
b. Select Settings.
c. Click Show advanced settings.
d. In the "Privacy" section, click Content settings .
e. In the "Cookies" section, click the All cookies and site data.
f. Click Remove all.
g. Click X to close the dialog.


Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 

 
Amanda McKellar 4Amanda McKellar 4
No, this doesn't work.
mukesh kandalamukesh kandala
Hi Amanda, 

I am also facing same issue , if it solved, can you please explain why its getting error