Reputation: 969
I need to disable Firefox default PDF.js viewer through javascript (or) asp.net. I found one non-programmatic solution in Firefox options:
Options--> Application-->Content type Portable document Format action default preview in firefox
There I can change it to use Adobe Acrobat Reader, but how can we do this in code? How can we get the Firefox browser Applications Action in java script code.
Upvotes: 2
Views: 3517
Reputation: 13854
If you send the following header with the response containing the PDF:
Content-Disposition: Attachment
The browser will treat it as a file download instead of a document to display, which when opened will open with the users default PDF viewer.
Upvotes: 3
Reputation: 188
the short answer is you cant, at least on remote users pcs, pretty much all browsers will flag that activity as malicious (think about how you'd feel if someone changed the program used to store your passwords).
you could maybe require the use of a pdf plugin in the same way you can require the use of flash.
rails would be a far better choice than asp.net in this case btw.
Upvotes: -1