Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

Can't view PDF file, automatically downloads instead

  • 4 ответа
  • 11 имеют эту проблему
  • 2 просмотра
  • Последний ответ от Weq12

more options

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.

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)

more options

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:

  1. Go to the page with the PDF download link.
  2. Press Command + Alt + K to bring up the Web Console.
  3. Press the Clear button to erase unrelated items from the console.
  4. 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?
more options

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"

more options

Выбранное решение

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.

more options

Worked like a charm! PDFs are now opening in a separate tab, thank you again!