Last post Apr 14, 2017 06:19 AM by Cathy Zou
Apr 13, 2017 09:26 AM|mithun.n33|LINK
Hi, i have installed multiple pdf readers in my machine. i am trying to open a pdf file using openPDF editior using c#. i am struck at creating the instance to open the file. can some one help me with the C# code to open the pdf file using open PDF editor.
Thanks in advance.
Apr 13, 2017 04:57 PM|PatriceSc|LINK
It's best to always provide the error message you have (translated in English) and the line of code on which it happens. My guess is that you are using Process.Start ?
It perhaps won't work at all anyway. C# runs server side so on a real web server it would try to launch this EXE file on the web server rather than on the browser side. Keep in mind you have limited control on the client side.
You can send a PDF file from the server to the browser but the user will have full contorl on what to do then with this file.
Apr 14, 2017 02:06 AM|Leon Davis|LINK
You can take a look at Spire.PDFViewer for ASP.NET, by which you can easily open and view PDF files through 1 line of code like:
Check the following article of how to use it:
Apr 14, 2017 06:19 AM|Cathy Zou|LINK
As PatriceSc said. I think that it is a hard a work to realize it for security reason.
So, I suggest that if you want to open pdf in asp.net. you could use itextsharp or PDF library.
For more information. Please refer to the following links: