install pdf reader on page load
If a pdf reader is not installed in the browser ,from a web page how to make a user install pdf reader on开发者_开发百科 the page load with pdf.
Can not be done in JavaScript. If the browsers allowed sites to install pdf viewers, what next? It would be a security nightmare.
You can not, and should not, make your users install anything. Indicate that the file requires a pdf viewer to view the document -- even a few links to free viewers -- and leave it at that.
You can't do this in JavaScript, the browser will prompt the user to download the .pdf
file if a reader isn't present (since it doesn't know what else to do with it), but installing any plugin is outside the purview of JavaScript - and should be - it would be a security nightmare.
What would you make them install, Adobe? :)
精彩评论