How to determine if the user's browser can view PDF files

前端 未结 4 994
后悔当初
后悔当初 2021-01-17 23:44

What\'s the best way for determining whether the user\'s browser can view PDF files?

Ideally, it shouldn\'t matter on the browser or the operating system.

I

4条回答
  •  攒了一身酷
    2021-01-18 00:13

    After initially ignoring the advise on this page the architect went ahead with Acrobat detection, causing an inevitable support nightmare.

    As ddaa mentions not all the scenarios can be accurately captured with Plug-in detection. Some users, for example, may choose to view PDF files with FoxIt Reader rather than acrobat. Some user's browsers don't flag that they are Acrobat ready, and certainly not always in the same way.

    A better solution would have been to give the user a choice on how they'd like to view the relevant document. Personally, I don't like to have any website rely on a plug-in - it spoils the beauty of the web.

提交回复
热议问题