Open PDF or DOC resource
We have a requirement to built a application where user clicks on a button and a PDF or DOC file opens in a new window.
Now these PDF or DOC files are static and will be given to us by client.
We dont have to create these files, we only need to keep it somewhere in our DC and then deploy them alongwith our application...and then just open it at user wish.
Now the approach in my mind is :
I will keep these files somewhere under src folder in my web dynpro DC.
And then write some code called on click of a button to open these files.
Now the doubt in my mind is :
How will my code recognize...which software to use for opening a particular file.
i.e. if it is a DOC (doc extention) then MS word should be used.
If it is PDF then Adobe acrobat reader should be used.
Will it recognize this automatically ! based of extention of file !!....
Any code related help would be much appreciated.
Thanking you in anticipation.