Page 1 of 1

Problematic PDF download: Prevent IE from opening PDFs

Posted: Thu Dec 07, 2006 4:32 pm
by Hannes, Tech Support
Sometimes there is no link to the PDF you want to download, so you cannot use the standard "Save Target As" method (cf. and Save Target As).

In these cases (and assuming there is no way to get the URL of the PDF by other means), you might automate downloading nevertheless: by preventing the browser from opening the PDF. If the document is neither opened in the embedded viewer (i.e. in the IE/iMacros browser window), nor opened by the Adobe Reader, then you can download it like any other file (using an ONDOWNLOAD command in your macro).

Here's how to prevent IE/iMacros browser from opening the PDF:

1) Change Adobe Acrobat Reader settings:
  1. Run Adobe Reader
  2. From the main menu, select Edit - Preferences
  3. Click on Internet
  4. Uncheck the 'Display PDF in browser' setting (see Adobe Reader Preferences.png attachment)
Adobe Reader Preferences.png
2) Disassociate .PDF from Adobe Reader in Windows:
  • Windows 7:
    1. Open an elevated command prompt with administrator privileges (right-click Command Prompt from the Start Menu and select 'Run as administrator')
    2. Enter the following commands and press ENTER after each one:
      • assoc .pdf=
      • ftype acrobat=
  • Windows XP:
    1. Open a My Computer/Windows Explorer window
    2. Select Tools - Folder Options from the menu
    3. Select the File Types tab
    4. Find the PDF extension and delete it (see Folder Options.png attachment)
Folder Options.png
Note:The next time you run Adobe Reader on the machine, it might automatically restore the PDF extension association. Just remember that the PDF association needs to be removed again by following these steps before running your macro.

In case you don't want to make these changes to your profile/login, just create another user/profile, apply these changes to this user, and use iimRunner (cf., to have iMacros run under this user's profile.

Posted: Thu Dec 07, 2006 9:15 pm
by jlavender
No luck. I followed your instructions and my PDF still appeared in the frame. However, I can construct the URL to the PDF. I tried this and it came back with an error, but it might be my syntax:


Posted: Thu Dec 07, 2006 9:28 pm
by jlavender
Found a bit more information. The iframe is displaying the PDF using the toolkit from - I found the reference buried in the document properties.