I have searched and searched for a solution to this problem, please help. I am using a Samsung Galaxy S4 with Android 4.2.2 along with the Chrome browser.
Steps to replicate:
- Navigate to: http://www.buzzbuzzbingo.com/Holidays/Halloween_Images/
- Click "Download and Print" to start download of PDF file.
- Notice notification that says "Starting downloading..."
- Open notification bar and see that the download has completed.
- Click the downloaded PDF file and receive "Cannot open file" error message and the notification bar closes.
Long clicking the downloaded PDF does not offer options for choosing which app to open the file. I have installed Adobe Reader and using that to navigate to the downloaded file will open the file just fine. Same with Polaris Office. I would like to be able to open the PDF from the notification bar. Alternatively if I could view the PDF directly in Chrome, that would be acceptable.
Answer
It's a combination of a PDF and a browser issue. Some PDFs work fine while others do not across different browsers.
Downloading the PDF you mentioned, here are the results using different browsers:
- Chrome: Cannot open PDF from notification
- Boat Browser: Cannot open PDF from notification
- Dolphin: Can open PDF from notification
Downloading a different PDF from another site, here are the results using different browsers:
- Chrome: Can open PDF from notification
- Boat Browser: Can open PDF from notification
- Dolphin: Can open PDF from notification
UPDATE 2013-10-11: According to Scott's findings, this is a PDF issue. The Content-Type header of the problematic PDF is application/x-download
, while the working PDF is application/pdf
.
If you control the server which is serving these PDFs, you can switch the Content-Type header to allow it to open in all browsers. PHP example:
In PHP this was previously broken when sending:
header('Content-Type: application/x-download');
Switch this to this header to work:
header('Content-Type: application/pdf');
No comments:
Post a Comment