Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we have a functionality to open the pdf url files in browser, now client wants us to open the pdf url in adobe reader. is it possible? if it's possible please provide the info.

What I have tried:

Dim prc As Process = New Process
      prc.StartInfo.FileName = "acroRd32.exe"
      prc.StartInfo.Arguments = "https://c94aabd264f2664c83b7-00d59eb10ca85f1979051abaa7e70239.ssl.cf2.rackcdn.com/workorder_2981-1_bradywarewashreportform_af429a09-8cde-42f0-afaa-8ec6942abe87_180227100510.pdf" '"C:\Users\madhukarg\Desktop\pdf.pdf"
      prc.Start()

this is i have tried so far but it's not working
Posted
Updated 27-Feb-18 23:18pm
Comments
Maciej Los 28-Feb-18 7:03am    
Can you show us a method you use to open pdf file in browser?
Is it ASP.NET application?

1 solution

You cannot lauch an executable, whichever it is, from a browser. The server cannot, in any way, force the clients to open an executable locally.
And it is a good thing since allowing that would open the door to a lot of malicious behaviours.
If your clients want to open pdf files in their reader, they have to do it in two steps:
1. Download the pdf file
2. Open the downloaded file
You should explain them that wanting your server to directly launch an executable on their client machines would be a huge security risk for them. Sometimes being good to your clients does not imply blindly following their non-educated requirements.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900