PDF Downloads Stalled

PROBLEM: Click link to PDF in Chrome. Chrome attempts to load PDF in browser window, but download stops. User is left with an empty screen and an incomplete download progress bar. However, right-clicking the PDF and downloading to hard drive works flawlessly, and PDF opens in the user’s installed PDF reader.

DIAGNOSIS: While I was able to use Safari to open the PDFs in the browser window, the actual problem seems to have been the byte-range setting in Apache on my web server.

SOLUTION: Disable byte-range setting on Apache by adding the following directive to the .htaccess file:

# Disable Byte-range for PDF files
<Files *.pdf>
Header set Accept-Ranges none

Solution found at: http://serverfault.com/questions/607636/bulletproofing-downloads-of-large-pdfs-against-browser-misconfiguration

Published in: on 2016/12/12 at 4:51 pm  Leave a Comment  
Tags: , , , , , , , ,