Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How I can open PDF Document from Vb.Net application?
I want to open the document within a from. I mean the content of the PDF Document will show with a control in normal VB.Net windows FORM.
Posted
Updated 28-Aug-11 19:43pm
v3
Comments
Suresh Suthar 29-Aug-11 1:51am    
I think below solution is enough for what you want to do, isn't it?
You have added just one sentence to your question after I have posted the solution.
If you have any problem or you got stuck in code please show me your code?

1 solution

If you want to open file in WinForm than you can use Adobe PDF Reader control from COM Component.
[Edit]
For Windows Form you have to place Adobe PDF Reader Control on you form and just pass the file path as its source.
C#
AdobeReader.src = "C:\mydoc.pdf"


And if you dont want to use this control than just check this out..

PDF Viewer Control Without Acrobat Reader Installed[^]
[/edit]
Or, if you want to open PDF file in Adobe Reader Application than just use Process.Start() method like this:

C#
Process myProcess = new Process();

           try
           {
         
               myProcess.StartInfo.FileName = "C:\\myPDF.pdf";
               myProcess.StartInfo.CreateNoWindow = true;
               myProcess.Start();

           }
           catch (Exception e)
           {
               MessageBox.Show(e.Message);
           }
 
Share this answer
 
v2

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