Downloading a PDF using Selenium, Chrome and Python

You need to replace "plugins.plugins_disabled": ["Chrome PDF Viewer"]

With:

"plugins.always_open_pdf_externally": True

Hope this helps you!


I had a similar problem, which I have solved with the firefox driver in Java. Here is my code:

ffprofile.setPreference("browser.helperApps.neverAsk.saveToDisk","application/pdf");
ffprofile.setPreference("browser.download.folderList", 2);
ffprofile.setPreference("browser.download.manager.showWhenStarting", false);
ffprofile.setPreference("browser.download.dir", "path/to/directory");
ffprofile.setPreference("plugin.scan.plid.all",false);
ffprofile.setPreference("plugin.scan.Acrobat","99.0");
ffprofile.setPreference("pdfjs.disabled",true);

Maybe for you it is an option to use Firefox and the Java->Python translation should be simple.