aspose file tools
The moose likes JSP and the fly likes Finding acrobat reader component thru JAVA Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Finding acrobat reader component thru JAVA" Watch "Finding acrobat reader component thru JAVA" New topic
Author

Finding acrobat reader component thru JAVA

srinivasrao marri
Ranch Hand

Joined: Feb 13, 2001
Posts: 61
Hi all
Can anyone say how to find that the acrobat reader component has been installed in a computer or not? this should be done thru a java/jsp program. I am using windows 2000 professional operating system. If is there any plug-in or classes availble?? please let me know.
Thank you
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
If you mean from the server, I don't think there is any good way to do this. The server will only see a request, and cannot cause anything to run on the client which could detect the version of Acrobat.
You might get somewhere with a servlet. But even a servlet cannot normally see anything outside of the web page in which it is embedded.
Your best bet is to use an Active-X control (which you can only write in J++). There might be a clever way of scripting an <object> tag which has the CLSID for the version of Acrobat you want. You would then use VbScript or even JavaScript to query the object, and you get null if the version of Acrobat is not installed. (And the <object> tag would be ignored in Netscape 4.7 or from a Unix workstation).
Another possibility is to download a Java Application which can do this detection. To detect the version of Acrobat you can either 1) Hunt for its executable or 2) Examine the Windows registry. But either one of these options is not attractive in Java. The first one involves scanning the user's hard disk, which will take a long time, and probably would cause concern to users which did not completely trust your application. The second one involves accessing the Windows registry, which is not available to most Java JVMs, but might be available in 1.5 (I think?)
srinivasrao marri
Ranch Hand

Joined: Feb 13, 2001
Posts: 61
Thanks for giving reply Michael,
i got an idea like if i write a program in C language, where i have functions to get the windows registry info. And i will make use of C program in java thru JNI.
Please suggest your comments on this.
 
 
subject: Finding acrobat reader component thru JAVA
 
Threads others viewed
PDF display problem in IE
EJB 2.0Spec in html?
com.ms.com.*
open acrobat reader in swing component
open pdf inside browser
IntelliJ Java IDE