简体   繁体   中英

How to control the load event of a pdf file in adobe acrobat by java script code

I have a pdf file. I want to display that pdf file only in cases where Adobe Acrobat is installed on the user's machine,otherwise I want to show an error page. How I can accomplish loading of the pdf file through JavaScript only when Adobe Acrobat is present?

As the dumb PDF viewer may not understand JavaScript, you will have to do it "the other way round". You will provide the document with the error page, and have code to "activate" it within Acrobat/Reader.

The property to look for when doing such a test would be app.viewerType , which could be "Reader", "Exchange", or "Exchange Pro". Another viewerType designates another application. You might also evaluate app.platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM