Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every time I try to download a PDF document with Chromium, it asks me the following question:

This type of file can harm your computer. Do you want to keep 'file.pdf' anyway? [Discard] [Keep]

How can I get rid of this and download all *.pdf documents straightaway? Any ideas?

share|improve this question
1  
You mean Chromium - Chrome has an inbuilt PDF reader & will display the PDF –  Sathya Jan 8 '13 at 9:49
    
Thanks, edited the question for chromium. –  130490868091234 Jan 8 '13 at 9:53
    
Check this out: superuser.com/questions/111674/… –  Petr Abdulin Feb 7 '13 at 2:26
2  
@Sathya you will get this in Chrome as well under certain circumstances. –  BigHomie Feb 12 '13 at 1:53

2 Answers 2

Just as I suspected, there's nothing you can do. This comes from google's (or Chromium, depending on your browser) inability to find out if the website is secure or not, which is why we get the popup on some sites but not others. http://stackoverflow.com/questions/9512919/getting-around-chromes-malicious-file-warning

I know it's not the answer you're hoping for, but it is an answer indeed.

share|improve this answer

This old advice may still apply to the current Chromium :
After downloading a PDF successfully and it appears in the bottom bar, click the Down arrow to open up the context menu and make sure "Always open files of this type" is checked.
source

One workaround is to enable "Ask where to save each file before downloading" in the Preferences "Under the Hood" tab. It will still show the Save dialog, but just hit Enter to dismiss.
source

In general, this behavior is apparently "by design", as discussed in :
Issue 65895: Can no longer auto-open PDFs because they're considered unsafe.

A proposed solution (#57) in that issue report was :

It was suggested twice to "set the filetype to auto-open". Unfortunately, I could not find a GUI to do this. Looking into the source code, I found the relevant place in the configuration file. As a result, you can get rid of the annoying "pdf can harm your computer" warning by doing:

  1. Exit chromium
  2. edit ~/.config/chromium/Default/Preferences
  3. Locate a section that looks like:
    "download": {
    "directory_upgrade": true,
    "extensions_to_open": "",
    "prompt_for_download": false
    },
  4. Change the "extensions_to_open" setting from "" to "pdf". If there are already other extensions, use a colon to separate "pdf" from the existing entries (i.e. "foo:bar:pdf").
  5. Save the configuration file. Now chromium should work fine and download pdf files without the "...can harm..." warning. The instructions are valid for Ubuntu Linux. Other operating systems may store the configuration file in different places.

Unfortunately, I don't have Chrome to test this suggestion, but it seems that this advice doesn't work for everybody.

share|improve this answer
    
I've tested this with Version 24.0.1312.56 Ubuntu 12.10. It doesn't work anymore. –  Dennis Feb 13 '13 at 2:05
    
I have added a workaround and more info. –  harrymc Feb 13 '13 at 8:59
1  
pdf gets added to extensions_to_open using the GUI route from your original revision. It opens the PDF after downloading it, but you still have to confirm the download. –  Dennis Feb 13 '13 at 10:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.