Can't view PDF file, automatically downloads instead
I've been using the built-in pdf viewer for ages w/out issue. Today for the first time I found I could no longer view the pdf notes for my online Korean classes. Instead a save/download dialogue popped up.
Initially this problem included ALL pdf's that I tried to open in FF. It's been about 6 hours at this point - which is crazy - and I've gone through an extensive amount of troubleshooting methods (not necessarily in this order, aside from the last two):
- Installed Schubert PDF Browser Plugin.
- Disabled the built-in PDF viewer via preferences>applications, and switched to another viewer: schubert ... still got the save box.
- Installed the Adobe PDF plug-in ... could not use (I'm using a Mac os x 10.7+ the adobe plug-in is buggy and not a viable option for me)
- Deleted the mimetypes.rdf file ... no change.
- Launched FF in safemode ... no change.
- Enabled the built in viewer again via preferences>applications>portable document format (pdf)>preview in firefox.
- Checked that 'pdfjs.disabled' was toggled to 'false' in about:config ... It was.
- In about:config I reset 'plugin.disable_full_page_plugin_for_types' to default, then modified the value to: 'video/mp4,application/pdf'
- Deleted the mimetypes.rdf file.
- Re-initialized the plugins database.
The problem continued until I re-initialized my plug-in database and tried deleting the mimetypes.rdf file again and doing another restart.
Now it seems most pdf's are opening fine with the built-in viewer and schubert. However the site which I initially ran into the problem with: http://www.koreanclass101.com will not open pdf's and still opens the save dialogue automatically whenever I click open the pdf links. It also does the same when I enter the pdf directly into the address bar.
I have to pay a subscription so I'm not sure you can access this link without being a student but here it is just in case: www.koreanclass101.com/pdfs/BB_L5_051611_kclass101.pdf
(note this same page also links to another pdf which is not hosted on koreanclass101, and that pdf is now opening fine for me.)
I've tried clearing cache and all cookies for koreanclass101, but even after doing that the problem persists. I'm wondering if the fact that there is Korean text on the PDF matters at all?? Though I'm not sure why it would.
I really need a fix for this! The lessons rely on the ability to switch back and forth from audio to pdf IN my browser. When I open the pdf's with preview and run the interactive lessons in FF at the same time, FF slows to a crawl and starts to hang every time I switch back and forth btwn programs.
Изабрано решење
Weq12 wrote:
Content-Type: application/pdf Content-Disposition: attachment;
As you can see, the Content-Type is correct, but a download prompt is forced with the Content-Disposition: attachment header. Install the InlineDisposition add-on, then click the PDF link again. It should then behave as you've specified under Options - Applications.
You're welcome.
Прочитајте овај одговор са објашњењем 👍 4Сви одговори (4)
Weq12 wrote:
I have to pay a subscription so I'm not sure you can access this link
No, it redirects to a login page.
Weq12 wrote:
I found I could no longer view the pdf notes for my online Korean classes. Instead a save/download dialogue popped up.
Websites can force the browser to display a download prompt through HTTP(S) headers, by sending either Content-Type: application/octet-stream or Content-Disposition: attachment. The workaround for the former is the Force Content-Type add-on, while the workaround for the latter is the InlineDisposition add-on. If you'd like detailed directions, we first have to know which situation we're dealing with:
- Go to the page with the PDF download link.
- Press Command + Alt + K to bring up the Web Console.
- Press the Clear button to erase unrelated items from the console.
- Click the download link. You should see a GET request for the PDF file in the console. If there's still too much to sort through, type .pdf in the filter box in the top right corner.
Click the PDF link listed next to the GET request and examine the Response Headers section. You may have to first fully download the file before these show up. What's listed for Content-Type? Is there a Content-Disposition: attachment header?
Thanks a lot for the RE gingerbread man, I just checked the web console and this is what I'm seeing:
Content-Type: application/pdf Content-Disposition: attachment; filename="BB_L5_051611_kclass101.pdf"
Одабрано решење
Weq12 wrote:
Content-Type: application/pdf Content-Disposition: attachment;
As you can see, the Content-Type is correct, but a download prompt is forced with the Content-Disposition: attachment header. Install the InlineDisposition add-on, then click the PDF link again. It should then behave as you've specified under Options - Applications.
You're welcome.
Worked like a charm! PDFs are now opening in a separate tab, thank you again!