I want to open a PDF file in a button click. I'll keep the PDF file within the solution/namespace of the project. Can anyone give me solution for this?
+1
A:
To start the standard PDF viewer you can simply start an external process:
Process proc = new Process( );
proc.StartInfo = new ProcessStartInfo( ) {
FileName = path //put your path here
};
proc.Start( );
To show the file inside your application you have to use the pdf viewer as an ActiveX-component.
PVitt
2010-10-19 10:04:11
how will i specify the path of the file if that pdf file resides inside the solution of the project?
Rohit
2010-10-19 10:07:43
ok...thank u..its working
Rohit
2010-10-19 10:12:04
easier: Process.Start(pdffile);
2010-10-19 10:16:19
A:
You have many options:
User WPF WebBrowser control and open the pdf: Link 1, Link 2
User WinformsHost to host ActiveX Stackoverflow link.
anivas
2010-10-19 10:11:35